From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: [PATCH] Fix MMC warnings
Date: Sun, 02 Jan 2005 01:07:31 +0100 [thread overview]
Message-ID: <41D73B43.3080109@drzeus.cx> (raw)
[-- Attachment #1: Type: text/plain, Size: 58 bytes --]
Here's a patch that fixes the compiler warnings in mmc.c.
[-- Attachment #2: mmc-warning.patch --]
[-- Type: text/x-patch, Size: 714 bytes --]
Index: linux-wbsd/drivers/mmc/mmc.c
===================================================================
--- linux-wbsd/drivers/mmc/mmc.c (revision 117)
+++ linux-wbsd/drivers/mmc/mmc.c (working copy)
@@ -428,14 +428,14 @@
#define UNSTUFF_BITS(resp,start,size) \
({ \
- const u32 __mask = (1 << (size)) - 1; \
+ const u32 __mask = ((size >= 32)?0:(1 << (size))) - 1; \
const int __off = 3 - ((start) / 32); \
const int __shft = (start) & 31; \
u32 __res; \
\
__res = resp[__off] >> __shft; \
if ((size) + __shft >= 32) \
- __res |= resp[__off-1] << (32 - __shft); \
+ __res |= resp[__off-1] << ((32 - __shft) % 32); \
__res & __mask; \
})
next reply other threads:[~2005-01-02 0:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-02 0:07 Pierre Ossman [this message]
2005-01-02 8:44 ` [PATCH] Fix MMC warnings Russell King
2005-01-02 11:55 ` Russell King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41D73B43.3080109@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox