Commit ea901300cd8b809285fa5cbced18124f127e0ac6
Committed by
Pierre Ossman
1 parent
62a7573ee9
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>
Showing 1 changed file with 4 additions and 5 deletions Side-by-side Diff
drivers/mmc/core/sdio_io.c
... | ... | @@ -187,11 +187,10 @@ |
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 | /** |