]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sdio: sdio_io.c Fix sparse warnings
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 10 Jul 2008 00:01:56 +0000 (03:01 +0300)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 15 Jul 2008 13:47:03 +0000 (15:47 +0200)
Unfold nested macros it creates not readable code and
sparse warnings
sdio_io.c:190:9: warning: symbol '_min1' shadows an earlier one

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/core/sdio_io.c

index 0888df64581f12b3200e7c4f1d61c120cffbd932..f61fc2d4cd0a649a02e8e2acc10da53a7ffe7c2a 100755 (executable)
@@ -187,11 +187,10 @@ EXPORT_SYMBOL_GPL(sdio_set_block_size);
  */
 static inline unsigned int sdio_max_byte_size(struct sdio_func *func)
 {
-       return min(min(min(
-               func->card->host->max_seg_size,
-               func->card->host->max_blk_size),
-               func->max_blksize),
-               512u); /* maximum size for byte mode */
+       unsigned mval = min(func->card->host->max_seg_size,
+                           func->card->host->max_blk_size);
+       mval = min(mval, func->max_blksize);
+       return min(mval, 512u); /* maximum size for byte mode */
 }
 
 /**