Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1460541ybi; Thu, 30 May 2019 18:28:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlg8x/aMv0FtXNhXivexnoPzFuTTQmNorNw8M3en+w6vVthz2dWD7B/0NzgRnVZKckOxUe X-Received: by 2002:a17:90a:a00b:: with SMTP id q11mr6230618pjp.108.1559266101455; Thu, 30 May 2019 18:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559266101; cv=none; d=google.com; s=arc-20160816; b=OtlF7XCW24EM1RhOj7qmAb1Gy9MNtzrM0Pr71Pi4iwEbwwAZUGjl36uggm66lC2xA4 yYyF2YsUMPr+In2UqWwaRdXsLuHZIJNPKDnt/B6H7QlIENDqW10Ha7XLFCmal7cNB+9f YqN9wUro2z4Y/6XtklBChYaw2s08SIuDofuuuelzzTqA7LkVqaWGdPrAOZXO2tcskuii 1d0SvpWaEh9hqHfP2nGEPZy/R/DSiKnEq+ZVbNpG2ISYmb6/9xD7WpPockSw3VAV9MM8 yxcgE8IvbBBGFgB6jb9AqAAYnjTlBoyZbtKf/Qeb19Dg4eR9GxhV6VzjZH61G7jtpUfV UgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=t0sFJ+EYxI4EKJT8VIe7qCNZk0SzI2C+OaplHVJywBM=; b=Jwzff6M1MYDOGChNxxx1SLnXPDV7F/63X5VnvzWG7BNoQlLAXXA8WcJCLl8HYdtAMI 8YBHQNATfe8Q2ryFWvXM5YBZTGTToqnSMcr7piL4ZEgMPgUmk8Ys1PFIL8C58Yu9rw/c 4VFfZ5kOgd6opJy2wewogYYgeqXAEOIsR0R2u7kWMsi4B9YpkbUQvv3BZEEdAxXT9n9C g8b/Pr8NATSzgHWzwR4sC60br24mI+F63sAxabwJotU9CwhoAG+cIEPQEyR31mXBDKAp PD2EFg+rFGk/tUKocJCW8Au+53QapTvRNqNbf3nubOfyq9SBeCS2YKIleTpy4oIiqQVR PMdw== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si4309989pgb.427.2019.05.30.18.28.05; Thu, 30 May 2019 18:28:21 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfEaB0y (ORCPT + 99 others); Thu, 30 May 2019 21:26:54 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36476 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfEaB0x (ORCPT ); Thu, 30 May 2019 21:26:53 -0400 Received: by mail-wm1-f66.google.com with SMTP id v22so4871908wml.1 for ; Thu, 30 May 2019 18:26:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t0sFJ+EYxI4EKJT8VIe7qCNZk0SzI2C+OaplHVJywBM=; b=MM3NZhkRqEZby7udov/nhFLbyXtzzG0J3WLVIf6e5YI159z/RwXAyoB5N2sABYs3oM H7z4jVqhv0ru+ajyvndAE7z3CHX1a06GRnD9rta96PB8mPzlKQNUxHbyLl0FzOIpiNwp 4qHP1EUBlRbRKzuAxTByl35aVRrHb+NUJQWhEgnPrcIcGTiXLfMABC0pNW4/yfq0ZPrZ VDteNeAsvOrAGuDJaDc4Ck2KF6kadHRRnaMm5rypUjiJPlZyqjWDXtd1rWeqAet/kWYV 8SYxOzScVe3C4fzKPRRvVKlopY35N3Co2fppkoE7AgtwV0mu0uUt1QXnVOrHcCcdviOS 9ZAQ== X-Gm-Message-State: APjAAAXwEueOkyK2PMBaXo4UmEfPudbNhr99dupf6YBojSVqVKe89lvm FiqMl6o6y6BGXvDmH8gXUuVkHKr6dhQ= X-Received: by 2002:a7b:c8d7:: with SMTP id f23mr2631741wml.4.1559266011769; Thu, 30 May 2019 18:26:51 -0700 (PDT) Received: from raver.teknoraver.net (net-93-144-152-91.cust.vodafonedsl.it. [93.144.152.91]) by smtp.gmail.com with ESMTPSA id w3sm2974112wrv.25.2019.05.30.18.26.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 18:26:50 -0700 (PDT) From: Matteo Croce To: Stephen Rothwell , Randy Dunlap , Linux Next Mailing List Cc: Luis Chamberlain , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH] firmware_loader: fix build without sysctl Date: Fri, 31 May 2019 03:26:49 +0200 Message-Id: <20190531012649.31797-1-mcroce@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org firmware_config_table has references to the sysctl code which triggers a build failure when CONFIG_PROC_SYSCTL is not set: ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals' ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals' ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals' ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals' Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL. Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check") Reported-by: Randy Dunlap Signed-off-by: Matteo Croce --- drivers/base/firmware_loader/fallback_table.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c index 58d4a1263480..18d646777fb9 100644 --- a/drivers/base/firmware_loader/fallback_table.c +++ b/drivers/base/firmware_loader/fallback_table.c @@ -23,6 +23,8 @@ struct firmware_fallback_config fw_fallback_config = { }; EXPORT_SYMBOL_GPL(fw_fallback_config); +#ifdef CONFIG_PROC_SYSCTL + struct ctl_table firmware_config_table[] = { { .procname = "force_sysfs_fallback", @@ -45,3 +47,5 @@ struct ctl_table firmware_config_table[] = { { } }; EXPORT_SYMBOL_GPL(firmware_config_table); + +#endif -- 2.21.0