login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
2
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Ivo van Doorn
Subject:
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
Date: Tuesday, September 2, 2008 - 7:27 am
> From: Boaz Harrosh <bharrosh@panasas.com>
quoted text
> Date: Mon, 1 Sep 2008 14:47:19 +0300 > Subject: [PATCH] rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON > > A "Set" to a sign-bit in an "&" operation causes a compiler warning. > Make calculations unsigned. > > [ The warning was masked by the old definition of BUILD_BUG_ON() ] > > Also remove __builtin_constant_p from FIELD_CHECK since BUILD_BUG_ON > no longer permits non-const values. > > Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> > TO: Ivo van Doorn <IvDoorn@gmail.com> > TO: John W. Linville <linville@tuxdriver.com> > CC: Ingo Molnar <mingo@elte.hu> > CC: Rusty Russell <rusty@rustcorp.com.au>
Thanks. Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
quoted text
> --- > drivers/net/wireless/rt2x00/rt2x00reg.h | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h > index 7e88ce5..2ea7866 100644 > --- a/drivers/net/wireless/rt2x00/rt2x00reg.h > +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h > @@ -136,7 +136,7 @@ struct rt2x00_field32 { > */ > #define is_power_of_two(x) ( !((x) & ((x)-1)) ) > #define low_bit_mask(x) ( ((x)-1) & ~(x) ) > -#define is_valid_mask(x) is_power_of_two(1 + (x) + low_bit_mask(x)) > +#define is_valid_mask(x) is_power_of_two(1LU + (x) + low_bit_mask(x)) > > /* > * Macro's to find first set bit in a variable. > @@ -173,8 +173,7 @@ struct rt2x00_field32 { > * does not exceed the given typelimit. > */ > #define FIELD_CHECK(__mask, __type) \ > - BUILD_BUG_ON(!__builtin_constant_p(__mask) || \ > - !(__mask) || \ > + BUILD_BUG_ON(!(__mask) || \ > !is_valid_mask(__mask) || \ > (__mask) != (__type)(__mask)) \ >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCHSET 0/5] BUILD_BUG_ON: error on none-const expressions
, Boaz Harrosh
, (Mon Sep 1, 6:00 am)
[PATCH] debug, x86: move BUILD_BUG_ON() ARRAY_SIZE and __F ...
, Boaz Harrosh
, (Mon Sep 1, 6:07 am)
[PATCH 2/5] net/niu: Fix none-const BUILD_BUG_ON usage
, Boaz Harrosh
, (Mon Sep 1, 6:11 am)
[PATCH 3/5] virtio: Fix none-const BUILD_BUG_ON usage
, Boaz Harrosh
, (Mon Sep 1, 6:13 am)
[PATCH 4/5] rt2x00: Compiler warning unmasked by fix of BU ...
, Boaz Harrosh
, (Mon Sep 1, 6:21 am)
Re: [PATCH 4/5] rt2x00: Compiler warning unmasked by fix o ...
, Ivo Van Doorn
, (Mon Sep 1, 6:27 am)
Re: [PATCH 4/5] rt2x00: Compiler warning unmasked by fix o ...
, Benny Halevy
, (Mon Sep 1, 6:27 am)
[PATCH 5/5] debug: BUILD_BUG_ON: error on non-const expres ...
, Boaz Harrosh
, (Mon Sep 1, 6:28 am)
[PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by fix ...
, Boaz Harrosh
, (Mon Sep 1, 6:44 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const e ...
, Jan Beulich
, (Mon Sep 1, 6:55 am)
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by ...
, Ivo Van Doorn
, (Mon Sep 1, 7:01 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const e ...
, Boaz Harrosh
, (Mon Sep 1, 7:21 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const ...
, Jan Beulich
, (Mon Sep 1, 7:36 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const ...
, Boaz Harrosh
, (Mon Sep 1, 8:00 am)
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by ...
, Boaz Harrosh
, (Mon Sep 1, 8:17 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const ...
, Jan Beulich
, (Mon Sep 1, 8:29 am)
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by ...
, Ivo van Doorn
, (Mon Sep 1, 9:34 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const ...
, Boaz Harrosh
, (Mon Sep 1, 9:41 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const e ...
, Jan Beulich
, (Tue Sep 2, 12:47 am)
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by ...
, Boaz Harrosh
, (Tue Sep 2, 7:20 am)
Re: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by ...
, Ivo van Doorn
, (Tue Sep 2, 7:27 am)
Re: [PATCH 5/5] debug: BUILD_BUG_ON: error on non-const e ...
, Boaz Harrosh
, (Tue Sep 2, 8:19 am)
[PATCH 3/5 ver2] virtio: Fix non-const BUILD_BUG_ON usage
, Boaz Harrosh
, (Tue Sep 2, 8:53 am)
[PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by fix ...
, Boaz Harrosh
, (Tue Sep 2, 8:55 am)
[PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-const e ...
, Boaz Harrosh
, (Tue Sep 2, 8:57 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Boaz Harrosh
, (Tue Sep 2, 9:06 am)
Re: [PATCH 5/5 ver3] debug: BUILD_BUG_ON: error on non-con ...
, Boaz Harrosh
, (Tue Sep 2, 9:07 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Jan Beulich
, (Tue Sep 2, 9:11 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Boaz Harrosh
, (Wed Sep 3, 1:57 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Jan Beulich
, (Wed Sep 3, 3:19 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Boaz Harrosh
, (Wed Sep 3, 3:52 am)
Re: [PATCHSET 0/5] BUILD_BUG_ON: error on none-const expre ...
, Ingo Molnar
, (Sat Sep 6, 9:01 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Rusty Russell
, (Wed Oct 1, 10:35 pm)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ...
, Boaz Harrosh
, (Sun Oct 5, 2:34 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Bill Fink
Re: [PATCH] net: add ability to clear stats via ethtool - e1000/pcnet32
Jeffrey V. Merkey
Re: Versioning file system
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Luben Tuikov
Re: Integration of SCST in the mainstream Linux kernel
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
linux-netdev
:
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Rafael J. Wysocki
Re: [PATCH] igb: fix kexec with igb
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Jack J. Woehr
Re: Real men don't attack straw men
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Tony Abernethy
Re: The Atheros story in much fewer words
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Shawn O. Pearce
Re: Bugs in Gitosis
Alex Riesen
Re: git exclude patterns for directory
David Kastrup
Re: I'm a total push-over..
Colocation donated by:
Syndicate