* linux-next: net tree build warnings @ 2009-10-14 4:20 Stephen Rothwell 2009-10-14 4:34 ` Stephen Rothwell 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-10-14 4:20 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, linux-kernel, Arnaldo Carvalho de Melo [-- Attachment #1: Type: text/plain, Size: 1365 bytes --] Hi Dave, Today's linux-next build (powerpc ppc44x_defconfig) produced these warnings: In file included from net/socket.c:94: include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want In file included from net/core/scm.c:36: include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want In file included from net/ipv4/ip_sockglue.c:37: include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want In file included from net/ipv6/ipv6_sockglue.c:53: include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want CONFIG_COMPAT is not set. Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net: Introduce recvmmsg socket syscall"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-10-14 4:20 linux-next: net tree build warnings Stephen Rothwell @ 2009-10-14 4:34 ` Stephen Rothwell 2009-10-14 22:11 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-10-14 4:34 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, linux-kernel, Arnaldo Carvalho de Melo [-- Attachment #1: Type: text/plain, Size: 1548 bytes --] Hi Dave, On Wed, 14 Oct 2009 15:20:00 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Today's linux-next build (powerpc ppc44x_defconfig) produced these > warnings: > > In file included from net/socket.c:94: > include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want > In file included from net/core/scm.c:36: > include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want > In file included from net/ipv4/ip_sockglue.c:37: > include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want > In file included from net/ipv6/ipv6_sockglue.c:53: > include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > include/net/compat.h:45: warning: its scope is only this definition or declaration, which is probably not what you want > > CONFIG_COMPAT is not set. > > Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net: > Introduce recvmmsg socket syscall"). I also get these for i386 and sparc32 defconfig builds. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-10-14 4:34 ` Stephen Rothwell @ 2009-10-14 22:11 ` David Miller 2009-10-15 1:55 ` Arnaldo Carvalho de Melo 2009-10-17 2:10 ` [PATCH 1/1] " Arnaldo Carvalho de Melo 0 siblings, 2 replies; 27+ messages in thread From: David Miller @ 2009-10-14 22:11 UTC (permalink / raw) To: sfr; +Cc: linux-next, linux-kernel, acme From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Wed, 14 Oct 2009 15:34:50 +1100 > On Wed, 14 Oct 2009 15:20:00 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: >> >> Today's linux-next build (powerpc ppc44x_defconfig) produced these >> warnings: >> >> In file included from net/socket.c:94: >> include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list >> >> CONFIG_COMPAT is not set. >> >> Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net: >> Introduce recvmmsg socket syscall"). ... > > I also get these for i386 and sparc32 defconfig builds. I've asked Arnaldo to work on fixing this. Thanks! ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-10-14 22:11 ` David Miller @ 2009-10-15 1:55 ` Arnaldo Carvalho de Melo 2009-10-17 2:10 ` [PATCH 1/1] " Arnaldo Carvalho de Melo 1 sibling, 0 replies; 27+ messages in thread From: Arnaldo Carvalho de Melo @ 2009-10-15 1:55 UTC (permalink / raw) To: David Miller; +Cc: sfr, linux-next, linux-kernel Em Wed, Oct 14, 2009 at 03:11:37PM -0700, David Miller escreveu: > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 14 Oct 2009 15:34:50 +1100 > > > On Wed, 14 Oct 2009 15:20:00 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > >> > >> Today's linux-next build (powerpc ppc44x_defconfig) produced these > >> warnings: > >> > >> In file included from net/socket.c:94: > >> include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > >> > >> CONFIG_COMPAT is not set. > >> > >> Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net: > >> Introduce recvmmsg socket syscall"). > ... > > > > I also get these for i386 and sparc32 defconfig builds. > > I've asked Arnaldo to work on fixing this. I'll fix that early tomorrow. - Arnaldo ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 1/1] Re: linux-next: net tree build warnings 2009-10-14 22:11 ` David Miller 2009-10-15 1:55 ` Arnaldo Carvalho de Melo @ 2009-10-17 2:10 ` Arnaldo Carvalho de Melo 2009-10-20 8:09 ` David Miller 1 sibling, 1 reply; 27+ messages in thread From: Arnaldo Carvalho de Melo @ 2009-10-17 2:10 UTC (permalink / raw) To: David Miller; +Cc: sfr, linux-next, linux-kernel Em Wed, Oct 14, 2009 at 03:11:37PM -0700, David Miller escreveu: > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 14 Oct 2009 15:34:50 +1100 > > On Wed, 14 Oct 2009 15:20:00 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > >> Today's linux-next build (powerpc ppc44x_defconfig) produced these > >> warnings: > >> In file included from net/socket.c:94: > >> include/net/compat.h:45: warning: 'struct compat_mmsghdr' declared inside parameter list > >> CONFIG_COMPAT is not set. > >> Caused by commit a2e2725541fad72416326798c2d7fa4dafb7d337 ("net: > >> Introduce recvmmsg socket syscall"). > > I also get these for i386 and sparc32 defconfig builds. This one should fix it, thanks for the report! - Arnaldo >From ea9776634ed9b0b4a92c53002ea225bca143f47e Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Date: Fri, 16 Oct 2009 23:07:15 -0300 Subject: [PATCH] net: Avoid compiler warning for mmsghdr when CONFIG_COMPAT is not selected Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> --- include/net/compat.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/include/net/compat.h b/include/net/compat.h index 9679f05..3c7d4e3 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -33,7 +33,11 @@ extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *); #else /* defined(CONFIG_COMPAT) */ -#define compat_msghdr msghdr /* to avoid compiler warnings */ +/* + * To avoid compiler warnings: + */ +#define compat_msghdr msghdr +#define compat_mmsghdr mmsghdr #endif /* defined(CONFIG_COMPAT) */ extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); -- 1.6.2.5 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 1/1] Re: linux-next: net tree build warnings 2009-10-17 2:10 ` [PATCH 1/1] " Arnaldo Carvalho de Melo @ 2009-10-20 8:09 ` David Miller 2009-10-20 8:14 ` Stephen Rothwell 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2009-10-20 8:09 UTC (permalink / raw) To: acme; +Cc: sfr, linux-next, linux-kernel From: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri, 16 Oct 2009 23:10:24 -0300 > Subject: [PATCH] net: Avoid compiler warning for mmsghdr when CONFIG_COMPAT is not selected > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Applied, please CC: networking patches to netdev in the future. Thanks. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 1/1] Re: linux-next: net tree build warnings 2009-10-20 8:09 ` David Miller @ 2009-10-20 8:14 ` Stephen Rothwell 2009-10-20 8:18 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-10-20 8:14 UTC (permalink / raw) To: David Miller; +Cc: acme, linux-next, linux-kernel [-- Attachment #1: Type: text/plain, Size: 352 bytes --] Hi Dave, On Tue, 20 Oct 2009 01:09:43 -0700 (PDT) David Miller <davem@davemloft.net> wrote: > > Applied, please CC: networking patches to netdev in the future. Should I maybe cc all the linux-next emails about the net tree to netdev? -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 1/1] Re: linux-next: net tree build warnings 2009-10-20 8:14 ` Stephen Rothwell @ 2009-10-20 8:18 ` David Miller 2009-10-20 8:22 ` Stephen Rothwell 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2009-10-20 8:18 UTC (permalink / raw) To: sfr; +Cc: acme, linux-next, linux-kernel From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Tue, 20 Oct 2009 19:14:57 +1100 > On Tue, 20 Oct 2009 01:09:43 -0700 (PDT) David Miller <davem@davemloft.net> wrote: >> >> Applied, please CC: networking patches to netdev in the future. > > Should I maybe cc all the linux-next emails about the net tree to netdev? Sure, that would help me track things. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 1/1] Re: linux-next: net tree build warnings 2009-10-20 8:18 ` David Miller @ 2009-10-20 8:22 ` Stephen Rothwell 0 siblings, 0 replies; 27+ messages in thread From: Stephen Rothwell @ 2009-10-20 8:22 UTC (permalink / raw) To: David Miller; +Cc: acme, linux-next, linux-kernel [-- Attachment #1: Type: text/plain, Size: 383 bytes --] On Tue, 20 Oct 2009 01:18:16 -0700 (PDT) David Miller <davem@davemloft.net> wrote: > > From: Stephen Rothwell <sfr@canb.auug.org.au> > > > > Should I maybe cc all the linux-next emails about the net tree to netdev? > > Sure, that would help me track things. Done. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2009-09-04 4:34 Stephen Rothwell 2009-09-04 4:35 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-09-04 4:34 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, linux-kernel, Stephen Hemminger, netdev [-- Attachment #1: Type: text/plain, Size: 554 bytes --] Hi Dave, Today's linux-next build (x86_64 allmodconfig gcc-4.4.0) produced thes warnings: drivers/net/wan/dlci.c: In function 'dlci_transmit': drivers/net/wan/dlci.c:205: warning: enumeration value 'NETDEV_TX_LOCKED' not handled in switch drivers/net/wan/dlci.c:215: warning: case value '2' not in enumerated type 'netdev_tx_t' Introduced by commit d71a674922e7519edb477ecb585e7d29d69c7aa7 ("wan: convert drivers to netdev_tx_t"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-09-04 4:34 Stephen Rothwell @ 2009-09-04 4:35 ` David Miller 0 siblings, 0 replies; 27+ messages in thread From: David Miller @ 2009-09-04 4:35 UTC (permalink / raw) To: sfr; +Cc: linux-next, linux-kernel, shemminger, netdev From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Fri, 4 Sep 2009 14:34:39 +1000 > Today's linux-next build (x86_64 allmodconfig gcc-4.4.0) produced thes > warnings: > > drivers/net/wan/dlci.c: In function 'dlci_transmit': > drivers/net/wan/dlci.c:205: warning: enumeration value 'NETDEV_TX_LOCKED' not handled in switch > drivers/net/wan/dlci.c:215: warning: case value '2' not in enumerated type 'netdev_tx_t' > > Introduced by commit d71a674922e7519edb477ecb585e7d29d69c7aa7 ("wan: > convert drivers to netdev_tx_t"). I know about it, this code sucks and it's not easy to quelch that one trivially. ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2009-06-11 4:55 Stephen Rothwell 2009-06-11 6:47 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-06-11 4:55 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, linux-kernel, Sergey Lapin [-- Attachment #1: Type: text/plain, Size: 645 bytes --] Hi Dave, Today's linux-next build (x86_64 allmodconfig) produced these warnings: net/ieee802154/raw.c: In function 'raw_sendmsg': net/ieee802154/raw.c:135: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t' net/ieee802154/dgram.c: In function 'dgram_sendmsg': net/ieee802154/dgram.c:251: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t' Introduced by commit 9ec7671603573ede31207eb5b0b3e1aa211b2854 ("net: add IEEE 802.15.4 socket family implementation"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-06-11 4:55 Stephen Rothwell @ 2009-06-11 6:47 ` David Miller 2009-06-11 7:20 ` Stephen Rothwell 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2009-06-11 6:47 UTC (permalink / raw) To: sfr; +Cc: linux-next, linux-kernel, slapin From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Thu, 11 Jun 2009 14:55:41 +1000 > Today's linux-next build (x86_64 allmodconfig) produced these warnings: > > net/ieee802154/raw.c: In function 'raw_sendmsg': > net/ieee802154/raw.c:135: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t' > net/ieee802154/dgram.c: In function 'dgram_sendmsg': > net/ieee802154/dgram.c:251: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t' > > Introduced by commit 9ec7671603573ede31207eb5b0b3e1aa211b2854 ("net: add > IEEE 802.15.4 socket family implementation"). Similar to what you reported yesterday :-) I'll get this fixed. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-06-11 6:47 ` David Miller @ 2009-06-11 7:20 ` Stephen Rothwell 0 siblings, 0 replies; 27+ messages in thread From: Stephen Rothwell @ 2009-06-11 7:20 UTC (permalink / raw) To: David Miller; +Cc: linux-next, linux-kernel, slapin [-- Attachment #1: Type: text/plain, Size: 373 bytes --] Hi Dave, On Wed, 10 Jun 2009 23:47:57 -0700 (PDT) David Miller <davem@davemloft.net> wrote: > > Similar to what you reported yesterday :-) I wondered if I had done that - looks like senility is creeping up on me. :-( > I'll get this fixed. Thanks. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2009-04-29 4:59 Stephen Rothwell 2009-04-29 6:02 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-04-29 4:59 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, Alexander Beregalov [-- Attachment #1: Type: text/plain, Size: 2051 bytes --] Hi Dave, Today's linux-next build (x86_64 allmodconfig) produced these warnings: drivers/net/vxge/vxge-traffic.c: In function '__vxge_hw_vpath_alarm_process': drivers/net/vxge/vxge-traffic.c:1924: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:1934: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:1948: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:1978: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:1999: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2006: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2029: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2038: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2060: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2076: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2085: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2094: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2101: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2125: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2133: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2141: warning: comparison of distinct pointer types lacks a cast drivers/net/vxge/vxge-traffic.c:2148: warning: comparison of distinct pointer types lacks a cast Caused by commit 011983048a120e520147361be1067dd82343038e ("vxge: use max() instead of VXGE_HW_SET_LEVEL"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-04-29 4:59 Stephen Rothwell @ 2009-04-29 6:02 ` David Miller 2009-04-30 0:54 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2009-04-29 6:02 UTC (permalink / raw) To: sfr; +Cc: linux-next, a.beregalov From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Wed, 29 Apr 2009 14:59:21 +1000 > Caused by commit 011983048a120e520147361be1067dd82343038e ("vxge: use max() > instead of VXGE_HW_SET_LEVEL"). Maybe that's why the macro was used in the first place :-) We probably have to use something like max_t() here, and to me that's worse than the macro it is replacing. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-04-29 6:02 ` David Miller @ 2009-04-30 0:54 ` David Miller 2009-04-30 7:06 ` Stephen Rothwell 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2009-04-30 0:54 UTC (permalink / raw) To: sfr; +Cc: linux-next, a.beregalov From: David Miller <davem@davemloft.net> Date: Tue, 28 Apr 2009 23:02:32 -0700 (PDT) > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 29 Apr 2009 14:59:21 +1000 > >> Caused by commit 011983048a120e520147361be1067dd82343038e ("vxge: use max() >> instead of VXGE_HW_SET_LEVEL"). > > Maybe that's why the macro was used in the first place :-) > > We probably have to use something like max_t() here, and to me that's > worse than the macro it is replacing. Nobody is doing anything about this so I'm simply reverting. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-04-30 0:54 ` David Miller @ 2009-04-30 7:06 ` Stephen Rothwell 0 siblings, 0 replies; 27+ messages in thread From: Stephen Rothwell @ 2009-04-30 7:06 UTC (permalink / raw) To: David Miller; +Cc: linux-next, a.beregalov [-- Attachment #1: Type: text/plain, Size: 798 bytes --] Hi Dave, On Wed, 29 Apr 2009 17:54:13 -0700 (PDT) David Miller <davem@davemloft.net> wrote: > > From: David Miller <davem@davemloft.net> > Date: Tue, 28 Apr 2009 23:02:32 -0700 (PDT) > > > From: Stephen Rothwell <sfr@canb.auug.org.au> > > Date: Wed, 29 Apr 2009 14:59:21 +1000 > > > >> Caused by commit 011983048a120e520147361be1067dd82343038e ("vxge: use max() > >> instead of VXGE_HW_SET_LEVEL"). > > > > Maybe that's why the macro was used in the first place :-) > > > > We probably have to use something like max_t() here, and to me that's > > worse than the macro it is replacing. > > Nobody is doing anything about this so I'm simply reverting. OK, thanks. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2009-03-26 6:37 Stephen Rothwell 2009-03-26 7:50 ` Eric Leblond 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-03-26 6:37 UTC (permalink / raw) To: David S. Miller Cc: linux-next, Eric Leblond, Patrick McHardy, netdev, netfilter-devel [-- Attachment #1: Type: text/plain, Size: 1140 bytes --] Hi Dave, Today's linux-next build (x86_64 allmodconfig) produced these warnings: net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init': net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini': net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init': net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini': net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type Caused by commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter: use a linked list of loggers") which removed const from the "struct nf_logger *" arguments. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-03-26 6:37 Stephen Rothwell @ 2009-03-26 7:50 ` Eric Leblond 2009-03-26 13:17 ` Patrick McHardy 2009-03-26 22:01 ` Stephen Rothwell 0 siblings, 2 replies; 27+ messages in thread From: Eric Leblond @ 2009-03-26 7:50 UTC (permalink / raw) To: Stephen Rothwell Cc: David S. Miller, linux-next, Patrick McHardy, netdev, netfilter-devel [-- Attachment #1: Type: text/plain, Size: 1744 bytes --] Hi Stephen, Le jeudi 26 mars 2009 à 17:37 +1100, Stephen Rothwell a écrit : > Hi Dave, > > Today's linux-next build (x86_64 allmodconfig) produced these warnings: > > net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init': > net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type > net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini': > net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type > net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init': > net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type > net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini': > net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type Thanks a lot for pointing this. I stupidely forgot to build this module during my testing. I've made the necessary modifications and a patch fixing this will follow this mail. Doing some testing of the ebt_ulog module, I've found some problems. One of them was the following messages: sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention sys_init_module: loading module anyway... Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146 Call Trace: [<c0441b81>] ? printk+0xf/0x16 [<c02311af>] sys_init_module+0x107/0x186 [<c0202cfa>] syscall_call+0x7/0xb A patch fixing this will also follow. BR, -- Eric Leblond <eric@inl.fr> INL: http://www.inl.fr/ NuFW: http://www.nufw.org/ [-- Attachment #2: Ceci est une partie de message numériquement signée --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-03-26 7:50 ` Eric Leblond @ 2009-03-26 13:17 ` Patrick McHardy 2009-03-26 22:01 ` Stephen Rothwell 1 sibling, 0 replies; 27+ messages in thread From: Patrick McHardy @ 2009-03-26 13:17 UTC (permalink / raw) To: Eric Leblond Cc: Stephen Rothwell, David S. Miller, linux-next, netdev, netfilter-devel Eric Leblond wrote: > Hi Stephen, > > Le jeudi 26 mars 2009 à 17:37 +1100, Stephen Rothwell a écrit : >> Hi Dave, >> >> Today's linux-next build (x86_64 allmodconfig) produced these warnings: >> >> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_init': >> net/bridge/netfilter/ebt_log.c:230: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type >> net/bridge/netfilter/ebt_log.c: In function 'ebt_log_fini': >> net/bridge/netfilter/ebt_log.c:236: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type >> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_init': >> net/bridge/netfilter/ebt_ulog.c:317: warning: passing argument 2 of 'nf_log_register' discards qualifiers from pointer target type >> net/bridge/netfilter/ebt_ulog.c: In function 'ebt_ulog_fini': >> net/bridge/netfilter/ebt_ulog.c:327: warning: passing argument 1 of 'nf_log_unregister' discards qualifiers from pointer target type > > Thanks a lot for pointing this. I stupidely forgot to build this module > during my testing. Same here, I seem to have accidentally disabled bridging in my test builds, sorry. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" 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] 27+ messages in thread
* Re: linux-next: net tree build warnings 2009-03-26 7:50 ` Eric Leblond 2009-03-26 13:17 ` Patrick McHardy @ 2009-03-26 22:01 ` Stephen Rothwell 1 sibling, 0 replies; 27+ messages in thread From: Stephen Rothwell @ 2009-03-26 22:01 UTC (permalink / raw) To: Eric Leblond Cc: David S. Miller, linux-next, Patrick McHardy, netdev, netfilter-devel [-- Attachment #1: Type: text/plain, Size: 397 bytes --] Hi Eric, On Thu, 26 Mar 2009 08:50:19 +0100 Eric Leblond <eric@inl.fr> wrote: > > Thanks a lot for pointing this. I stupidely forgot to build this module > during my testing. > > I've made the necessary modifications and a patch fixing this will > follow this mail. Thanks. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2009-03-16 6:03 Stephen Rothwell 2009-03-16 6:05 ` Dhananjay Phadke 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2009-03-16 6:03 UTC (permalink / raw) To: David S. Miller; +Cc: linux-next, Dhananjay Phadke [-- Attachment #1: Type: text/plain, Size: 1080 bytes --] Hi Dave, Today's (and for a while) linux-next build (x86_64 allmodconfig) produced these warnings: drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_load_firmware': drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior Introduced by commit 567c6c4e2b92f4b8632b043f9395b216b7e7c3ce ("netxen: firmware download improvements"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: linux-next: net tree build warnings 2009-03-16 6:03 Stephen Rothwell @ 2009-03-16 6:05 ` Dhananjay Phadke 0 siblings, 0 replies; 27+ messages in thread From: Dhananjay Phadke @ 2009-03-16 6:05 UTC (permalink / raw) To: Stephen Rothwell, David S. Miller; +Cc: linux-next This has been introduced before 567c6c4e2b92f4b86, I'll post a fix (needs a little work). Thanks, -Dhananjay ________________________________________ From: Stephen Rothwell [sfr@canb.auug.org.au] Sent: Sunday, March 15, 2009 11:03 PM To: David S. Miller Cc: linux-next@vger.kernel.org; Dhananjay Phadke Subject: linux-next: net tree build warnings Hi Dave, Today's (and for a while) linux-next build (x86_64 allmodconfig) produced these warnings: drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_load_firmware': drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1146: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior drivers/net/netxen/netxen_nic_hw.c:1159: warning: comparison with string literal results in unspecified behavior Introduced by commit 567c6c4e2b92f4b8632b043f9395b216b7e7c3ce ("netxen: firmware download improvements"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ ^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warnings @ 2008-12-17 7:22 Stephen Rothwell 2008-12-17 7:53 ` David Miller 0 siblings, 1 reply; 27+ messages in thread From: Stephen Rothwell @ 2008-12-17 7:22 UTC (permalink / raw) To: David S. Miller Cc: linux-next, Steve Glendinning, Yaniv Rosner, Eilong Greenstein [-- Attachment #1: Type: text/plain, Size: 814 bytes --] Hi Dave, Today's linux-next build (x86_64 allmodconfig) produced these warnings: In file included from drivers/net/bnx2x_main.c:58: drivers/net/bnx2x_link.h:30:1: warning: "FLOW_CTRL_TX" redefined In file included from drivers/net/bnx2x_main.c:40: include/linux/mii.h:139:1: warning: this is the location of the previous definition In file included from drivers/net/bnx2x_main.c:58: drivers/net/bnx2x_link.h:31:1: warning: "FLOW_CTRL_RX" redefined In file included from drivers/net/bnx2x_main.c:40: include/linux/mii.h:140:1: warning: this is the location of the previous definition Caused by commit e18ce3465477502108187c6c08b6423fb784a313 ("net: Move flow control definitions to mii.h"). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2008-12-17 7:22 Stephen Rothwell @ 2008-12-17 7:53 ` David Miller 2008-12-17 8:04 ` Eilon Greenstein 0 siblings, 1 reply; 27+ messages in thread From: David Miller @ 2008-12-17 7:53 UTC (permalink / raw) To: sfr; +Cc: linux-next, steve.glendinning, yanivr, eilong From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Wed, 17 Dec 2008 18:22:24 +1100 > Today's linux-next build (x86_64 allmodconfig) produced these warnings: > > In file included from drivers/net/bnx2x_main.c:58: > drivers/net/bnx2x_link.h:30:1: warning: "FLOW_CTRL_TX" redefined > In file included from drivers/net/bnx2x_main.c:40: > include/linux/mii.h:139:1: warning: this is the location of the previous definition > In file included from drivers/net/bnx2x_main.c:58: > drivers/net/bnx2x_link.h:31:1: warning: "FLOW_CTRL_RX" redefined > In file included from drivers/net/bnx2x_main.c:40: > include/linux/mii.h:140:1: warning: this is the location of the previous definition > > Caused by commit e18ce3465477502108187c6c08b6423fb784a313 ("net: Move flow control definitions to mii.h"). > -- Thanks, I'll fix this up with the following two commits: -------------------- bnx2: Don't redefine FLOW_CTRL_{RX,TX}. They are provided generically by linux/mii.h now. Signed-off-by: David S. Miller <davem@davemloft.net> --- drivers/net/bnx2.h | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 88f962b..900641a 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -6848,9 +6848,6 @@ struct bnx2 { u8 flow_ctrl; /* actual flow ctrl settings */ /* may be different from */ /* req_flow_ctrl if autoneg */ -#define FLOW_CTRL_TX 1 -#define FLOW_CTRL_RX 2 - u32 advertising; u8 req_flow_ctrl; /* flow ctrl advertisement */ -- 1.5.6.5 -------------------- bnx2x: Fix namespace collision with FLOW_CTRL_{TX,RX} These are now defined in linux/mii.h and the bnx2x driver defines different values which are shared with hardware data structures. So add a "BNX2X_" prefix to these macro names. Based upon a report from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net> --- drivers/net/bnx2x_link.c | 72 +++++++++++++++++++++++----------------------- drivers/net/bnx2x_link.h | 10 +++--- drivers/net/bnx2x_main.c | 38 ++++++++++++------------ 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index 4ce7fe9..67de94f 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c @@ -289,7 +289,7 @@ static u8 bnx2x_emac_enable(struct link_params *params, /* pause enable/disable */ bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_RX_MODE, EMAC_RX_MODE_FLOW_EN); - if (vars->flow_ctrl & FLOW_CTRL_RX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_RX) bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_RX_MODE, EMAC_RX_MODE_FLOW_EN); @@ -297,7 +297,7 @@ static u8 bnx2x_emac_enable(struct link_params *params, bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_TX_MODE, (EMAC_TX_MODE_EXT_PAUSE_EN | EMAC_TX_MODE_FLOW_EN)); - if (vars->flow_ctrl & FLOW_CTRL_TX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE, (EMAC_TX_MODE_EXT_PAUSE_EN | @@ -333,7 +333,7 @@ static u8 bnx2x_emac_enable(struct link_params *params, /* enable the NIG in/out to the emac */ REG_WR(bp, NIG_REG_EMAC0_IN_EN + port*4, 0x1); val = 0; - if (vars->flow_ctrl & FLOW_CTRL_TX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) val = 1; REG_WR(bp, NIG_REG_EMAC0_PAUSE_OUT_EN + port*4, val); @@ -396,7 +396,7 @@ static u8 bnx2x_bmac_enable(struct link_params *params, struct link_vars *vars, /* tx control */ val = 0xc0; - if (vars->flow_ctrl & FLOW_CTRL_TX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) val |= 0x800000; wb_data[0] = val; wb_data[1] = 0; @@ -423,7 +423,7 @@ static u8 bnx2x_bmac_enable(struct link_params *params, struct link_vars *vars, /* rx control set to don't strip crc */ val = 0x14; - if (vars->flow_ctrl & FLOW_CTRL_RX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_RX) val |= 0x20; wb_data[0] = val; wb_data[1] = 0; @@ -460,7 +460,7 @@ static u8 bnx2x_bmac_enable(struct link_params *params, struct link_vars *vars, REG_WR(bp, NIG_REG_XGXS_LANE_SEL_P0 + port*4, 0x0); REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 0x0); val = 0; - if (vars->flow_ctrl & FLOW_CTRL_TX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) val = 1; REG_WR(bp, NIG_REG_BMAC0_PAUSE_OUT_EN + port*4, val); REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0x0); @@ -580,14 +580,14 @@ void bnx2x_link_status_update(struct link_params *params, } if (vars->link_status & LINK_STATUS_TX_FLOW_CONTROL_ENABLED) - vars->flow_ctrl |= FLOW_CTRL_TX; + vars->flow_ctrl |= BNX2X_FLOW_CTRL_TX; else - vars->flow_ctrl &= ~FLOW_CTRL_TX; + vars->flow_ctrl &= ~BNX2X_FLOW_CTRL_TX; if (vars->link_status & LINK_STATUS_RX_FLOW_CONTROL_ENABLED) - vars->flow_ctrl |= FLOW_CTRL_RX; + vars->flow_ctrl |= BNX2X_FLOW_CTRL_RX; else - vars->flow_ctrl &= ~FLOW_CTRL_RX; + vars->flow_ctrl &= ~BNX2X_FLOW_CTRL_RX; if (vars->phy_flags & PHY_XGXS_FLAG) { if (vars->line_speed && @@ -618,7 +618,7 @@ void bnx2x_link_status_update(struct link_params *params, vars->line_speed = 0; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; /* indicate no mac active */ vars->mac_type = MAC_TYPE_NONE; @@ -691,7 +691,7 @@ static u8 bnx2x_pbf_update(struct link_params *params, u32 flow_ctrl, return -EINVAL; } - if (flow_ctrl & FLOW_CTRL_RX || + if (flow_ctrl & BNX2X_FLOW_CTRL_RX || line_speed == SPEED_10 || line_speed == SPEED_100 || line_speed == SPEED_1000 || @@ -1300,8 +1300,8 @@ static void bnx2x_calc_ieee_aneg_adv(struct link_params *params, u32 *ieee_fc) * Please refer to Table 28B-3 of the 802.3ab-1999 spec */ switch (params->req_flow_ctrl) { - case FLOW_CTRL_AUTO: - if (params->req_fc_auto_adv == FLOW_CTRL_BOTH) { + case BNX2X_FLOW_CTRL_AUTO: + if (params->req_fc_auto_adv == BNX2X_FLOW_CTRL_BOTH) { *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH; } else { @@ -1309,17 +1309,17 @@ static void bnx2x_calc_ieee_aneg_adv(struct link_params *params, u32 *ieee_fc) MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC; } break; - case FLOW_CTRL_TX: + case BNX2X_FLOW_CTRL_TX: *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC; break; - case FLOW_CTRL_RX: - case FLOW_CTRL_BOTH: + case BNX2X_FLOW_CTRL_RX: + case BNX2X_FLOW_CTRL_BOTH: *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH; break; - case FLOW_CTRL_NONE: + case BNX2X_FLOW_CTRL_NONE: default: *ieee_fc |= MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_NONE; break; @@ -1463,18 +1463,18 @@ static void bnx2x_pause_resolve(struct link_vars *vars, u32 pause_result) { /* LD LP */ switch (pause_result) { /* ASYM P ASYM P */ case 0xb: /* 1 0 1 1 */ - vars->flow_ctrl = FLOW_CTRL_TX; + vars->flow_ctrl = BNX2X_FLOW_CTRL_TX; break; case 0xe: /* 1 1 1 0 */ - vars->flow_ctrl = FLOW_CTRL_RX; + vars->flow_ctrl = BNX2X_FLOW_CTRL_RX; break; case 0x5: /* 0 1 0 1 */ case 0x7: /* 0 1 1 1 */ case 0xd: /* 1 1 0 1 */ case 0xf: /* 1 1 1 1 */ - vars->flow_ctrl = FLOW_CTRL_BOTH; + vars->flow_ctrl = BNX2X_FLOW_CTRL_BOTH; break; default: @@ -1531,7 +1531,7 @@ static u8 bnx2x_ext_phy_resove_fc(struct link_params *params, DP(NETIF_MSG_LINK, "Ext PHY pause result 0x%x \n", pause_result); bnx2x_pause_resolve(vars, pause_result); - if (vars->flow_ctrl == FLOW_CTRL_NONE && + if (vars->flow_ctrl == BNX2X_FLOW_CTRL_NONE && ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073) { bnx2x_cl45_read(bp, port, ext_phy_type, @@ -1567,10 +1567,10 @@ static void bnx2x_flow_ctrl_resolve(struct link_params *params, u16 lp_pause; /* link partner */ u16 pause_result; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; /* resolve from gp_status in case of AN complete and not sgmii */ - if ((params->req_flow_ctrl == FLOW_CTRL_AUTO) && + if ((params->req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && (gp_status & MDIO_AN_CL73_OR_37_COMPLETE) && (!(vars->phy_flags & PHY_SGMII_FLAG)) && (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == @@ -1591,11 +1591,11 @@ static void bnx2x_flow_ctrl_resolve(struct link_params *params, MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_MASK)>>7; DP(NETIF_MSG_LINK, "pause_result 0x%x\n", pause_result); bnx2x_pause_resolve(vars, pause_result); - } else if ((params->req_flow_ctrl == FLOW_CTRL_AUTO) && + } else if ((params->req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && (bnx2x_ext_phy_resove_fc(params, vars))) { return; } else { - if (params->req_flow_ctrl == FLOW_CTRL_AUTO) + if (params->req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) vars->flow_ctrl = params->req_fc_auto_adv; else vars->flow_ctrl = params->req_flow_ctrl; @@ -1728,11 +1728,11 @@ static u8 bnx2x_link_settings_status(struct link_params *params, LINK_STATUS_PARALLEL_DETECTION_USED; } - if (vars->flow_ctrl & FLOW_CTRL_TX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_TX) vars->link_status |= LINK_STATUS_TX_FLOW_CONTROL_ENABLED; - if (vars->flow_ctrl & FLOW_CTRL_RX) + if (vars->flow_ctrl & BNX2X_FLOW_CTRL_RX) vars->link_status |= LINK_STATUS_RX_FLOW_CONTROL_ENABLED; @@ -1742,7 +1742,7 @@ static u8 bnx2x_link_settings_status(struct link_params *params, vars->phy_link_up = 0; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->autoneg = AUTO_NEG_DISABLED; vars->mac_type = MAC_TYPE_NONE; } @@ -3924,7 +3924,7 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 0; vars->line_speed = 0; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->mac_type = MAC_TYPE_NONE; if (params->switch_cfg == SWITCH_CFG_1G) @@ -3946,12 +3946,12 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 1; vars->line_speed = SPEED_10000; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->link_status = (LINK_STATUS_LINK_UP | LINK_10GTFD); /* enable on E1.5 FPGA */ if (CHIP_IS_E1H(bp)) { vars->flow_ctrl |= - (FLOW_CTRL_TX | FLOW_CTRL_RX); + (BNX2X_FLOW_CTRL_TX | BNX2X_FLOW_CTRL_RX); vars->link_status |= (LINK_STATUS_TX_FLOW_CONTROL_ENABLED | LINK_STATUS_RX_FLOW_CONTROL_ENABLED); @@ -3974,7 +3974,7 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 1; vars->line_speed = SPEED_10000; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->link_status = (LINK_STATUS_LINK_UP | LINK_10GTFD); bnx2x_bmac_enable(params, vars, 0); @@ -3994,7 +3994,7 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 1; vars->line_speed = SPEED_10000; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->mac_type = MAC_TYPE_BMAC; vars->phy_flags = PHY_XGXS_FLAG; @@ -4009,7 +4009,7 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 1; vars->line_speed = SPEED_1000; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->mac_type = MAC_TYPE_EMAC; vars->phy_flags = PHY_XGXS_FLAG; @@ -4026,7 +4026,7 @@ u8 bnx2x_phy_init(struct link_params *params, struct link_vars *vars) vars->link_up = 1; vars->line_speed = SPEED_10000; vars->duplex = DUPLEX_FULL; - vars->flow_ctrl = FLOW_CTRL_NONE; + vars->flow_ctrl = BNX2X_FLOW_CTRL_NONE; vars->phy_flags = PHY_XGXS_FLAG; diff --git a/drivers/net/bnx2x_link.h b/drivers/net/bnx2x_link.h index 86d54a1..47cb585 100644 --- a/drivers/net/bnx2x_link.h +++ b/drivers/net/bnx2x_link.h @@ -26,11 +26,11 @@ -#define FLOW_CTRL_AUTO PORT_FEATURE_FLOW_CONTROL_AUTO -#define FLOW_CTRL_TX PORT_FEATURE_FLOW_CONTROL_TX -#define FLOW_CTRL_RX PORT_FEATURE_FLOW_CONTROL_RX -#define FLOW_CTRL_BOTH PORT_FEATURE_FLOW_CONTROL_BOTH -#define FLOW_CTRL_NONE PORT_FEATURE_FLOW_CONTROL_NONE +#define BNX2X_FLOW_CTRL_AUTO PORT_FEATURE_FLOW_CONTROL_AUTO +#define BNX2X_FLOW_CTRL_TX PORT_FEATURE_FLOW_CONTROL_TX +#define BNX2X_FLOW_CTRL_RX PORT_FEATURE_FLOW_CONTROL_RX +#define BNX2X_FLOW_CTRL_BOTH PORT_FEATURE_FLOW_CONTROL_BOTH +#define BNX2X_FLOW_CTRL_NONE PORT_FEATURE_FLOW_CONTROL_NONE #define SPEED_AUTO_NEG 0 #define SPEED_12000 12000 diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index a9c4de0..24d2ae8 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -1921,10 +1921,10 @@ static void bnx2x_link_report(struct bnx2x *bp) else printk("half duplex"); - if (bp->link_vars.flow_ctrl != FLOW_CTRL_NONE) { - if (bp->link_vars.flow_ctrl & FLOW_CTRL_RX) { + if (bp->link_vars.flow_ctrl != BNX2X_FLOW_CTRL_NONE) { + if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) { printk(", receive "); - if (bp->link_vars.flow_ctrl & FLOW_CTRL_TX) + if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) printk("& transmit "); } else { printk(", transmit "); @@ -1948,11 +1948,11 @@ static u8 bnx2x_initial_phy_init(struct bnx2x *bp) /* It is recommended to turn off RX FC for jumbo frames for better performance */ if (IS_E1HMF(bp)) - bp->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH; + bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_BOTH; else if (bp->dev->mtu > 5000) - bp->link_params.req_fc_auto_adv = FLOW_CTRL_TX; + bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_TX; else - bp->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH; + bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_BOTH; bnx2x_acquire_phy_lock(bp); rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars); @@ -7362,9 +7362,9 @@ static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp) bp->link_params.req_flow_ctrl = (bp->port.link_config & PORT_FEATURE_FLOW_CONTROL_MASK); - if ((bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) && + if ((bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && !(bp->port.supported & SUPPORTED_Autoneg)) - bp->link_params.req_flow_ctrl = FLOW_CTRL_NONE; + bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_NONE; BNX2X_DEV_INFO("req_line_speed %d req_duplex %d req_flow_ctrl 0x%x" " advertising 0x%x\n", @@ -8353,13 +8353,13 @@ static void bnx2x_get_pauseparam(struct net_device *dev, { struct bnx2x *bp = netdev_priv(dev); - epause->autoneg = (bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) && + epause->autoneg = (bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && (bp->link_params.req_line_speed == SPEED_AUTO_NEG); - epause->rx_pause = ((bp->link_vars.flow_ctrl & FLOW_CTRL_RX) == - FLOW_CTRL_RX); - epause->tx_pause = ((bp->link_vars.flow_ctrl & FLOW_CTRL_TX) == - FLOW_CTRL_TX); + epause->rx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) == + BNX2X_FLOW_CTRL_RX); + epause->tx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) == + BNX2X_FLOW_CTRL_TX); DP(NETIF_MSG_LINK, "ethtool_pauseparam: cmd %d\n" DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", @@ -8378,16 +8378,16 @@ static int bnx2x_set_pauseparam(struct net_device *dev, DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", epause->cmd, epause->autoneg, epause->rx_pause, epause->tx_pause); - bp->link_params.req_flow_ctrl = FLOW_CTRL_AUTO; + bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_AUTO; if (epause->rx_pause) - bp->link_params.req_flow_ctrl |= FLOW_CTRL_RX; + bp->link_params.req_flow_ctrl |= BNX2X_FLOW_CTRL_RX; if (epause->tx_pause) - bp->link_params.req_flow_ctrl |= FLOW_CTRL_TX; + bp->link_params.req_flow_ctrl |= BNX2X_FLOW_CTRL_TX; - if (bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) - bp->link_params.req_flow_ctrl = FLOW_CTRL_NONE; + if (bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) + bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_NONE; if (epause->autoneg) { if (!(bp->port.supported & SUPPORTED_Autoneg)) { @@ -8396,7 +8396,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev, } if (bp->link_params.req_line_speed == SPEED_AUTO_NEG) - bp->link_params.req_flow_ctrl = FLOW_CTRL_AUTO; + bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_AUTO; } DP(NETIF_MSG_LINK, -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warnings 2008-12-17 7:53 ` David Miller @ 2008-12-17 8:04 ` Eilon Greenstein 0 siblings, 0 replies; 27+ messages in thread From: Eilon Greenstein @ 2008-12-17 8:04 UTC (permalink / raw) To: David Miller; +Cc: sfr, linux-next, steve.glendinning, Yaniv Rosner On Tue, 2008-12-16 at 23:53 -0800, David Miller wrote: > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 17 Dec 2008 18:22:24 +1100 > > > Today's linux-next build (x86_64 allmodconfig) produced these warnings: > > > > In file included from drivers/net/bnx2x_main.c:58: > > drivers/net/bnx2x_link.h:30:1: warning: "FLOW_CTRL_TX" redefined > > In file included from drivers/net/bnx2x_main.c:40: > > include/linux/mii.h:139:1: warning: this is the location of the previous definition > > In file included from drivers/net/bnx2x_main.c:58: > > drivers/net/bnx2x_link.h:31:1: warning: "FLOW_CTRL_RX" redefined > > In file included from drivers/net/bnx2x_main.c:40: > > include/linux/mii.h:140:1: warning: this is the location of the previous definition > > > > Caused by commit e18ce3465477502108187c6c08b6423fb784a313 ("net: Move flow control definitions to mii.h"). > > -- > > Thanks, I'll fix this up with the following two commits: > .... > -------------------- > bnx2x: Fix namespace collision with FLOW_CTRL_{TX,RX} > > These are now defined in linux/mii.h and the bnx2x driver > defines different values which are shared with hardware > data structures. > > So add a "BNX2X_" prefix to these macro names. > > Based upon a report from Stephen Rothwell. > > Signed-off-by: David S. Miller <davem@davemloft.net> > --- > drivers/net/bnx2x_link.c | 72 +++++++++++++++++++++++----------------------- > drivers/net/bnx2x_link.h | 10 +++--- > drivers/net/bnx2x_main.c | 38 ++++++++++++------------ > 3 files changed, 60 insertions(+), 60 deletions(-) Thanks Dave - I was just writing the email header for the exact same fix ;) Funny how we both miraculously chose the same prefix... Thanks, Eilon ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2009-10-20 8:22 UTC | newest] Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-10-14 4:20 linux-next: net tree build warnings Stephen Rothwell 2009-10-14 4:34 ` Stephen Rothwell 2009-10-14 22:11 ` David Miller 2009-10-15 1:55 ` Arnaldo Carvalho de Melo 2009-10-17 2:10 ` [PATCH 1/1] " Arnaldo Carvalho de Melo 2009-10-20 8:09 ` David Miller 2009-10-20 8:14 ` Stephen Rothwell 2009-10-20 8:18 ` David Miller 2009-10-20 8:22 ` Stephen Rothwell -- strict thread matches above, loose matches on Subject: below -- 2009-09-04 4:34 Stephen Rothwell 2009-09-04 4:35 ` David Miller 2009-06-11 4:55 Stephen Rothwell 2009-06-11 6:47 ` David Miller 2009-06-11 7:20 ` Stephen Rothwell 2009-04-29 4:59 Stephen Rothwell 2009-04-29 6:02 ` David Miller 2009-04-30 0:54 ` David Miller 2009-04-30 7:06 ` Stephen Rothwell 2009-03-26 6:37 Stephen Rothwell 2009-03-26 7:50 ` Eric Leblond 2009-03-26 13:17 ` Patrick McHardy 2009-03-26 22:01 ` Stephen Rothwell 2009-03-16 6:03 Stephen Rothwell 2009-03-16 6:05 ` Dhananjay Phadke 2008-12-17 7:22 Stephen Rothwell 2008-12-17 7:53 ` David Miller 2008-12-17 8:04 ` Eilon Greenstein
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.