* warnings in iwlwifi
@ 2007-08-14 23:10 Johannes Berg
2007-08-15 11:54 ` ian
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-08-14 23:10 UTC (permalink / raw)
To: linux-wireless; +Cc: Tomas Winkler, Zhu Yi
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
CC [M] drivers/net/wireless/iwl-base-3945.o
drivers/net/wireless/iwl-base.c: In function ‘iwl_handle_data_packet_monitor’:
drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression
drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression
CC [M] drivers/net/wireless/iwl-3945.o
CC [M] drivers/net/wireless/iwl-3945-rs.o
CC [M] drivers/net/wireless/iwl-base-4965.o
drivers/net/wireless/iwl-base.c:2169: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2170: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2171: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2172: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2173: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2179: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2181: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2183: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2185: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c:2186: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/iwl-base.c: In function ‘iwl_handle_data_packet_monitor’:
drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression
drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in expression
I suspect most of them are caused by endianness bugs.
This for example:
le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4;
looks totally bogus unless you somehow do macro magic to define the
RX_RES_PHY...MASK in little endian...
Maybe it's time for you to get a cross compiler or better yet buy a
big-endian machine and actually test things on that? :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: warnings in iwlwifi
2007-08-14 23:10 warnings in iwlwifi Johannes Berg
@ 2007-08-15 11:54 ` ian
2007-08-15 12:02 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: ian @ 2007-08-15 11:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Tomas Winkler, Zhu Yi
Johannes Berg wrote:
> CC [M] drivers/net/wireless/iwl-base-3945.o
> drivers/net/wireless/iwl-base.c: In function =E2=80=98iwl_handle_data=
_packet_monitor=E2=80=99:
> drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in ex=
pression
> drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in ex=
pression
> CC [M] drivers/net/wireless/iwl-3945.o
> CC [M] drivers/net/wireless/iwl-3945-rs.o
> CC [M] drivers/net/wireless/iwl-base-4965.o
> drivers/net/wireless/iwl-base.c:2169: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2170: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2171: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2172: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2173: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2179: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2181: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2183: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2185: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c:2186: warning: large integer implicit=
ly truncated to unsigned type
> drivers/net/wireless/iwl-base.c: In function =E2=80=98iwl_handle_data=
_packet_monitor=E2=80=99:
> drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in ex=
pression
> drivers/net/wireless/iwl-base.c:3318: warning: integer overflow in ex=
pression
>=20
>=20
> I suspect most of them are caused by endianness bugs.
> This for example:
>=20
> le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4;
>=20
> looks totally bogus unless you somehow do macro magic to define the
> RX_RES_PHY...MASK in little endian...
iwl-hw.h:#define RX_RES_PHY_FLAGS_ANTENNA_MSK __const=
ant_cpu_to_le16(0xf0)
I don't understand how this would generate the warning though
>=20
> Maybe it's time for you to get a cross compiler or better yet buy a
> big-endian machine and actually test things on that? :)
>=20
No need for these drastic comments, for two warnings imho ;-)
We all know that one typo can make gcc very upset.
And actually i believe somebody has a big endian anyways. Zhu Yi anounc=
ed that once
and judging from the git commits i'm guessing it's Tomas Winkler.
one of the warnings was already fixed in iwlwifi git yesterday
http://intellinuxwireless.org/repos/?p=3Diwlwifi.git;a=3Dcommit;h=3Db7c=
e8c9f73b44a2f91424ce522844bb29e23a739
which will take care of the 2xxx warnings.
I'm predicting that patch will arrive on linux-wireless soon too.
(took me quite some time to figure this out, because I was looking at t=
he iwlwifi git)
Ian
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: warnings in iwlwifi
2007-08-15 11:54 ` ian
@ 2007-08-15 12:02 ` Johannes Berg
2007-08-15 13:27 ` Tomas Winkler
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-08-15 12:02 UTC (permalink / raw)
To: ian; +Cc: linux-wireless, Tomas Winkler, Zhu Yi
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
On Wed, 2007-08-15 at 13:54 +0200, ian wrote:
> > le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4;
> >
> > looks totally bogus unless you somehow do macro magic to define the
> > RX_RES_PHY...MASK in little endian...
>
> iwl-hw.h:#define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0)
> I don't understand how this would generate the warning though
Ah, so there is macro magic. Why that, and not just convert the value to
CPU first and then mask? i.e.
#define RX_RES_PHY_FLAGS_ANTENNA_MSK 0xF0
and use
(le16_to_cpu(phy_flags_hw) & RX_RES...MSK) >> 4
or something?
> > Maybe it's time for you to get a cross compiler or better yet buy a
> > big-endian machine and actually test things on that? :)
> >
>
> No need for these drastic comments, for two warnings imho ;-)
:)
I'm spammed by warnings right now in my kernel build for some reason.
I'm guessing gcc got a bit more trigger-happy or something.
> I'm predicting that patch will arrive on linux-wireless soon too.
> (took me quite some time to figure this out, because I was looking at the iwlwifi git)
Alright :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: warnings in iwlwifi
2007-08-15 12:02 ` Johannes Berg
@ 2007-08-15 13:27 ` Tomas Winkler
2007-08-15 13:39 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2007-08-15 13:27 UTC (permalink / raw)
To: Johannes Berg; +Cc: ian, linux-wireless, Zhu Yi
On 8/15/07, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2007-08-15 at 13:54 +0200, ian wrote:
>
> > > le16_to_cpu(phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> 4;
> > >
> > > looks totally bogus unless you somehow do macro magic to define the
> > > RX_RES_PHY...MASK in little endian...
> >
> > iwl-hw.h:#define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0)
>
> > I don't understand how this would generate the warning though
>
> Ah, so there is macro magic. Why that, and not just convert the value to
> CPU first and then mask? i.e.
> #define RX_RES_PHY_FLAGS_ANTENNA_MSK 0xF0
> and use
> (le16_to_cpu(phy_flags_hw) & RX_RES...MSK) >> 4
> or something?
>
> > > Maybe it's time for you to get a cross compiler or better yet buy a
> > > big-endian machine and actually test things on that? :)
> > >
> >
> > No need for these drastic comments, for two warnings imho ;-)
>
> :)
>
> I'm spammed by warnings right now in my kernel build for some reason.
> I'm guessing gcc got a bit more trigger-happy or something.
>
> > I'm predicting that patch will arrive on linux-wireless soon too.
> > (took me quite some time to figure this out, because I was looking at the iwlwifi git)
>
> Alright :)
>
I cannot get this error in my environment can you describe yours?
Thanks for your input
Tomas
> johannes
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: warnings in iwlwifi
2007-08-15 13:27 ` Tomas Winkler
@ 2007-08-15 13:39 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2007-08-15 13:39 UTC (permalink / raw)
To: Tomas Winkler; +Cc: ian, linux-wireless, Zhu Yi
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
On Wed, 2007-08-15 at 16:27 +0300, Tomas Winkler wrote:
> I cannot get this error in my environment can you describe yours?
Weird, I'll go ignore the errors for now. Stock debian unstable install
with gcc 4.2.1-1 on 32-bit powerpc. Need to anything else?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-15 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14 23:10 warnings in iwlwifi Johannes Berg
2007-08-15 11:54 ` ian
2007-08-15 12:02 ` Johannes Berg
2007-08-15 13:27 ` Tomas Winkler
2007-08-15 13:39 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).