From patchwork Mon Mar 1 16:10:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 389590 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=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 96422C433E6 for ; Mon, 1 Mar 2021 18:46:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6545160C3D for ; Mon, 1 Mar 2021 18:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232573AbhCASq3 (ORCPT ); Mon, 1 Mar 2021 13:46:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:51580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234718AbhCASjw (ORCPT ); Mon, 1 Mar 2021 13:39:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACDE865057; Mon, 1 Mar 2021 17:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619282; bh=SXwRkkWMscxW1zS486YfdL6JbMjdQZidxAyHEx17ZiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OnO7uOZTP5ptn8dnPl80Tmkw/FpgcnxynBX8iGGoUF8rOvdfN9Ru14L+2eq9AQ6Wa yl5Jw2UbMDsZn96qgNM46/7wZsP8ZT1rrHQYa0vh23pTpVZxXoP9XWCFb63c6gYGzC bUVVufYToAcdi0zFJ00Uu/14ZznKEwniPg5RWh/g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Randy Dunlap , Alexey Dobriyan , Andrew Morton , Lars Kotthoff , "David S. Miller" , sparclinux@vger.kernel.org, Sasha Levin Subject: [PATCH 5.10 391/663] sparc: fix led.c driver when PROC_FS is not enabled Date: Mon, 1 Mar 2021 17:10:39 +0100 Message-Id: <20210301161201.209095372@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Randy Dunlap [ Upstream commit b3554aa2470b5db1222c31e08ec9c29ab33eabc7 ] Fix Sparc build when CONFIG_PROC_FS is not enabled. Fixes this build error: arch/sparc/kernel/led.c:107:30: error: 'led_proc_ops' defined but not used [-Werror=unused-const-variable=] 107 | static const struct proc_ops led_proc_ops = { | ^~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: 97a32539b956 ("proc: convert everything to "struct proc_ops"") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Lars Kotthoff Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- arch/sparc/kernel/led.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c index bd48575172c32..3a66e62eb2a0e 100644 --- a/arch/sparc/kernel/led.c +++ b/arch/sparc/kernel/led.c @@ -50,6 +50,7 @@ static void led_blink(struct timer_list *unused) add_timer(&led_blink_timer); } +#ifdef CONFIG_PROC_FS static int led_proc_show(struct seq_file *m, void *v) { if (get_auxio() & AUXIO_LED) @@ -111,6 +112,7 @@ static const struct proc_ops led_proc_ops = { .proc_release = single_release, .proc_write = led_proc_write, }; +#endif static struct proc_dir_entry *led;