All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cls_u32: fix sparse warnings
@ 2011-02-21  2:14 Stephen Hemminger
  2011-02-23 12:35 ` jamal
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2011-02-21  2:14 UTC (permalink / raw)
  To: David Miller, jamal; +Cc: netdev

The variable _data is used in asm-generic to define sections
which causes sparse warnings, so just rename the variable.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 net/sched/cls_u32.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/net/sched/cls_u32.c	2011-02-20 17:50:45.469140817 -0800
+++ b/net/sched/cls_u32.c	2011-02-20 17:51:40.205778673 -0800
@@ -134,12 +134,12 @@ next_knode:
 
 		for (i = n->sel.nkeys; i > 0; i--, key++) {
 			int toff = off + key->off + (off2 & key->offmask);
-			__be32 *data, _data;
+			__be32 *data, hdata;
 
 			if (skb_headroom(skb) + toff > INT_MAX)
 				goto out;
 
-			data = skb_header_pointer(skb, toff, 4, &_data);
+			data = skb_header_pointer(skb, toff, 4, &hdata);
 			if (!data)
 				goto out;
 			if ((*data ^ key->val) & key->mask) {
@@ -187,10 +187,10 @@ check_terminal:
 		ht = n->ht_down;
 		sel = 0;
 		if (ht->divisor) {
-			__be32 *data, _data;
+			__be32 *data, hdata;
 
 			data = skb_header_pointer(skb, off + n->sel.hoff, 4,
-						  &_data);
+						  &hdata);
 			if (!data)
 				goto out;
 			sel = ht->divisor & u32_hash_fold(*data, &n->sel,
@@ -202,11 +202,11 @@ check_terminal:
 		if (n->sel.flags & (TC_U32_OFFSET | TC_U32_VAROFFSET)) {
 			off2 = n->sel.off + 3;
 			if (n->sel.flags & TC_U32_VAROFFSET) {
-				__be16 *data, _data;
+				__be16 *data, hdata;
 
 				data = skb_header_pointer(skb,
 							  off + n->sel.offoff,
-							  2, &_data);
+							  2, &hdata);
 				if (!data)
 					goto out;
 				off2 += ntohs(n->sel.offmask & *data) >>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cls_u32: fix sparse warnings
  2011-02-21  2:14 [PATCH] cls_u32: fix sparse warnings Stephen Hemminger
@ 2011-02-23 12:35 ` jamal
  2011-02-23 18:16   ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: jamal @ 2011-02-23 12:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Sun, 2011-02-20 at 18:14 -0800, Stephen Hemminger wrote:
> The variable _data is used in asm-generic to define sections
> which causes sparse warnings, so just rename the variable.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>

Hey, while you are sparsing away you may wanna fix 
br_fdb_cleanup() as well ;-> /me runs

cheers,
jamal


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cls_u32: fix sparse warnings
  2011-02-23 12:35 ` jamal
@ 2011-02-23 18:16   ` Stephen Hemminger
  2011-02-24  0:47     ` jamal
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2011-02-23 18:16 UTC (permalink / raw)
  To: hadi; +Cc: David Miller, netdev

On Wed, 23 Feb 2011 07:35:42 -0500
jamal <hadi@cyberus.ca> wrote:

> On Sun, 2011-02-20 at 18:14 -0800, Stephen Hemminger wrote:
> > The variable _data is used in asm-generic to define sections
> > which causes sparse warnings, so just rename the variable.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
> 
> Hey, while you are sparsing away you may wanna fix 
> br_fdb_cleanup() as well ;-> /me runs
> 

With current sparse and net-next it comes up clean.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cls_u32: fix sparse warnings
  2011-02-23 18:16   ` Stephen Hemminger
@ 2011-02-24  0:47     ` jamal
  0 siblings, 0 replies; 4+ messages in thread
From: jamal @ 2011-02-24  0:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Wed, 2011-02-23 at 10:16 -0800, Stephen Hemminger wrote:


> With current sparse and net-next it comes up clean.

weird. So _data has to be defined on the stack for sparse 
to complain?
Another one is act_pedit.c

cheers,
jamal


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-24  0:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21  2:14 [PATCH] cls_u32: fix sparse warnings Stephen Hemminger
2011-02-23 12:35 ` jamal
2011-02-23 18:16   ` Stephen Hemminger
2011-02-24  0:47     ` jamal

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.