Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4016224pxb; Wed, 13 Oct 2021 18:34:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIA7DNUJ06CNLPZePmgI/BdC/7jt8nt2h2xyHTxU6JXOThRIGps4pX/ZWTKgAoXK9BPH1k X-Received: by 2002:a17:906:9601:: with SMTP id s1mr387310ejx.68.1634175284734; Wed, 13 Oct 2021 18:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634175284; cv=none; d=google.com; s=arc-20160816; b=agtmKWLFbW07chhNr3dqL3gQkSmAezf8tH327Rt3ImCh6a+f++4tYqjPmjuaEQoZMg 7yLVWfGLwvMUhDlIMHvrVCxV4dyTFb4+8a9zD13H9IR6Oz6lREAa1Ws0Xx3suw8+2c95 7Avu0FT+H0Aan16J4fVv68Ay0GkystqjNC58Shp3+yQNYwC+0CgFgldvTrJE9BwggRfL Z5I8DvLH0LMt7NVSSM9fz7KIwkNDcyTxrP90+Z9RXa50/DlZNpbkGA0Fa+KKexXFWn2G Lx+nhEwzQweZp3y+MSpHuAaNThSC2FWwc77IQehONL7c0nVKLEqNFpuAGvd9bNVRKiG/ GbgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jI4lp8jWiDO0oldK1UX6OyM+f179E6XGMY7JyqU/mPg=; b=qGdKWUNT/3zUCIKkuhQ93YZmo1NoTsfB3VPZor3dgi7uHC2cb6wG39PWMUs/Qzh7xG VmYSIHLRXGWvqdG6KzPICubyNa5WDniqn6QY/w9nTViaIqh6t/LmcfinkDHMqvrJxud0 7yHE0XMJEUj/zRt/18nH1xVvhIWTP5BogAb2La0IqI7OKVnD3/VrWyEfOcZ4qxVLwYM3 9qC/arLhjGOgOpM0k05VNitRloqT5O9J5nZwC64GJ/6oaMhPJGZhMo8qL/VrTIOESlN6 LoCW6FN7kjvmaY0ZYgmzecc/PAmIPDu4lx1zsqmHA2Do2GjGR42FDHysxJ5P4Z6zsY7R xPtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mq22si1684410ejc.734.2021.10.13.18.34.20; Wed, 13 Oct 2021 18:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhJNBby (ORCPT + 99 others); Wed, 13 Oct 2021 21:31:54 -0400 Received: from mx22.baidu.com ([220.181.50.185]:44984 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229496AbhJNBbx (ORCPT ); Wed, 13 Oct 2021 21:31:53 -0400 Received: from BC-Mail-EX08.internal.baidu.com (unknown [172.31.51.48]) by Forcepoint Email with ESMTPS id 39C2A29B1AAFB2FFB82D; Thu, 14 Oct 2021 09:29:36 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX08.internal.baidu.com (172.31.51.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 14 Oct 2021 09:29:35 +0800 Received: from localhost (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 14 Oct 2021 09:29:35 +0800 Date: Thu, 14 Oct 2021 09:29:36 +0800 From: Cai Huoqing To: Arnd Bergmann CC: Jonathan Cameron , Shawn Guo , Sascha Hauer , Fabio Estevam , Arnd Bergmann , Lars-Peter Clausen , Pengutronix Kernel Team , NXP Linux Team , , , Subject: Re: [PATCH] iio: imx8qxp-adc: mark PM functions as __maybe_unused Message-ID: <20211014012936.GA2999@LAPTOP-UKSR4ENP.internal.baidu.com> References: <20211013144338.2261316-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211013144338.2261316-1-arnd@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13 10月 21 16:43:26, Arnd Bergmann wrote: > From: Arnd Bergmann > > Without CONFIG_PM_SLEEP, the runtime suspend/resume functions > are unused, producing a warning: > > drivers/iio/adc/imx8qxp-adc.c:433:12: error: 'imx8qxp_adc_runtime_resume' defined but not used [-Werror=unused-function] > 433 | static int imx8qxp_adc_runtime_resume(struct device *dev) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/iio/adc/imx8qxp-adc.c:419:12: error: 'imx8qxp_adc_runtime_suspend' defined but not used [-Werror=unused-function] > 419 | static int imx8qxp_adc_runtime_suspend(struct device *dev) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Mark them as __maybe_unused to shut up the compiler. > > Fixes: 7bce634d02e6 ("iio: imx8qxp-adc: Add driver support for NXP IMX8QXP ADC") > Signed-off-by: Arnd Bergmann Reviewed-by: Cai Huoqing > --- > drivers/iio/adc/imx8qxp-adc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/imx8qxp-adc.c b/drivers/iio/adc/imx8qxp-adc.c > index 5030e0d8318d..901dd8e1b32f 100644 > --- a/drivers/iio/adc/imx8qxp-adc.c > +++ b/drivers/iio/adc/imx8qxp-adc.c > @@ -416,7 +416,7 @@ static int imx8qxp_adc_remove(struct platform_device *pdev) > return 0; > } > > -static int imx8qxp_adc_runtime_suspend(struct device *dev) > +static __maybe_unused int imx8qxp_adc_runtime_suspend(struct device *dev) > { > struct iio_dev *indio_dev = dev_get_drvdata(dev); > struct imx8qxp_adc *adc = iio_priv(indio_dev); > @@ -430,7 +430,7 @@ static int imx8qxp_adc_runtime_suspend(struct device *dev) > return 0; > } > > -static int imx8qxp_adc_runtime_resume(struct device *dev) > +static __maybe_unused int imx8qxp_adc_runtime_resume(struct device *dev) > { > struct iio_dev *indio_dev = dev_get_drvdata(dev); > struct imx8qxp_adc *adc = iio_priv(indio_dev); > -- > 2.29.2 >