From patchwork Wed Aug 28 18:24:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 270617 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 662482C00C4 for ; Thu, 29 Aug 2013 05:02:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754042Ab3H1TCQ (ORCPT ); Wed, 28 Aug 2013 15:02:16 -0400 Received: from mail.tpi.com ([74.45.170.26]:38635 "EHLO mail.tpi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918Ab3H1TCP (ORCPT ); Wed, 28 Aug 2013 15:02:15 -0400 X-Greylist: delayed 1364 seconds by postgrey-1.27 at vger.kernel.org; Wed, 28 Aug 2013 15:02:15 EDT Received: from salmon.rtg.net (mail.tpi.com [10.0.0.205]) by mail.tpi.com (Postfix) with ESMTP id D0B8F329300; Wed, 28 Aug 2013 11:39:29 -0700 (PDT) Received: by salmon.rtg.net (Postfix, from userid 1000) id ABA46225BE; Wed, 28 Aug 2013 12:24:58 -0600 (MDT) From: Tim Gardner To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tim Gardner , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , "Eric W. Biederman" , Gao feng , Joe Perches Subject: [PATCH net-next 1/1] net: neighbour: Simplify ifdefs around neigh_app_ns() Date: Wed, 28 Aug 2013 12:24:46 -0600 Message-Id: <1377714286-51816-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 1.7.9.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Drop a couple of ifdef/endif pairs by moving the ifdef surrounding neigh_app_ns() to the interior of neigh_app_ns(). Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Cc: "Eric W. Biederman" Cc: Gao feng Cc: Joe Perches Signed-off-by: Tim Gardner --- This is an admittedly trivial change. I stumbled on it while trying to figure out why Ubuntu doesn't have CONFIG_ARPD enabled. net/core/neighbour.c | 4 ++-- net/ipv4/arp.c | 2 -- net/ipv6/ndisc.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 60533db..049dd9e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2759,13 +2759,13 @@ errout: rtnl_set_sk_err(net, RTNLGRP_NEIGH, err); } -#ifdef CONFIG_ARPD void neigh_app_ns(struct neighbour *n) { +#ifdef CONFIG_ARPD __neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST); +#endif /* CONFIG_ARPD */ } EXPORT_SYMBOL(neigh_app_ns); -#endif /* CONFIG_ARPD */ #ifdef CONFIG_SYSCTL static int zero; diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 4429b01..7808093 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -368,9 +368,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) } else { probes -= neigh->parms->app_probes; if (probes < 0) { -#ifdef CONFIG_ARPD neigh_app_ns(neigh); -#endif return; } } diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 04d31c2..d5693ad 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -663,9 +663,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) } ndisc_send_ns(dev, neigh, target, target, saddr); } else if ((probes -= neigh->parms->app_probes) < 0) { -#ifdef CONFIG_ARPD neigh_app_ns(neigh); -#endif } else { addrconf_addr_solict_mult(target, &mcaddr); ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);