* [PATCH] staging/vt6656: Fix too large integer constant warning on 32-bit
@ 2013-03-04 19:42 Geert Uytterhoeven
2013-03-04 19:59 ` Peter Hüwe
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2013-03-04 19:42 UTC (permalink / raw)
To: Peter Huewe, Greg Kroah-Hartman
Cc: Fengguang Wu, devel, linux-kernel, Geert Uytterhoeven
drivers/staging/vt6656/card.c: In function ‘CARDqGetNextTBTT’:
drivers/staging/vt6656/card.c:793: warning: integer constant is too large for ‘unsigned long’ type
Commit c7b7cad0d8df823ea063c86a54316bbcbfa04a7c ("staging/vt6656: Fix
sparse warning constant 0xffffffff00000000U is so big it is unsigned long")
changed the constant to "0xffffffff00000000UL", but that only works on
64-bit. Change it "0xffffffff00000000ULL" to fix it for 32-bit, too.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/staging/vt6656/card.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 22918a1..d2479b7 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -790,7 +790,7 @@ u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval)
if ((~uLowNextTBTT) < uLowRemain)
qwTSF = ((qwTSF >> 32) + 1) << 32;
- qwTSF = (qwTSF & 0xffffffff00000000UL) |
+ qwTSF = (qwTSF & 0xffffffff00000000ULL) |
(u64)(uLowNextTBTT + uLowRemain);
return (qwTSF);
--
1.7.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] staging/vt6656: Fix too large integer constant warning on 32-bit
2013-03-04 19:42 [PATCH] staging/vt6656: Fix too large integer constant warning on 32-bit Geert Uytterhoeven
@ 2013-03-04 19:59 ` Peter Hüwe
0 siblings, 0 replies; 2+ messages in thread
From: Peter Hüwe @ 2013-03-04 19:59 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Greg Kroah-Hartman, Fengguang Wu, devel, linux-kernel
Am Montag, 4. März 2013, 20:42:00 schrieb Geert Uytterhoeven:
> drivers/staging/vt6656/card.c: In function ‘CARDqGetNextTBTT’:
> drivers/staging/vt6656/card.c:793: warning: integer constant is too large
> for ‘unsigned long’ type
>
> Commit c7b7cad0d8df823ea063c86a54316bbcbfa04a7c ("staging/vt6656: Fix
> sparse warning constant 0xffffffff00000000U is so big it is unsigned long")
> changed the constant to "0xffffffff00000000UL", but that only works on
> 64-bit. Change it "0xffffffff00000000ULL" to fix it for 32-bit, too.
>
Thanks - sorry that I had missed this.
I thought I had it compiled on x86 (non64 bit), too.
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-04 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 19:42 [PATCH] staging/vt6656: Fix too large integer constant warning on 32-bit Geert Uytterhoeven
2013-03-04 19:59 ` Peter Hüwe
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®