* [PATCH 1/1] MMC: sido_io.c Fix sparse warnings
@ 2008-07-10 0:01 Tomas Winkler
2008-07-10 19:59 ` Pierre Ossman
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2008-07-10 0:01 UTC (permalink / raw)
To: drzeus-list; +Cc: linux-kernel, Tomas Winkler
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>
---
drivers/mmc/core/sdio_io.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 0888df6..f61fc2d 100755
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -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 */
}
/**
--
1.5.4.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] MMC: sido_io.c Fix sparse warnings
2008-07-10 0:01 [PATCH 1/1] MMC: sido_io.c Fix sparse warnings Tomas Winkler
@ 2008-07-10 19:59 ` Pierre Ossman
0 siblings, 0 replies; 2+ messages in thread
From: Pierre Ossman @ 2008-07-10 19:59 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linux-kernel, Tomas Winkler
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Thu, 10 Jul 2008 03:01:56 +0300
Tomas Winkler <tomas.winkler@intel.com> wrote:
> 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>
> ---
I actually think the original version is more readable, but I've
applied it for the sake of avoiding sparse noise.
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-10 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-10 0:01 [PATCH 1/1] MMC: sido_io.c Fix sparse warnings Tomas Winkler
2008-07-10 19:59 ` Pierre Ossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®