From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757515AbcCCN2l (ORCPT ); Thu, 3 Mar 2016 08:28:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:40373 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbcCCN2k (ORCPT ); Thu, 3 Mar 2016 08:28:40 -0500 Date: Thu, 3 Mar 2016 14:28:37 +0100 From: Johannes Thumshirn To: Sudip Mukherjee Cc: "Martin K. Petersen" , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH] mvumi: fix build warning Message-ID: <20160303132837.GM25301@c203.arch.suse.de> References: <1457010413-12809-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1457010413-12809-1-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 03, 2016 at 06:36:53PM +0530, Sudip Mukherjee wrote: > While building tilepro allmodconfig we were getting build warning: > drivers/scsi/mvumi.c:2632:12: warning: 'mvumi_suspend' defined but not used > drivers/scsi/mvumi.c:2651:12: warning: 'mvumi_resume' defined but not used > > mvumi_suspend() and mvumi_resume() are only used when CONFIG_PM is > defined as mentioned in the mvumi_pci_driver. > > Signed-off-by: Sudip Mukherjee > --- > drivers/scsi/mvumi.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c > index 02360de..d9d0736 100644 > --- a/drivers/scsi/mvumi.c > +++ b/drivers/scsi/mvumi.c > @@ -2629,6 +2629,7 @@ static void mvumi_shutdown(struct pci_dev *pdev) > mvumi_flush_cache(mhba); > } > > +#ifdef CONFIG_PM > static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state) > { > struct mvumi_hba *mhba = NULL; > @@ -2716,6 +2717,7 @@ fail: > > return ret; > } > +#endif > > static struct pci_driver mvumi_pci_driver = { > > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html There was a patch from Arnd earlier this day addressing this as well with a __maybe_unused. You might want to have a look at this one https://lkml.org/lkml/2016/3/2/497 -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850