From patchwork Fri Jan 11 09:51:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155316 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp374054jaa; Fri, 11 Jan 2019 01:52:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN6UEF+/TxtRbgKVmGfHiTBg03pSasXyqq4T4oE7NrUZYuI+EeP86s6RSWUxDAgfeJihgH/P X-Received: by 2002:a62:53c5:: with SMTP id h188mr13661435pfb.190.1547200331095; Fri, 11 Jan 2019 01:52:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547200331; cv=none; d=google.com; s=arc-20160816; b=IDWoKzIRZ87LQdcw7oirKr+o4jIkAt7IRUTf/DI8kZxAYFOrTTGQ/UGM68uNlZS29s 9BYLaFtcJ7CWKwCmTKsQzmvCQHjnGZlOsIDCf5gBG920OsqFFTqtxoILcDHVcYvw0yZu 2CWD+61rz53YnrWafeghTOCKvo4SQRmok9w/OwilQnIE4vBUgQDBYq8WSVPd9WNhOId/ 8EElaodvI9gGcWvnF1wiXiUpylc/L7SY3wqQXKi7NQ/qbwOfP1MgFfK8fcjzWY/8MnEl 6GH7Hipjbs/jn0UlRl9KNSafJPwWy3236nFvTYln1Lm6ptW2S+2Nju9HZPdyiew8xQKN qkBQ== 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=uPlhz8+UarIqj0moNDAT1BJxp5C9Ycepbh7Dp46T1VE=; b=ZoTexqsPVKdBpp0Xn/XoQ3WNJE8DqQWsLXtUFt9D/8EloQWODX+P1VytUi0hd0G1ul jJvH4uVZ8mX7A2q7VORrdmcAFhs+7uPrXnFu9WQDjirs01lmSEtod9mbnVprTlLv2TSB Lhq/YR9kMRFqbMNhFteutBs6B5OT4RijzlQtUBah+ba/LBkvZeeaQbZUQkhPJPPaI3Yj MexKxJitIqpEukmt1F3qlSGFihmOvpMDzkErv224txrdOq+3qADTqp+FQ7qC9192K2md 79mIA8fBvf1zxGJzFAJAmXnXalyghJszOIxDJg3UPR5M6nJidgKPm9hFea11EAqRiJ0x fmEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=m1CrWt+K; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce19si11711980plb.13.2019.01.11.01.52.10; Fri, 11 Jan 2019 01:52:11 -0800 (PST) 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=m1CrWt+K; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731441AbfAKJwJ (ORCPT + 31 others); Fri, 11 Jan 2019 04:52:09 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:44615 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730155AbfAKJwJ (ORCPT ); Fri, 11 Jan 2019 04:52:09 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id x0B9plH7031412; Fri, 11 Jan 2019 18:51:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x0B9plH7031412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547200308; bh=uPlhz8+UarIqj0moNDAT1BJxp5C9Ycepbh7Dp46T1VE=; h=From:To:Cc:Subject:Date:From; b=m1CrWt+KQBIGIL2AVDSjylS6NDLS5eHFsXFshZmb1OvKAY7OBL+aX8yDHBzIGfwWY L0fn+wQYaGfqzG/b8kurmGTBiycShYwFG3ltKMxSeQe//OUkTfmbNxqkwDkAGkGb9T V/s41VbyvsFnjmSUNC0U/L8f/HtjvohMwdaHOh8+SMxmU3CdzVh/K9/9T3U/dHlUfC U29DQfIxFNjY6w3NF9K1R/VJNH2B+uGiaL9K8woTvsvpFaTgSYKn+3G0XUo6qjzp0B cA9kPyws0qjqStfs0m4z0jr7q2jAo4WghmYLjOaI7n+1h0+7AAJSQUJWnD/CexE3Vw +YwRCVQHLKwlQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Luis Chamberlain Cc: Masahiro Yamada , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: [PATCH] firmware_loader: move CONFIG_FW_LOADER_USER_HELPER switch to Makefile Date: Fri, 11 Jan 2019 18:51:32 +0900 Message-Id: <1547200292-17028-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The whole code of fallback_table.c is surrounded by #ifdef of CONFIG_FW_LOADER_USER_HELPER. Move the CONFIG_FW_LOADER_USER_HELPER switch to Makefile so that it is not compiled at all when this CONFIG option is disabled. I also removed the confusing comment, "Module or buit-in [sic]". CONFIG_FW_LOADER_USER_HELPER is a boolean option. (If it were a module, CONFIG_FW_LOADER_USER_HELPER_MODULE would be defined instead.) Signed-off-by: Masahiro Yamada --- drivers/base/firmware_loader/Makefile | 2 +- drivers/base/firmware_loader/fallback_table.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/base/firmware_loader/Makefile b/drivers/base/firmware_loader/Makefile index a97eeb0..5c7f422 100644 --- a/drivers/base/firmware_loader/Makefile +++ b/drivers/base/firmware_loader/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for the Linux firmware loader -obj-y := fallback_table.o +obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o obj-$(CONFIG_FW_LOADER) += firmware_class.o firmware_class-objs := main.o firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c index 7428659..776dd69 100644 --- a/drivers/base/firmware_loader/fallback_table.c +++ b/drivers/base/firmware_loader/fallback_table.c @@ -16,9 +16,6 @@ * firmware fallback configuration table */ -/* Module or buit-in */ -#ifdef CONFIG_FW_LOADER_USER_HELPER - static unsigned int zero; static unsigned int one = 1; @@ -51,5 +48,3 @@ struct ctl_table firmware_config_table[] = { { } }; EXPORT_SYMBOL_GPL(firmware_config_table); - -#endif