From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net] net/ipv4: avoid compile error in fib_info_nh_uses_dev Date: Fri, 21 Sep 2018 11:03:15 -0700 Message-ID: References: <20180921175807.85168-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev , Eric Dumazet To: Eric Dumazet , "David S . Miller" Return-path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:44259 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390381AbeIUXxS (ORCPT ); Fri, 21 Sep 2018 19:53:18 -0400 Received: by mail-pg1-f193.google.com with SMTP id r1-v6so6384503pgp.11 for ; Fri, 21 Sep 2018 11:03:18 -0700 (PDT) In-Reply-To: <20180921175807.85168-1-edumazet@google.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 9/21/18 10:58 AM, Eric Dumazet wrote: > net/ipv4/fib_frontend.c: In function 'fib_info_nh_uses_dev': > net/ipv4/fib_frontend.c:322:6: error: unused variable 'ret' [-Werror=unused-variable] > cc1: all warnings being treated as errors > > Fixes: 78f2756c5fc0 ("net/ipv4: Move device validation to helper") > Signed-off-by: Eric Dumazet > Cc: David Ahern > --- > net/ipv4/fib_frontend.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > index 222b968de94cbff98c4a1b4a2f298b2e68452984..30e2bcc3ef2a293568076228fecf3cf07ba01f20 100644 > --- a/net/ipv4/fib_frontend.c > +++ b/net/ipv4/fib_frontend.c > @@ -318,9 +318,9 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb) > bool fib_info_nh_uses_dev(struct fib_info *fi, const struct net_device *dev) > { > bool dev_match = false; > +#ifdef CONFIG_IP_ROUTE_MULTIPATH > int ret; > > -#ifdef CONFIG_IP_ROUTE_MULTIPATH > for (ret = 0; ret < fi->fib_nhs; ret++) { > struct fib_nh *nh = &fi->fib_nh[ret]; > > Reviewed-by: David Ahern Thanks for the fix.