From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754595AbdC1Hfm (ORCPT ); Tue, 28 Mar 2017 03:35:42 -0400 Received: from mga03.intel.com ([134.134.136.65]:12957 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753894AbdC1Hfl (ORCPT ); Tue, 28 Mar 2017 03:35:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,235,1486454400"; d="scan'208";a="1147797121" Date: Tue, 28 Mar 2017 10:35:10 +0300 From: Jarkko Sakkinen To: "Winkler, Tomas" Cc: =?iso-8859-1?B?Suly6W15?= Lefaure , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" Subject: Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: fix unused warnings on suspend/resume functions Message-ID: <20170328073510.3cehco3bccn4wwkm@intel.com> References: <20170317015133.2269-1-jeremy.lefaure@lse.epita.fr> <20170321080353.oh2apppp37nchuw7@intel.com> <5B8DA87D05A7694D9FA63FD143655C1B543B122D@hasmsx108.ger.corp.intel.com> <20170323155117.w6zsewdxc6eeti4b@intel.com> <5B8DA87D05A7694D9FA63FD143655C1B543C8D91@hasmsx108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B543C8D91@hasmsx108.ger.corp.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 28, 2017 at 06:15:56AM +0000, Winkler, Tomas wrote: > > > > > > On Tue, Mar 21, 2017 at 10:05:36PM +0000, Winkler, Tomas wrote: > > > > On Thu, Mar 16, 2017 at 09:51:33PM -0400, Jérémy Lefaure wrote: > > > > > When PM_SLEEP is disabled crb_pm_suspend and crb_pm_resume are > > not > > > > > used by SET_SYSTEM_SLEEP_PM_OPS even if PM is enabled: > > > > > > > > > > drvers/char/tpm/tpm_crb.c:540:12: warning: ‘crb_pm_suspend’ > > > > > defined but not used [-Wunused-function] static int > > > > > crb_pm_suspend(struct device *dev) > > > > > ^ > > > > > drivers/char/tpm/tpm_crb.c:551:12: warning: ‘crb_pm_resume’ > > > > > defined but not used [-Wunused-function] static int > > > > > crb_pm_resume(struct device *dev) > > > > > ^ > > > > > > > > > > The preprocessor condition should be on CONFIG_PM_SLEEP, not on > > > > CONFIG_PM. > > > > > However, this patch fixes this warning by using __maybe_unused on > > > > > function that are in the preprocessor condition. > > > > > > > > > > Signed-off-by: Jérémy Lefaure > > > > > > > > Thanks. Please include also linux-kernel@vger.kernel.org in the future. > > > > > > > > Reviewed-by: Jarkko Saskkinen > > > > > > We should go with Arnd's patch, which is actually the same, but it > > > was already reviewed and has better commit messages. > > > Thanks > > > Tomas > > > > You are right about the commit message but where are the Reviewed-by tags? > > Please add mine. > > > [1] > > > > [1] https://patchwork.kernel.org/patch/9633537/ > > > Tomas I'll keep the existing patch at this point as I do not have time to go through test cycle for another patch. I'm sorry but this came too late. /Jarkko