@@ -206,7 +206,7 @@ static int sddr55_read_data(struct us_data *us,
206206 // a bounce buffer and move the data a piece at a time between the
207207 // bounce buffer and the actual transfer buffer.
208208
209- len = min (( unsigned int ) sectors , ( unsigned int ) info -> blocksize >>
209+ len = min_t ( unsigned int , sectors , info -> blocksize >>
210210 info -> smallpageshift ) * PAGESIZE ;
211211 buffer = kmalloc (len , GFP_NOIO );
212212 if (buffer == NULL )
@@ -224,7 +224,7 @@ static int sddr55_read_data(struct us_data *us,
224224
225225 // Read as many sectors as possible in this block
226226
227- pages = min (( unsigned int ) sectors << info -> smallpageshift ,
227+ pages = min_t ( unsigned int , sectors << info -> smallpageshift ,
228228 info -> blocksize - page );
229229 len = pages << info -> pageshift ;
230230
@@ -333,7 +333,7 @@ static int sddr55_write_data(struct us_data *us,
333333 // a bounce buffer and move the data a piece at a time between the
334334 // bounce buffer and the actual transfer buffer.
335335
336- len = min (( unsigned int ) sectors , ( unsigned int ) info -> blocksize >>
336+ len = min_t ( unsigned int , sectors , info -> blocksize >>
337337 info -> smallpageshift ) * PAGESIZE ;
338338 buffer = kmalloc (len , GFP_NOIO );
339339 if (buffer == NULL )
@@ -351,7 +351,7 @@ static int sddr55_write_data(struct us_data *us,
351351
352352 // Write as many sectors as possible in this block
353353
354- pages = min (( unsigned int ) sectors << info -> smallpageshift ,
354+ pages = min_t ( unsigned int , sectors << info -> smallpageshift ,
355355 info -> blocksize - page );
356356 len = pages << info -> pageshift ;
357357
0 commit comments