* [PATCH net-next] lwtunnel: remove unused but set variable
@ 2017-03-14 6:04 Roopa Prabhu
2017-03-14 6:56 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Roopa Prabhu @ 2017-03-14 6:04 UTC (permalink / raw)
To: davem; +Cc: netdev, dsa
From: Roopa Prabhu <roopa@cumulusnetworks.com>
silences the below warning:
net/core/lwtunnel.c: In function ‘lwtunnel_valid_encap_type_attr’:
net/core/lwtunnel.c:165:17: warning: variable ‘nla’ set but not used
[-Wunused-but-set-variable]
Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
net/core/lwtunnel.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index 6df9f8f..b588819 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
@@ -162,7 +162,6 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
struct rtnexthop *rtnh = (struct rtnexthop *)attr;
struct nlattr *nla_entype;
struct nlattr *attrs;
- struct nlattr *nla;
u16 encap_type;
int attrlen;
@@ -170,7 +169,6 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
attrlen = rtnh_attrlen(rtnh);
if (attrlen > 0) {
attrs = rtnh_attrs(rtnh);
- nla = nla_find(attrs, attrlen, RTA_ENCAP);
nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE);
if (nla_entype) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] lwtunnel: remove unused but set variable
2017-03-14 6:04 [PATCH net-next] lwtunnel: remove unused but set variable Roopa Prabhu
@ 2017-03-14 6:56 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-14 6:56 UTC (permalink / raw)
To: roopa; +Cc: netdev, dsa
From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Mon, 13 Mar 2017 23:04:48 -0700
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> silences the below warning:
> net/core/lwtunnel.c: In function ‘lwtunnel_valid_encap_type_attr’:
> net/core/lwtunnel.c:165:17: warning: variable ‘nla’ set but not used
> [-Wunused-but-set-variable]
>
> Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules")
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Looks like the result of some cut and paste from the parsing in
net/ipv4/fib_semantics.c :-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-14 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 6:04 [PATCH net-next] lwtunnel: remove unused but set variable Roopa Prabhu
2017-03-14 6:56 ` David Miller
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.