Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp225699ybh; Tue, 10 Mar 2020 23:31:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs9XvPmPExO6GPpaduK6fBSr6AdP8CaqflrtXYvYB9oRx7MoGk8GFRzdonKgdqQdKou5f1W X-Received: by 2002:aca:ebca:: with SMTP id j193mr884254oih.124.1583908312112; Tue, 10 Mar 2020 23:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583908312; cv=none; d=google.com; s=arc-20160816; b=a0EVPTNDkKY41J+7W/orenyml+szSJ1YBAtkHlBZ/CSGDnsQ+09xaHV4E98KH6w3QA uI1m/uvBIR4EqZ5EScYa0wFdQZnr9K3vvH4icqNfZPNnnQpX50EF1s50oeBch3EhUIOP kJBk5NB/3IUx3PoR2JIeb/QrkGLsKtCAbgPkBG3bV4fINkyT2zkYmvjLjYu8TlTEHJ5+ o1+RsXaNAZhzTE49MterBT4+grK2/vL4IEOKsuDWHQ7QJjpvmSTtBk4lW5FcfECgDSST dR/0S196lkxRbUC1DhiwCzv8IyCuY4qlpUMwohwflEz8z/fFC0nYdSu7KUS4eJ+I6U0z /85Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=LNe3hvgyxkqOgtMP39KHBSlFvsuDIP1M2ZSJ4/uygew=; b=ENLUWqG1enmICT9ZZwrvNw2WSjo8NEpFWmdndwYC1wN6DZeFas5V4tiJ8ixwtXBr6t GrSgdwZcSbN3WjCIvsPKSOzrJAbGy2PGhsthD8jA2buFSkffZAUaUeJ0IY+BwtmkIh1r bK2pSKvmE0abqETz93kRrycqkCYkl8Nmomd+GLcd+dDXIi83iSMIz2B2lrG9pDqyx1J3 yqp5u01Y1u7rnMXfeJ+mT5AzI1ySKLpapoaZ5kHyo381CPT/KguLY6r18lpv1aPmggPo V5jKKzExlv2HW8yTmo6iTiZBtMDpQoqDv+CsJv30PEkfwkgp3LgehimA//OKMUR6Jx2/ 3kVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pQ78yNEL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m81si697398oig.190.2020.03.10.23.31.39; Tue, 10 Mar 2020 23:31:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pQ78yNEL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbgCKGbR (ORCPT + 99 others); Wed, 11 Mar 2020 02:31:17 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:49549 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbgCKGbQ (ORCPT ); Wed, 11 Mar 2020 02:31:16 -0400 X-Greylist: delayed 2365 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Mar 2020 02:31:15 EDT Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id 02B6TRrY029044; Wed, 11 Mar 2020 15:29:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 02B6TRrY029044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1583908169; bh=LNe3hvgyxkqOgtMP39KHBSlFvsuDIP1M2ZSJ4/uygew=; h=From:To:Cc:Subject:Date:From; b=pQ78yNELMBLF7QjXDLteBATDFgKPmsdH5/A6TLtLGZgBxh15kdpp2x5o0/Mipr7lR PBAbQ59hfEN4wgZyWhPkVc9j3hIp+lP8z/XpV8IFpBmGwcfX9jUb54LUeokw5Tm31M D2jn/EYj1oAT/AV/vWs8uzkq1UHPTn3ZItSOcjSod6sh2xSAGgDsOkK9AyUCFUEsU2 vTt50UXcXyVM9YndjEppLPkyXdx9+nZEwpMzESjz2566oitfaEWtGMHuEUloJXFmUI bb4PurPwX7S7uvXM2s17YvvyHhHEnxfGo80C/v+CNRN7pzja1S9mWeX+9MoeggNbL1 JNg3Zy9d90lfw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Neil Horman , netdev@vger.kernel.org, "David S . Miller" Cc: Ido Schimmel , Jiri Pirko , Stephen Rothwell , Nicolas Pitre , linux-kbuild@vger.kernel.org, Masahiro Yamada , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH] net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report() Date: Wed, 11 Mar 2020 15:29:25 +0900 Message-Id: <20200311062925.5163-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In net/Kconfig, NET_DEVLINK implies NET_DROP_MONITOR. The original behavior of the 'imply' keyword prevents NET_DROP_MONITOR from being 'm' when NET_DEVLINK=y. With the planned Kconfig change that relaxes the 'imply', the combination of NET_DEVLINK=y and NET_DROP_MONITOR=m would be allowed. Use IS_REACHABLE() to avoid the vmlinux link error for this case. Reported-by: Stephen Rothwell Signed-off-by: Masahiro Yamada --- This build error was reported in linux-next. https://lkml.org/lkml/2020/3/10/1936 If this patch is acceptable, I'd like to get Ack from the maintainers, and insert this patch before my Kconfig change. include/net/drop_monitor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/drop_monitor.h b/include/net/drop_monitor.h index 2ab668461463..f68bc373544a 100644 --- a/include/net/drop_monitor.h +++ b/include/net/drop_monitor.h @@ -19,7 +19,7 @@ struct net_dm_hw_metadata { struct net_device *input_dev; }; -#if IS_ENABLED(CONFIG_NET_DROP_MONITOR) +#if IS_REACHABLE(CONFIG_NET_DROP_MONITOR) void net_dm_hw_report(struct sk_buff *skb, const struct net_dm_hw_metadata *hw_metadata); #else -- 2.17.1