From patchwork Sat Jul 7 03:53:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10512743 X-Patchwork-Delegate: dvhart@infradead.org 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 21E6060545 for ; Sat, 7 Jul 2018 03:53:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE5382877B for ; Sat, 7 Jul 2018 03:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A035F287E0; Sat, 7 Jul 2018 03:53:12 +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 446D42877B for ; Sat, 7 Jul 2018 03:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932642AbeGGDxL (ORCPT ); Fri, 6 Jul 2018 23:53:11 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35554 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932635AbeGGDxL (ORCPT ); Fri, 6 Jul 2018 23:53:11 -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=zsTKV6LtJ2BHSqzOPf+q9/IDBtTfAyHOi0k09SMY1BY=; b=SvSWRheYk58kdWyEqxSKy9rKN 6PNWFFwc8dZ29GbjS3aAjDMl908XwzmtjhdTj8Zt92Vy80AeFsAJxskoUSaLHisjcYOI+6iGxHJOs ftCs67LotndUhhgAdZBRTOzWA9/3xBVtx6yYzUlHBivc2CvGkurWZigtwIjrCjnL+oFvB/6kmJs65 Sq7tNSJJgQmqe2buk6ONFcoXlRt4zQsKwVlsM6anT0YFue64fc3Skl5FcIoEAhRZoTzKdw/fTEsuS uvhDcQQfNV3rTOmB4aI4JpbWL8/9JFY41NlsTKQWHe2M0/ZgVoHQp414syH5lCf5n79pqn1p2ffJD uw2uwQ4cg==; 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 1fbeHW-0001Gt-NS; Sat, 07 Jul 2018 03:53:10 +0000 To: Platform Driver , Darren Hart , Andy Shevchenko Cc: LKML , Azael Avalos From: Randy Dunlap Subject: [PATCH] platform/x86/toshiba_acpi.c: fix defined but not used build warnings Message-ID: <59774e7f-103c-70b1-11bf-b2af16947dc8@infradead.org> Date: Fri, 6 Jul 2018 20:53:09 -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: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap Cc: Azael Avalos Cc: platform-driver-x86@vger.kernel.org Cc: Darren Hart Cc: Andy Shevchenko --- drivers/platform/x86/toshiba_acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux-next-20180706.orig/drivers/platform/x86/toshiba_acpi.c +++ linux-next-20180706/drivers/platform/x86/toshiba_acpi.c @@ -34,6 +34,7 @@ #define TOSHIBA_ACPI_VERSION "0.24" #define PROC_INTERFACE_VERSION 1 +#include #include #include #include @@ -1682,7 +1683,7 @@ static const struct file_operations keys .write = keys_proc_write, }; -static int version_proc_show(struct seq_file *m, void *v) +static int __maybe_unused version_proc_show(struct seq_file *m, void *v) { seq_printf(m, "driver: %s\n", TOSHIBA_ACPI_VERSION); seq_printf(m, "proc_interface: %d\n", PROC_INTERFACE_VERSION);