From patchwork Sat Jul 7 03:49:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10512737 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 D8E72600CA for ; Sat, 7 Jul 2018 03:49:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC1F1287A1 for ; Sat, 7 Jul 2018 03:49:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0684287B1; Sat, 7 Jul 2018 03:49:25 +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=-6.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_SBL 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 623C9287A1 for ; Sat, 7 Jul 2018 03:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932810AbeGGDtY (ORCPT ); Fri, 6 Jul 2018 23:49:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35070 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932790AbeGGDtX (ORCPT ); Fri, 6 Jul 2018 23:49:23 -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:Cc:Subject:From: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=8MONiul9GC57jM6VNfiBP3eG87PQRJPfnGTWHZhtA+A=; b=Bi/1byKOQYgl5msfT/CEcB194 3RcXkwrHdDSQgARGL0RCFXpPBpppa5AnBrtg43Btx3NsI1IrlrkVsv7wTEqh4Sk8KHHwXe4MTgRVw spAajmQgc6PVoE7TaY4BGjaYjss9m71nlH3yPRBcwLw8C9r5ZtbuHT+PtY8xOZUtaU6rUsKP3cFQ9 xikA+hZ+W7bvJAVRPwDZmhf0mWr0OswmOT12nrTi64cCF9PxfDE+LWTdAXg12OCV7uB3QScQaF7QO lviTvZ9UwJv2WAEMc2tyyJ1ECFxOL5teLVzHZzuKLBq8Ew7C7vF7WHzWUFekrxu42mQ4GAfVIzxFL amm6DB37A==; 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 1fbeDr-0008AT-07; Sat, 07 Jul 2018 03:49:23 +0000 To: "linux-block@vger.kernel.org" , axboe From: Randy Dunlap Subject: [PATCH] block/DAC960.c: fix defined but not used build warnings Cc: LKML Message-ID: <880681dd-f72f-6687-d2cc-59116acd5216@infradead.org> Date: Fri, 6 Jul 2018 20:49:19 -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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix build warnings in DAC960.c when CONFIG_PROC_FS is not enabled by marking the unused functions as __maybe_unused. ../drivers/block/DAC960.c:6429:12: warning: 'dac960_proc_show' defined but not used [-Wunused-function] ../drivers/block/DAC960.c:6449:12: warning: 'dac960_initial_status_proc_show' defined but not used [-Wunused-function] ../drivers/block/DAC960.c:6456:12: warning: 'dac960_current_status_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org --- drivers/block/DAC960.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- linux-next-20180706.orig/drivers/block/DAC960.c +++ linux-next-20180706/drivers/block/DAC960.c @@ -21,6 +21,7 @@ #define DAC960_DriverDate "21 Aug 2007" +#include #include #include #include @@ -6426,7 +6427,7 @@ static bool DAC960_V2_ExecuteUserCommand return true; } -static int dac960_proc_show(struct seq_file *m, void *v) +static int __maybe_unused dac960_proc_show(struct seq_file *m, void *v) { unsigned char *StatusMessage = "OK\n"; int ControllerNumber; @@ -6446,14 +6447,16 @@ static int dac960_proc_show(struct seq_f return 0; } -static int dac960_initial_status_proc_show(struct seq_file *m, void *v) +static int __maybe_unused dac960_initial_status_proc_show(struct seq_file *m, + void *v) { DAC960_Controller_T *Controller = (DAC960_Controller_T *)m->private; seq_printf(m, "%.*s", Controller->InitialStatusLength, Controller->CombinedStatusBuffer); return 0; } -static int dac960_current_status_proc_show(struct seq_file *m, void *v) +static int __maybe_unused dac960_current_status_proc_show(struct seq_file *m, + void *v) { DAC960_Controller_T *Controller = (DAC960_Controller_T *) m->private; unsigned char *StatusMessage =