Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1544706ybe; Fri, 6 Sep 2019 21:05:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq0CLb671Vh9vCnfE+B6k+iHtEsGkmY/jhshg5GrdZHd3HwPDgNNlKe+vZr4HCihPTKgKl X-Received: by 2002:aa7:8bcc:: with SMTP id s12mr14590580pfd.93.1567829108512; Fri, 06 Sep 2019 21:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567829108; cv=none; d=google.com; s=arc-20160816; b=OHxil9hjpelRI3/t7rddrkprjMqnrRDeYGacDaO5mBfmedrI8mxBo2Dzdw0xd2YZs4 qrWtgMXIQCYYf8sdUxvLprERLtpNRyMRZsHUSXEsIlyGK9RM/13Adm0rP+mvVikhs/lI wI+fjsFe1OvsPBEadytqScuoaJMNu8CPd0BiGXcPMiKSoGnSxDDh5nOBknoAiRgJP9aa YMG2eeI2NFWsk2bUoVIiCfjLFXGjmA8Svso0mvVSb00QvSNmAQaVLThNfo+YqI5/o6JO /vnPm1OZBXF7kNWEs/7hROefquhACEhiwJRGByEiPMXz3IvAduFxEUQLN9TGnaSqToNs mlig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gVipEgoxrF27DsHGbInXS36lsJpOtNNkdk6SgXikS5k=; b=wam9WMGXUwlI3I22x5P/eKuw3dOIJbcekRRxDcE+hquXdbn8SCSJZW36qVl0jAg0cQ E3QlXrMsNXOZq9iXVBoLOcPlDTSyk7XnM1fLwbfMWYmm/ja8jheurTkmXoJCykC9Q+5I gxZF7WXVDOd4Ln6TbP+FSxv90kaBvQsAoyVcejvJXfqLtvYHmHx0UvmYo12KFKeVeEiz CGLK2LCTs6b1PC4SiyUaHPvDLgj2K6meX+GY7a+FBgT7jkLL0M6s56kwInQJ6b82EZB3 hLNR0As5o0gMKZ/DYCWfBdPrmS9y0TiTXKvZCuOs8o4NS/6Ep2NP6nYg9BbkOQ50Gl+F ixeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mPrzJ9MM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si6613043pjr.98.2019.09.06.21.04.18; Fri, 06 Sep 2019 21:05:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mPrzJ9MM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394720AbfIFPYd (ORCPT + 99 others); Fri, 6 Sep 2019 11:24:33 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:60974 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbfIFPYd (ORCPT ); Fri, 6 Sep 2019 11:24:33 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x86FOLWJ098120; Fri, 6 Sep 2019 10:24:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1567783461; bh=gVipEgoxrF27DsHGbInXS36lsJpOtNNkdk6SgXikS5k=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=mPrzJ9MMOKQiSbr5BfacTf0AU7NQs/27P5s2ZRYa/4hcc9y7atf0wbKOncIvwpNYE s/QZ8fBvyAVRR1R8kP3VS5HMFEJnVLiOByu3xcKoIpkCHaK0VmKmVp71XFBvJcctFB HPG09dKcYuOoRPrCRcp0aY5KBfTtEugcu/kDtEXc= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x86FOLrm000639 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 6 Sep 2019 10:24:21 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 6 Sep 2019 10:24:20 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 6 Sep 2019 10:24:19 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x86FOJgV033402; Fri, 6 Sep 2019 10:24:19 -0500 Subject: Re: [PATCH] iommu: omap: mark pm functions __maybe_unused To: Arnd Bergmann , Joerg Roedel CC: Joerg Roedel , Tero Kristo , Will Deacon , , References: <20190906151551.1192788-1-arnd@arndb.de> From: Suman Anna Message-ID: <20150686-f14c-389b-7345-699cee191116@ti.com> Date: Fri, 6 Sep 2019 10:24:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190906151551.1192788-1-arnd@arndb.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On 9/6/19 10:15 AM, Arnd Bergmann wrote: > The runtime_pm functions are unused when CONFIG_PM is disabled: > > drivers/iommu/omap-iommu.c:1022:12: error: unused function 'omap_iommu_runtime_suspend' [-Werror,-Wunused-function] > static int omap_iommu_runtime_suspend(struct device *dev) > drivers/iommu/omap-iommu.c:1064:12: error: unused function 'omap_iommu_runtime_resume' [-Werror,-Wunused-function] > static int omap_iommu_runtime_resume(struct device *dev) > > Mark them as __maybe_unused to let gcc silently drop them > instead of warning. Curious, what defconfig is this? OMAP drivers won't be functional in general without pm_runtime, so CONFIG_PM is mandatory. But from just a CONFIG_PM option point of view, agree with the patch. > > Fixes: db8918f61d51 ("iommu/omap: streamline enable/disable through runtime pm callbacks") > Signed-off-by: Arnd Bergmann Acked-by: Suman Anna > --- > drivers/iommu/omap-iommu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c > index 451e3c98ab2d..09c6e1c680db 100644 > --- a/drivers/iommu/omap-iommu.c > +++ b/drivers/iommu/omap-iommu.c > @@ -1019,7 +1019,7 @@ EXPORT_SYMBOL_GPL(omap_iommu_domain_activate); > * reset line. This function also saves the context of any > * locked TLBs if suspending. > **/ > -static int omap_iommu_runtime_suspend(struct device *dev) > +static __maybe_unused int omap_iommu_runtime_suspend(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > struct iommu_platform_data *pdata = dev_get_platdata(dev); > @@ -1061,7 +1061,7 @@ static int omap_iommu_runtime_suspend(struct device *dev) > * reset line. The function also restores any locked TLBs if > * resuming after a suspend. > **/ > -static int omap_iommu_runtime_resume(struct device *dev) > +static __maybe_unused int omap_iommu_runtime_resume(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > struct iommu_platform_data *pdata = dev_get_platdata(dev); >