* linux-next: net tree build warning
@ 2009-11-05 2:30 Stephen Rothwell
2009-11-05 4:39 ` [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups Eric Dumazet
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-11-05 2:30 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
Hi Dave,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
net/ipv4/devinet.c: In function 'inet_select_addr':
net/ipv4/devinet.c:902: warning: label 'out' defined but not used
Probably introduced by commit c6d14c84566d6b70ad9dc1618db0dec87cca9300
("net: Introduce for_each_netdev_rcu() iterator").
--
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
* [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups
2009-11-05 2:30 linux-next: net tree build warning Stephen Rothwell
@ 2009-11-05 4:39 ` Eric Dumazet
2009-11-05 6:05 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Eric Dumazet @ 2009-11-05 4:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David S. Miller, linux-next, linux-kernel
Stephen Rothwell a écrit :
> Hi Dave,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> net/ipv4/devinet.c: In function 'inet_select_addr':
> net/ipv4/devinet.c:902: warning: label 'out' defined but not used
>
> Probably introduced by commit c6d14c84566d6b70ad9dc1618db0dec87cca9300
> ("net: Introduce for_each_netdev_rcu() iterator").
>
Thanks Stephen !
[PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups
As pointed by Stephen Rothwell, commit c6d14c84 added a warning :
net/ipv4/devinet.c: In function 'inet_select_addr':
net/ipv4/devinet.c:902: warning: label 'out' defined but not used
delete unused 'out' label and do some cleanups as well
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv4/devinet.c | 61 +++++++++++++++++++++++--------------------
1 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 8aa7a13..c2045f9 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -140,11 +140,11 @@ void in_dev_finish_destroy(struct in_device *idev)
#endif
dev_put(dev);
if (!idev->dead)
- printk("Freeing alive in_device %p\n", idev);
- else {
+ pr_err("Freeing alive in_device %p\n", idev);
+ else
kfree(idev);
- }
}
+EXPORT_SYMBOL(in_dev_finish_destroy);
static struct in_device *inetdev_init(struct net_device *dev)
{
@@ -159,7 +159,8 @@ static struct in_device *inetdev_init(struct net_device *dev)
sizeof(in_dev->cnf));
in_dev->cnf.sysctl = NULL;
in_dev->dev = dev;
- if ((in_dev->arp_parms = neigh_parms_alloc(dev, &arp_tbl)) == NULL)
+ in_dev->arp_parms = neigh_parms_alloc(dev, &arp_tbl);
+ if (!in_dev->arp_parms)
goto out_kfree;
if (IPV4_DEVCONF(in_dev->cnf, FORWARDING))
dev_disable_lro(dev);
@@ -413,6 +414,7 @@ struct in_device *inetdev_by_index(struct net *net, int ifindex)
rcu_read_unlock();
return in_dev;
}
+EXPORT_SYMBOL(inetdev_by_index);
/* Called only from RTNL semaphored context. No locks. */
@@ -558,7 +560,7 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
* Determine a default network mask, based on the IP address.
*/
-static __inline__ int inet_abc_len(__be32 addr)
+static inline int inet_abc_len(__be32 addr)
{
int rc = -1; /* Something else, probably a multicast. */
@@ -647,13 +649,15 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
rtnl_lock();
ret = -ENODEV;
- if ((dev = __dev_get_by_name(net, ifr.ifr_name)) == NULL)
+ dev = __dev_get_by_name(net, ifr.ifr_name);
+ if (!dev)
goto done;
if (colon)
*colon = ':';
- if ((in_dev = __in_dev_get_rtnl(dev)) != NULL) {
+ in_dev = __in_dev_get_rtnl(dev);
+ if (in_dev) {
if (tryaddrmatch) {
/* Matthias Andree */
/* compare label and address (4.4BSD style) */
@@ -721,7 +725,8 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
if (!ifa) {
ret = -ENOBUFS;
- if ((ifa = inet_alloc_ifa()) == NULL)
+ ifa = inet_alloc_ifa();
+ if (!ifa)
break;
if (colon)
memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
@@ -823,10 +828,10 @@ static int inet_gifconf(struct net_device *dev, char __user *buf, int len)
struct ifreq ifr;
int done = 0;
- if (!in_dev || (ifa = in_dev->ifa_list) == NULL)
+ if (!in_dev)
goto out;
- for (; ifa; ifa = ifa->ifa_next) {
+ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
if (!buf) {
done += sizeof(ifr);
continue;
@@ -877,16 +882,17 @@ __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope)
addr = ifa->ifa_local;
} endfor_ifa(in_dev);
-no_in_dev:
if (addr)
goto out_unlock;
+no_in_dev:
/* Not loopback addresses on loopback should be preferred
in this case. It is importnat that lo is the first interface
in dev_base list.
*/
for_each_netdev_rcu(net, dev) {
- if ((in_dev = __in_dev_get_rcu(dev)) == NULL)
+ in_dev = __in_dev_get_rcu(dev);
+ if (!in_dev)
continue;
for_primary_ifa(in_dev) {
@@ -899,9 +905,9 @@ no_in_dev:
}
out_unlock:
rcu_read_unlock();
-out:
return addr;
}
+EXPORT_SYMBOL(inet_select_addr);
static __be32 confirm_addr_indev(struct in_device *in_dev, __be32 dst,
__be32 local, int scope)
@@ -937,7 +943,7 @@ static __be32 confirm_addr_indev(struct in_device *in_dev, __be32 dst,
}
} endfor_ifa(in_dev);
- return same? addr : 0;
+ return same ? addr : 0;
}
/*
@@ -960,7 +966,8 @@ __be32 inet_confirm_addr(struct in_device *in_dev,
net = dev_net(in_dev->dev);
rcu_read_lock();
for_each_netdev_rcu(net, dev) {
- if ((in_dev = __in_dev_get_rcu(dev))) {
+ in_dev = __in_dev_get_rcu(dev);
+ if (in_dev) {
addr = confirm_addr_indev(in_dev, dst, local, scope);
if (addr)
break;
@@ -979,14 +986,16 @@ int register_inetaddr_notifier(struct notifier_block *nb)
{
return blocking_notifier_chain_register(&inetaddr_chain, nb);
}
+EXPORT_SYMBOL(register_inetaddr_notifier);
int unregister_inetaddr_notifier(struct notifier_block *nb)
{
return blocking_notifier_chain_unregister(&inetaddr_chain, nb);
}
+EXPORT_SYMBOL(unregister_inetaddr_notifier);
-/* Rename ifa_labels for a device name change. Make some effort to preserve existing
- * alias numbering and to create unique labels if possible.
+/* Rename ifa_labels for a device name change. Make some effort to preserve
+ * existing alias numbering and to create unique labels if possible.
*/
static void inetdev_changename(struct net_device *dev, struct in_device *in_dev)
{
@@ -1005,11 +1014,10 @@ static void inetdev_changename(struct net_device *dev, struct in_device *in_dev)
sprintf(old, ":%d", named);
dot = old;
}
- if (strlen(dot) + strlen(dev->name) < IFNAMSIZ) {
+ if (strlen(dot) + strlen(dev->name) < IFNAMSIZ)
strcat(ifa->ifa_label, dot);
- } else {
+ else
strcpy(ifa->ifa_label + (IFNAMSIZ - strlen(dot) - 1), dot);
- }
skip:
rtmsg_ifa(RTM_NEWADDR, ifa, NULL, 0);
}
@@ -1056,8 +1064,9 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
if (!inetdev_valid_mtu(dev->mtu))
break;
if (dev->flags & IFF_LOOPBACK) {
- struct in_ifaddr *ifa;
- if ((ifa = inet_alloc_ifa()) != NULL) {
+ struct in_ifaddr *ifa = inet_alloc_ifa();
+
+ if (ifa) {
ifa->ifa_local =
ifa->ifa_address = htonl(INADDR_LOOPBACK);
ifa->ifa_prefixlen = 8;
@@ -1178,7 +1187,8 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
goto cont;
if (idx > s_idx)
s_ip_idx = 0;
- if ((in_dev = __in_dev_get_rtnl(dev)) == NULL)
+ in_dev = __in_dev_get_rtnl(dev);
+ if (!in_dev)
goto cont;
for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
@@ -1673,8 +1683,3 @@ void __init devinet_init(void)
rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr);
}
-EXPORT_SYMBOL(in_dev_finish_destroy);
-EXPORT_SYMBOL(inet_select_addr);
-EXPORT_SYMBOL(inetdev_by_index);
-EXPORT_SYMBOL(register_inetaddr_notifier);
-EXPORT_SYMBOL(unregister_inetaddr_notifier);
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups
2009-11-05 4:39 ` [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups Eric Dumazet
@ 2009-11-05 6:05 ` David Miller
0 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2009-11-05 6:05 UTC (permalink / raw)
To: eric.dumazet; +Cc: sfr, linux-next, linux-kernel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 05 Nov 2009 05:39:56 +0100
> [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups
>
> As pointed by Stephen Rothwell, commit c6d14c84 added a warning :
>
> net/ipv4/devinet.c: In function 'inet_select_addr':
> net/ipv4/devinet.c:902: warning: label 'out' defined but not used
>
> delete unused 'out' label and do some cleanups as well
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-11-30 5:40 linux-next: net tree build warning Stephen Rothwell
@ 2009-11-30 9:49 ` Andrei Pelinescu-Onciul
0 siblings, 0 replies; 27+ messages in thread
From: Andrei Pelinescu-Onciul @ 2009-11-30 9:49 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David S. Miller, linux-next, linux-kernel
On Nov 30, 2009 at 16:40, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dave,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':
> net/sctp/socket.c:2091: warning: large integer implicitly truncated to unsigned type
>
> Introduced by commit f6778aab6ccc4b510b4dcfa770d9949b696b4545 ("sctp:
> limit maximum autoclose setsockopt value") from the net tree.
Thanks, the fix is:
- sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
+ sp->autoclose = (__u32)(MAX_SCHEDULE_TIMEOUT / HZ) ;
I'll reply to this mail with the patch in git format.
Andrei
^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-11-30 5:40 Stephen Rothwell
2009-11-30 9:49 ` Andrei Pelinescu-Onciul
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-11-30 5:40 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, Andrei Pelinescu-Onciul
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
Hi Dave,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':
net/sctp/socket.c:2091: warning: large integer implicitly truncated to unsigned type
Introduced by commit f6778aab6ccc4b510b4dcfa770d9949b696b4545 ("sctp:
limit maximum autoclose setsockopt value") from the net tree.
--
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 warning
2009-11-12 2:53 ` David Miller
2009-11-12 2:55 ` Eric Dumazet
@ 2009-11-12 3:10 ` Stephen Rothwell
1 sibling, 0 replies; 27+ messages in thread
From: Stephen Rothwell @ 2009-11-12 3:10 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel, eric.dumazet
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
Hi Dave,
On Wed, 11 Nov 2009 18:53:38 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> I just pushed a fix for this into net-next-2.6, thanks!
Thanks.
--
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 warning
2009-11-12 2:53 ` David Miller
@ 2009-11-12 2:55 ` Eric Dumazet
2009-11-12 3:10 ` Stephen Rothwell
1 sibling, 0 replies; 27+ messages in thread
From: Eric Dumazet @ 2009-11-12 2:55 UTC (permalink / raw)
To: David Miller; +Cc: sfr, linux-next, linux-kernel
David Miller a écrit :
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 12 Nov 2009 13:24:24 +1100
>
>> Hi Dave,
>>
>> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>>
>> net/ipv6/addrconf.c: In function 'inet6_dump_ifinfo':
>> net/ipv6/addrconf.c:3833: warning: unused variable 'err'
>>
>> Introduced by commit 84d2697d9649339215675551eae28ba04068dea1 ("ipv6:
>> speedup inet6_dump_ifinfo()").
>
> I just pushed a fix for this into net-next-2.6, thanks!
You beat me :)
Thanks
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-11-12 2:24 Stephen Rothwell
@ 2009-11-12 2:53 ` David Miller
2009-11-12 2:55 ` Eric Dumazet
2009-11-12 3:10 ` Stephen Rothwell
0 siblings, 2 replies; 27+ messages in thread
From: David Miller @ 2009-11-12 2:53 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel, eric.dumazet
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 12 Nov 2009 13:24:24 +1100
> Hi Dave,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> net/ipv6/addrconf.c: In function 'inet6_dump_ifinfo':
> net/ipv6/addrconf.c:3833: warning: unused variable 'err'
>
> Introduced by commit 84d2697d9649339215675551eae28ba04068dea1 ("ipv6:
> speedup inet6_dump_ifinfo()").
I just pushed a fix for this into net-next-2.6, thanks!
^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-11-12 2:24 Stephen Rothwell
2009-11-12 2:53 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-11-12 2:24 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
Hi Dave,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
net/ipv6/addrconf.c: In function 'inet6_dump_ifinfo':
net/ipv6/addrconf.c:3833: warning: unused variable 'err'
Introduced by commit 84d2697d9649339215675551eae28ba04068dea1 ("ipv6:
speedup inet6_dump_ifinfo()").
--
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 warning
2009-09-07 9:04 ` David Miller
@ 2009-09-07 9:37 ` Stephen Rothwell
0 siblings, 0 replies; 27+ messages in thread
From: Stephen Rothwell @ 2009-09-07 9:37 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel, shemminger
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Hi Dave, Stephen,
On Mon, 07 Sep 2009 02:04:23 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> Thanks for the report, I'll commit the fix below.
>
> Also, Stephen Hemminger has fixed the dlci WAN driver warning
> you reported too.
Thanks for both of these.
--
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 warning
[not found] <20090904144232.1f6ccf45.sfr@canb.auug.org.au>
@ 2009-09-07 9:04 ` David Miller
2009-09-07 9:37 ` Stephen Rothwell
0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2009-09-07 9:04 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel, shemminger
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 4 Sep 2009 14:42:32 +1000
> Today's linux-next build (x86_64 allmodconfig gcc-4.4.0) produced this warning:
>
> drivers/net/r8169.c: In function 'rtl8169_start_xmit':
> drivers/net/r8169.c:3421: warning: label 'out' defined but not used
>
> Introduced by commit 61357325f377889a1daffa14962d705dc814dd0e ("netdev:
> convert bulk of drivers to netdev_tx_t").
Thanks for the report, I'll commit the fix below.
Also, Stephen Hemminger has fixed the dlci WAN driver warning
you reported too.
r8169: Fix warning in rtl8169_start_xmit().
Reported by Stephen Rothwell:
drivers/net/r8169.c: In function 'rtl8169_start_xmit':
drivers/net/r8169.c:3421: warning: label 'out' defined but not used
Introduced by commit 61357325f377889a1daffa14962d705dc814dd0e ("netdev:
convert bulk of drivers to netdev_tx_t").
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/r8169.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a91e9b3..50c6a3c 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3416,7 +3416,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
netif_wake_queue(dev);
}
-out:
return NETDEV_TX_OK;
err_stop:
--
1.6.4.2
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-09-04 4:28 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, roel.kluin, netdev
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 4 Sep 2009 14:28:46 +1000
> Today's linux-next build (x86_64 allmodconfig gcc-4.4.0) produced this
> warning:
Thanks, just pushed the following out:
WAN: dscc4: Fix warning pointing out a bug.
Noticed by Stephen Rothwell:
Today's linux-next build (x86_64 allmodconfig gcc-4.4.0)
produced this warning:
drivers/net/wan/dscc4.c: In function 'dscc4_rx_skb':
drivers/net/wan/dscc4.c:670: warning: suggest parentheses around comparison in operand of '|'
which actually points out a bug, I think. It is doing
(x & (y | z)) != y | z
when it probably means
(x & (y | z)) != (y | z)
Introduced by commit 5de3fcab91b0e1809eec030355d15801daf25083
("WAN: bit and/or confusion").
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/wan/dscc4.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index b2247bd..81c8aec 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -667,7 +667,7 @@ static inline void dscc4_rx_skb(struct dscc4_dev_priv *dpriv,
else if (!(skb->data[pkt_len] & FrameCrc))
dev->stats.rx_crc_errors++;
else if ((skb->data[pkt_len] & (FrameVfr | FrameRab)) !=
- FrameVfr | FrameRab)
+ (FrameVfr | FrameRab))
dev->stats.rx_length_errors++;
dev->stats.rx_errors++;
dev_kfree_skb_irq(skb);
--
1.6.4.2
^ permalink raw reply related [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-09-04 4:28 Stephen Rothwell
2009-09-04 4:35 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-09-04 4:28 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, roel kluin, netdev
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
Hi Dave,
Today's linux-next build (x86_64 allmodconfig gcc-4.4.0) produced this
warning:
drivers/net/wan/dscc4.c: In function 'dscc4_rx_skb':
drivers/net/wan/dscc4.c:670: warning: suggest parentheses around comparison in operand of '|'
which actually points out a bug, I think. It is doing
(x & (y | z)) != y | z
when it probably means
(x & (y | z)) != (y | z)
Introduced by commit 5de3fcab91b0e1809eec030355d15801daf25083 ("WAN: bit
and/or confusion").
--
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 warning
2009-06-10 7:38 ` Wolfgang Grandegger
@ 2009-06-10 8:12 ` David Miller
0 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2009-06-10 8:12 UTC (permalink / raw)
To: wg; +Cc: sfr, linux-next, linux-kernel
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Wed, 10 Jun 2009 09:38:55 +0200
> [PATCH v2] can: sja1000_of_platform: fix build problems with printk format
>
> According to "Documentation/printk-formats.txt", if the type is
> dependent on a config option for its size, like resource_size_t,
> we should use a format specifier of its largest possible type and
> explicitly cast to it.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-06-10 0:38 ` David Miller
@ 2009-06-10 7:38 ` Wolfgang Grandegger
2009-06-10 8:12 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Grandegger @ 2009-06-10 7:38 UTC (permalink / raw)
To: David Miller; +Cc: sfr, linux-next, linux-kernel
David Miller wrote:
> From: Wolfgang Grandegger <wg@grandegger.com>
> Date: Tue, 09 Jun 2009 15:14:38 +0200
>
>> David Miller wrote:
>>> From: Wolfgang Grandegger <wg@grandegger.com>
>>> Date: Tue, 09 Jun 2009 13:25:27 +0200
>>>
>>>> [PATCH] can: sja1000_of_platform: fix build problems with printk format
>>>>
>>>> Variables of type size_t should be printed with the format "%zx".
>>>>
>>>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>>> It's not a "size_t", it's a "resource_size_t" which can be
>>> "unsigned long long" on some platforms.
>> Right, but I assume that the %zx handles that type properly as well.
>
> It absolutely does not.b
>
> resource_size_t is a arch specifically defined type that
> could be anything, it does not conform to the definitions
> of size_t.
Right, I'm now compiling on a x86_64 system and can reproduce the
warnings. Below is a revised patch.
Thanks for your patience.
Wolfgang.
[PATCH v2] can: sja1000_of_platform: fix build problems with printk format
According to "Documentation/printk-formats.txt", if the type is
dependent on a config option for its size, like resource_size_t,
we should use a format specifier of its largest possible type and
explicitly cast to it.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/sja1000/sja1000_of_platform.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: net-next-2.6/drivers/net/can/sja1000/sja1000_of_platform.c
===================================================================
--- net-next-2.6.orig/drivers/net/can/sja1000/sja1000_of_platform.c 2009-06-09 12:45:38.000000000 +0200
+++ net-next-2.6/drivers/net/can/sja1000/sja1000_of_platform.c 2009-06-10 09:23:47.208720083 +0200
@@ -108,15 +108,17 @@
res_size = resource_size(&res);
if (!request_mem_region(res.start, res_size, DRV_NAME)) {
- dev_err(&ofdev->dev, "couldn't request %#x..%#x\n",
- res.start, res.end);
+ dev_err(&ofdev->dev, "couldn't request %#llx..%#llx\n",
+ (unsigned long long)res.start,
+ (unsigned long long)res.end);
return -EBUSY;
}
base = ioremap_nocache(res.start, res_size);
if (!base) {
- dev_err(&ofdev->dev, "couldn't ioremap %#x..%#x\n",
- res.start, res.end);
+ dev_err(&ofdev->dev, "couldn't ioremap %#llx..%#llx\n",
+ (unsigned long long)res.start,
+ (unsigned long long)res.end);
err = -ENOMEM;
goto exit_release_mem;
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-06-09 13:14 ` Wolfgang Grandegger
@ 2009-06-10 0:38 ` David Miller
2009-06-10 7:38 ` Wolfgang Grandegger
0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2009-06-10 0:38 UTC (permalink / raw)
To: wg; +Cc: sfr, linux-next, linux-kernel
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Tue, 09 Jun 2009 15:14:38 +0200
> David Miller wrote:
>> From: Wolfgang Grandegger <wg@grandegger.com>
>> Date: Tue, 09 Jun 2009 13:25:27 +0200
>>
>>> [PATCH] can: sja1000_of_platform: fix build problems with printk format
>>>
>>> Variables of type size_t should be printed with the format "%zx".
>>>
>>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>>
>> It's not a "size_t", it's a "resource_size_t" which can be
>> "unsigned long long" on some platforms.
>
> Right, but I assume that the %zx handles that type properly as well.
It absolutely does not.
resource_size_t is a arch specifically defined type that
could be anything, it does not conform to the definitions
of size_t.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-06-09 11:26 ` David Miller
@ 2009-06-09 13:14 ` Wolfgang Grandegger
2009-06-10 0:38 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Grandegger @ 2009-06-09 13:14 UTC (permalink / raw)
To: David Miller; +Cc: sfr, linux-next, linux-kernel
David Miller wrote:
> From: Wolfgang Grandegger <wg@grandegger.com>
> Date: Tue, 09 Jun 2009 13:25:27 +0200
>
>> [PATCH] can: sja1000_of_platform: fix build problems with printk format
>>
>> Variables of type size_t should be printed with the format "%zx".
>>
>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>
> It's not a "size_t", it's a "resource_size_t" which can be
> "unsigned long long" on some platforms.
Right, but I assume that the %zx handles that type properly as well.
Should I send a patch with a corrected patch description?
Wolfgang.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-06-09 11:25 ` Wolfgang Grandegger
@ 2009-06-09 11:26 ` David Miller
2009-06-09 13:14 ` Wolfgang Grandegger
0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2009-06-09 11:26 UTC (permalink / raw)
To: wg; +Cc: sfr, linux-next, linux-kernel
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Tue, 09 Jun 2009 13:25:27 +0200
> [PATCH] can: sja1000_of_platform: fix build problems with printk format
>
> Variables of type size_t should be printed with the format "%zx".
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
It's not a "size_t", it's a "resource_size_t" which can be
"unsigned long long" on some platforms.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-06-09 10:36 Stephen Rothwell
@ 2009-06-09 11:25 ` Wolfgang Grandegger
2009-06-09 11:26 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Grandegger @ 2009-06-09 11:25 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David S. Miller, linux-next, linux-kernel
Hello,
Stephen Rothwell wrote:
> Hi Dave,
>
> Today's linux-next build (powerpc allyesconfig) produced these warnings:
>
> drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
> drivers/net/can/sja1000/sja1000_of_platform.c:111: warning: format '%#x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'
> drivers/net/can/sja1000/sja1000_of_platform.c:111: warning: format '%#x' expects type 'unsigned int', but argument 5 has type 'resource_size_t'
> drivers/net/can/sja1000/sja1000_of_platform.c:118: warning: format '%#x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'
> drivers/net/can/sja1000/sja1000_of_platform.c:118: warning: format '%#x' expects type 'unsigned int', but argument 5 has type 'resource_size_t'
>
> Introduced by commit d1a277c584d0862dbf51991baea947ea5f2ce6bf ("can:
> sja1000: generic OF platform bus driver").
The patch below should fix the build problems (which I cannot
reproduce on my test systems).
Thanks,
Wolfgang.
-----------------------------------------------------------------------
[PATCH] can: sja1000_of_platform: fix build problems with printk format
Variables of type size_t should be printed with the format "%zx".
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/net/can/sja1000/sja1000_of_platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: net-next-2.6/drivers/net/can/sja1000/sja1000_of_platform.c
===================================================================
--- net-next-2.6.orig/drivers/net/can/sja1000/sja1000_of_platform.c 2009-06-09 12:45:38.000000000 +0200
+++ net-next-2.6/drivers/net/can/sja1000/sja1000_of_platform.c 2009-06-09 13:06:56.495718952 +0200
@@ -108,14 +108,14 @@
res_size = resource_size(&res);
if (!request_mem_region(res.start, res_size, DRV_NAME)) {
- dev_err(&ofdev->dev, "couldn't request %#x..%#x\n",
+ dev_err(&ofdev->dev, "couldn't request %#zx..%#zx\n",
res.start, res.end);
return -EBUSY;
}
base = ioremap_nocache(res.start, res_size);
if (!base) {
- dev_err(&ofdev->dev, "couldn't ioremap %#x..%#x\n",
+ dev_err(&ofdev->dev, "couldn't ioremap %#zx..%#zx\n",
res.start, res.end);
err = -ENOMEM;
goto exit_release_mem;
^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-06-09 10:36 Stephen Rothwell
2009-06-09 11:25 ` Wolfgang Grandegger
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-06-09 10:36 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, Wolfgang Grandegger
[-- Attachment #1: Type: text/plain, Size: 974 bytes --]
Hi Dave,
Today's linux-next build (powerpc allyesconfig) produced these warnings:
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:111: warning: format '%#x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'
drivers/net/can/sja1000/sja1000_of_platform.c:111: warning: format '%#x' expects type 'unsigned int', but argument 5 has type 'resource_size_t'
drivers/net/can/sja1000/sja1000_of_platform.c:118: warning: format '%#x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'
drivers/net/can/sja1000/sja1000_of_platform.c:118: warning: format '%#x' expects type 'unsigned int', but argument 5 has type 'resource_size_t'
Introduced by commit d1a277c584d0862dbf51991baea947ea5f2ce6bf ("can:
sja1000: generic OF platform bus driver").
--
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 warning
2009-05-22 8:20 ` Stephen Rothwell
@ 2009-05-22 10:31 ` Neil Horman
0 siblings, 0 replies; 27+ messages in thread
From: Neil Horman @ 2009-05-22 10:31 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David Miller, linux-next, linux-kernel, netdev
On Fri, May 22, 2009 at 06:20:24PM +1000, Stephen Rothwell wrote:
> Hi Dave,
>
> On Thu, 21 May 2009 23:30:38 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
> >
> > I just pushed the following to fix this:
> >
> > net: Fix arg to trace_napi_poll() in netpoll.
>
> Thanks. I remerged the net tree at the end of linux-next today in case
> anyone was doing any testing over the weekend.
>
Damnit, thanks for the fixup guys.
Neil
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: net tree build warning
2009-05-22 6:30 ` David Miller
@ 2009-05-22 8:20 ` Stephen Rothwell
2009-05-22 10:31 ` Neil Horman
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-05-22 8:20 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel, nhorman, netdev
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
Hi Dave,
On Thu, 21 May 2009 23:30:38 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> I just pushed the following to fix this:
>
> net: Fix arg to trace_napi_poll() in netpoll.
Thanks. I remerged the net tree at the end of linux-next today in case
anyone was doing any testing over the weekend.
--
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 warning
2009-05-22 5:16 Stephen Rothwell
@ 2009-05-22 6:30 ` David Miller
2009-05-22 8:20 ` Stephen Rothwell
0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2009-05-22 6:30 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel, nhorman, netdev
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 22 May 2009 15:16:42 +1000
> Hi Dave,
>
> Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
>
> net/core/netpoll.c: In function 'poll_one_napi':
> net/core/netpoll.c:141: warning: passing argument 1 of 'trace_napi_poll' from incompatible pointer type
> include/trace/napi.h:7: note: expected 'struct napi_struct *' but argument is of type 'struct net_device *'
>
> Introduced by commit 4ea7e38696c7e798c47ebbecadfd392f23f814f9 ("dropmon:
> add ability to detect when hardware dropsrxpackets").
I just pushed the following to fix this:
net: Fix arg to trace_napi_poll() in netpoll.
Reproted by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/core/netpoll.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 00b14e2..67b4f3e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -138,7 +138,7 @@ static int poll_one_napi(struct netpoll_info *npinfo,
set_bit(NAPI_STATE_NPSVC, &napi->state);
work = napi->poll(napi, budget);
- trace_napi_poll(napi->dev);
+ trace_napi_poll(napi);
clear_bit(NAPI_STATE_NPSVC, &napi->state);
atomic_dec(&trapped);
--
1.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-05-22 5:16 Stephen Rothwell
2009-05-22 6:30 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-05-22 5:16 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel, Neil Horman, netdev
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
Hi Dave,
Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
net/core/netpoll.c: In function 'poll_one_napi':
net/core/netpoll.c:141: warning: passing argument 1 of 'trace_napi_poll' from incompatible pointer type
include/trace/napi.h:7: note: expected 'struct napi_struct *' but argument is of type 'struct net_device *'
Introduced by commit 4ea7e38696c7e798c47ebbecadfd392f23f814f9 ("dropmon:
add ability to detect when hardware dropsrxpackets").
--
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 warning
2009-03-12 6:24 ` David Miller
@ 2009-03-12 6:42 ` Stephen Rothwell
0 siblings, 0 replies; 27+ messages in thread
From: Stephen Rothwell @ 2009-03-12 6:42 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, inaky
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
Hi Dave,
On Wed, 11 Mar 2009 23:24:28 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> I just pushed Randy Dunlap's fix for this into the tree.
I should have known there would be one. :-)
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
* Re: linux-next: net tree build warning
2009-03-12 5:58 Stephen Rothwell
@ 2009-03-12 6:24 ` David Miller
2009-03-12 6:42 ` Stephen Rothwell
0 siblings, 1 reply; 27+ messages in thread
From: David Miller @ 2009-03-12 6:24 UTC (permalink / raw)
To: sfr; +Cc: linux-next, inaky
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 12 Mar 2009 16:58:57 +1100
> Hi Dave,
>
> Today's linux-next build (powerpc allyesconfig) produced these warnings:
>
> drivers/net/wimax/i2400m/netdev.c: In function 'i2400m_net_erx':
> drivers/net/wimax/i2400m/netdev.c:523: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
> drivers/net/wimax/i2400m/netdev.c:548: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
>
> Probably introduced by commit fd5c565c0c04d2716cfdac3f1de3c2261d6a457d
> ("wimax/i2400m: support extended data RX protocol (no need to reallocate
> skbs)").
I just pushed Randy Dunlap's fix for this into the tree.
Thanks.
^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: net tree build warning
@ 2009-03-12 5:58 Stephen Rothwell
2009-03-12 6:24 ` David Miller
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-03-12 5:58 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, Inaky Perez-Gonzalez
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
Hi Dave,
Today's linux-next build (powerpc allyesconfig) produced these warnings:
drivers/net/wimax/i2400m/netdev.c: In function 'i2400m_net_erx':
drivers/net/wimax/i2400m/netdev.c:523: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
drivers/net/wimax/i2400m/netdev.c:548: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
Probably introduced by commit fd5c565c0c04d2716cfdac3f1de3c2261d6a457d
("wimax/i2400m: support extended data RX protocol (no need to reallocate
skbs)").
--
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
end of thread, other threads:[~2009-11-30 9:54 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-05 2:30 linux-next: net tree build warning Stephen Rothwell
2009-11-05 4:39 ` [PATCH net-next-2.6] net: net/ipv4/devinet.c cleanups Eric Dumazet
2009-11-05 6:05 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-11-30 5:40 linux-next: net tree build warning Stephen Rothwell
2009-11-30 9:49 ` Andrei Pelinescu-Onciul
2009-11-12 2:24 Stephen Rothwell
2009-11-12 2:53 ` David Miller
2009-11-12 2:55 ` Eric Dumazet
2009-11-12 3:10 ` Stephen Rothwell
[not found] <20090904144232.1f6ccf45.sfr@canb.auug.org.au>
2009-09-07 9:04 ` David Miller
2009-09-07 9:37 ` Stephen Rothwell
2009-09-04 4:28 Stephen Rothwell
2009-09-04 4:35 ` David Miller
2009-06-09 10:36 Stephen Rothwell
2009-06-09 11:25 ` Wolfgang Grandegger
2009-06-09 11:26 ` David Miller
2009-06-09 13:14 ` Wolfgang Grandegger
2009-06-10 0:38 ` David Miller
2009-06-10 7:38 ` Wolfgang Grandegger
2009-06-10 8:12 ` David Miller
2009-05-22 5:16 Stephen Rothwell
2009-05-22 6:30 ` David Miller
2009-05-22 8:20 ` Stephen Rothwell
2009-05-22 10:31 ` Neil Horman
2009-03-12 5:58 Stephen Rothwell
2009-03-12 6:24 ` David Miller
2009-03-12 6:42 ` Stephen Rothwell
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).