From patchwork Sat Jul 7 15:25:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10512907 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EF0A60532 for ; Sat, 7 Jul 2018 15:25:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2774628882 for ; Sat, 7 Jul 2018 15:25:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1862E28891; Sat, 7 Jul 2018 15:25:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FD3728882 for ; Sat, 7 Jul 2018 15:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754054AbeGGPZE (ORCPT ); Sat, 7 Jul 2018 11:25:04 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41924 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753630AbeGGPZE (ORCPT ); Sat, 7 Jul 2018 11:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NOUy7QE3X1v40J9zfeddLx14I+ESm9ryf3SOQOfJs9g=; b=jZZ1CdvS3wOydetZ5tgvLq+M5 LrPMuhwV5Sf+V+Hm3iLFXRDMnaq9CstEhXHjd5j/FMZkDVR1x8IhWM4u6OmT9PQaG055qBvBatQ1+ J6x6CTl3mM0jvx3xjy2vL4gOhdKc48H+kJl7O0I23b38SbPZ00d76Z1c68F00K0iqvysZcJiv/6JQ uKzeS/bmxErVx4jxsO6FehmKo6wymMja0yWHXcmfdS/XlozrvCyjCuG3zHP5ThVm3DxWhAESVxBwE 5xAqLdY61WwEfslpdD544YTATCGws6WW4uCHMYK7TXkfEqt+fCpRq6PVgcgTExVtnEiyY96FmhL2/ 2lJiIG90w==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbp54-0007b1-Lu; Sat, 07 Jul 2018 15:25:02 +0000 To: ACPI Devel Mailing List , "Rafael J. Wysocki" Cc: Len Brown , LKML From: Randy Dunlap Subject: [PATCH] acpi/button.c: fix defined but not used warning Message-ID: <2e91930f-c762-532b-6607-223385078edb@infradead.org> Date: Sat, 7 Jul 2018 08:25:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix a build warning in the ACPI button driver when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/acpi/button.c:252:12: warning: 'acpi_button_state_seq_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-acpi@vger.kernel.org --- drivers/acpi/button.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-next-20180706.orig/drivers/acpi/button.c +++ linux-next-20180706/drivers/acpi/button.c @@ -21,6 +21,7 @@ #define pr_fmt(fmt) "ACPI: button: " fmt +#include #include #include #include @@ -249,7 +250,8 @@ static int acpi_lid_notify_state(struct return ret; } -static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) +static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq, + void *offset) { struct acpi_device *device = seq->private; int state;