From: Roman Mashak <mrv@mojatatu.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
Roman Mashak <mrv@mojatatu.com>
Subject: [PATCH v2 net-next 3/6] net sched actions: fix sparse warning
Date: Wed, 27 Jun 2018 13:33:32 -0400 [thread overview]
Message-ID: <1530120815-13736-4-git-send-email-mrv@mojatatu.com> (raw)
In-Reply-To: <1530120815-13736-1-git-send-email-mrv@mojatatu.com>
The variable _data in include/asm-generic/sections.h defines sections,
this causes sparse warning in pedit:
net/sched/act_pedit.c:293:35: warning: symbol '_data' shadows an earlier one
./include/asm-generic/sections.h:36:13: originally declared here
Therefore rename the variable.
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
net/sched/act_pedit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index e4b29ee79ba8..9c2d8a31a5c5 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -290,7 +290,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
enum pedit_cmd cmd = TCA_PEDIT_KEY_EX_CMD_SET;
for (i = p->tcfp_nkeys; i > 0; i--, tkey++) {
- u32 *ptr, _data;
+ u32 *ptr, hdata;
int offset = tkey->off;
int hoffset;
u32 val;
@@ -337,7 +337,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
}
ptr = skb_header_pointer(skb, hoffset + offset,
- 4, &_data);
+ 4, &hdata);
if (!ptr)
goto bad;
/* just do it, baby */
@@ -355,7 +355,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
}
*ptr = ((*ptr & tkey->mask) ^ val);
- if (ptr == &_data)
+ if (ptr == &hdata)
skb_store_bits(skb, hoffset + offset, ptr, 4);
}
--
2.7.4
next prev parent reply other threads:[~2018-06-27 17:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 17:33 [PATCH v2 net-next 0/6] net sched actions: code style cleanup and fixes Roman Mashak
2018-06-27 17:33 ` [PATCH v2 net-next 1/6] net sched actions: fix coding style in pedit action Roman Mashak
2018-06-27 17:33 ` [PATCH v2 net-next 2/6] net sched actions: fix coding style in pedit headers Roman Mashak
2018-06-27 17:33 ` Roman Mashak [this message]
2018-06-27 17:33 ` [PATCH v2 net-next 4/6] net sched actions: use sizeof operator for buffer length Roman Mashak
2018-06-27 17:33 ` [PATCH v2 net-next 5/6] net sched actions: fix misleading text strings in pedit action Roman Mashak
2018-06-27 17:33 ` [PATCH v2 net-next 6/6] net sched actions: avoid bitwise operation on signed value in pedit Roman Mashak
2018-06-28 12:26 ` [PATCH v2 net-next 0/6] net sched actions: code style cleanup and fixes Davide Caratti
2018-06-28 13:12 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530120815-13736-4-git-send-email-mrv@mojatatu.com \
--to=mrv@mojatatu.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox