From patchwork Wed Mar 11 06:29:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 222716 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0E62C10F25 for ; Wed, 11 Mar 2020 06:31:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCA8A2146E for ; Wed, 11 Mar 2020 06:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583908284; bh=8SsBRXFmmmDVGan7MrP5vKcG+kRpkshnPw09AhaCRRw=; h=From:To:Cc:Subject:Date:List-ID:From; b=tKsxqLBbgeAa77KpY0V76SCiy45RGKmvgJPAXUzoqpNzZ6g7vNgQkZ2zv5xOiouwR /bOLaMgVFSTDsTWlmvZpcZuFz6P5DPaOsMDSiVf2ahU73GN578M8CNgZye5yeSoz1h fbSL5WUw6Ak3yh/XT8293G4JIZ2f5MOPSWZlDGQE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728253AbgCKGbR (ORCPT ); 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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