Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sdio: sdio_io.c Fix sparse warnings

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>

authored by

Tomas Winkler and committed by
Pierre Ossman
ea901300 62a7573e

+4 -5
+4 -5
drivers/mmc/core/sdio_io.c
··· 187 187 */ 188 188 static inline unsigned int sdio_max_byte_size(struct sdio_func *func) 189 189 { 190 - return min(min(min( 191 - func->card->host->max_seg_size, 192 - func->card->host->max_blk_size), 193 - func->max_blksize), 194 - 512u); /* maximum size for byte mode */ 190 + unsigned mval = min(func->card->host->max_seg_size, 191 + func->card->host->max_blk_size); 192 + mval = min(mval, func->max_blksize); 193 + return min(mval, 512u); /* maximum size for byte mode */ 195 194 } 196 195 197 196 /**