@@ -206,7 +206,7 @@ static int sddr55_read_data(struct us_data *us,
206
206
// a bounce buffer and move the data a piece at a time between the
207
207
// bounce buffer and the actual transfer buffer.
208
208
209
- len = min (( unsigned int ) sectors , ( unsigned int ) info -> blocksize >>
209
+ len = min_t ( unsigned int , sectors , info -> blocksize >>
210
210
info -> smallpageshift ) * PAGESIZE ;
211
211
buffer = kmalloc (len , GFP_NOIO );
212
212
if (buffer == NULL )
@@ -224,7 +224,7 @@ static int sddr55_read_data(struct us_data *us,
224
224
225
225
// Read as many sectors as possible in this block
226
226
227
- pages = min (( unsigned int ) sectors << info -> smallpageshift ,
227
+ pages = min_t ( unsigned int , sectors << info -> smallpageshift ,
228
228
info -> blocksize - page );
229
229
len = pages << info -> pageshift ;
230
230
@@ -333,7 +333,7 @@ static int sddr55_write_data(struct us_data *us,
333
333
// a bounce buffer and move the data a piece at a time between the
334
334
// bounce buffer and the actual transfer buffer.
335
335
336
- len = min (( unsigned int ) sectors , ( unsigned int ) info -> blocksize >>
336
+ len = min_t ( unsigned int , sectors , info -> blocksize >>
337
337
info -> smallpageshift ) * PAGESIZE ;
338
338
buffer = kmalloc (len , GFP_NOIO );
339
339
if (buffer == NULL )
@@ -351,7 +351,7 @@ static int sddr55_write_data(struct us_data *us,
351
351
352
352
// Write as many sectors as possible in this block
353
353
354
- pages = min (( unsigned int ) sectors << info -> smallpageshift ,
354
+ pages = min_t ( unsigned int , sectors << info -> smallpageshift ,
355
355
info -> blocksize - page );
356
356
len = pages << info -> pageshift ;
357
357
0 commit comments