Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8973489ybi; Wed, 10 Jul 2019 02:34:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+Q9oXJ97mYWE8pKc40fgepNfREQnbwGPSk0WhZb+Flkk32OsQtaZalXuMhrJZlCQCjtnu X-Received: by 2002:a17:902:4e25:: with SMTP id f34mr37495133ple.305.1562751299647; Wed, 10 Jul 2019 02:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562751299; cv=none; d=google.com; s=arc-20160816; b=d0J7akArGXS8J3Eu9fj9UYPwQGKQHK75paqrlwMMopenoe7bygRwEAsuc6Tm4pCdbL chTaNLEJHAMPAo1M3a6CFHcdJzhuNYkj9vJWOpK0WAgGtqMZbvOiHwz+iLCVEpkHTTCD t4VG8JEcNjSr//bVOODN7HiFBZa4ZW3eZwf2MFuntTwJSnTOViNGSBi4qmhRBAvX7Iak mbnz2Ahc+5HrBq+WM+vxpb+4GxV27g7dZSRb2iMDDKwMVjQBYbisWAPI/J5wx5qu4Tb6 Rlda5G0z9HVRcgUy5RkQSgZZTqNBIYtqv3HkXkpxkUMdR7rK5P+q5E9YLeELuXpqxtul IWgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=bi8N7CWE6lC4ARXtO4s5ldFSbTpMxdLou7FJCsAXw/g=; b=PydsHYyQ4vEPAZIKw1ztlx7jE31rSLlHQEivqlaQMn8oDCfe9MLbRTwZA3pkAIvFZM 9lh04wIV2/t1/MuRm99LoBHRX50ngf9eChPBS3zsBhMVytdwGl4QZ7CB5FbWfjv00sjN tEupNaEyd0wH9Pm5b53fnsSY5JyJNli5mlA3xheqYI5qLYUJTjzCULYQ2gBkK56cE+IN fGWdJcuYsp/IEHsOgnGB7jaWOO/ot5UWf5KPxiFzRYDRZlHKZHMt7PUVGCHoNcqvwh6P x2TanxLp1m9g1b9FuQ4zks4xY7VJuCDyize3ax/516g3Ouky3CLp859bY1J25K8zF1vZ X1lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=dM7LIw5R; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j67si1592591plb.195.2019.07.10.02.34.44; Wed, 10 Jul 2019 02:34:59 -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=@nvidia.com header.s=n1 header.b=dM7LIw5R; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727512AbfGJImT (ORCPT + 99 others); Wed, 10 Jul 2019 04:42:19 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:9818 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbfGJImS (ORCPT ); Wed, 10 Jul 2019 04:42:18 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 10 Jul 2019 01:42:16 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 10 Jul 2019 01:42:17 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 10 Jul 2019 01:42:17 -0700 Received: from [10.26.11.158] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Jul 2019 08:42:15 +0000 Subject: Re: [PATCH] dmaengine: tegra210-adma: mark PM funtions as __maybe_unused To: Arnd Bergmann , Laxman Dewangan , Vinod Koul , Thierry Reding CC: Sameer Pujar , Vinod Koul , "Dan Williams" , , , References: <20190709185703.3298951-1-arnd@arndb.de> From: Jon Hunter Message-ID: Date: Wed, 10 Jul 2019 09:42:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190709185703.3298951-1-arnd@arndb.de> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1562748136; bh=bi8N7CWE6lC4ARXtO4s5ldFSbTpMxdLou7FJCsAXw/g=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=dM7LIw5R5ylXOhzW7mX5YFFXLcuvsULHmfWDylGOu7R2idV8m+fe5i6lVbdXziTmt lqhaTZ/NWO60TlT8fC2OHRJt7dAdywrZijioqw0pAkIFfsbTVluMrFlVZOIwbenK0l 56ILcowl4HYCus1m+41Z9Hh35zCmZTQ2EF0ErdQbiUpUxUvT9Y3r4Zuf+JZSzG8Of4 765Li784TLcym31p4M5Xtn6vovxEn8nvwFK9kvc/ahuDdhu2J10a7o0pw4BcRA5l9w tQGPVdqssQJNtIGNNQyXc5AV5kRojetcQg8cHOSiSdOGTJUFee/G/YInxROcNunNOw M2U8whkNj7pIg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2019 19:56, Arnd Bergmann wrote: > Without the CONFIG_PM_CLK dependency, we can now build this file > in kernels that don't have CONFIG_PM at all, resulting in a harmless > warning from code that was always there since it got merged: > > drivers/dma/tegra210-adma.c:747:12: error: 'tegra_adma_runtime_resume' defined but not used [-Werror=unused-function] > static int tegra_adma_runtime_resume(struct device *dev) > ^~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/dma/tegra210-adma.c:715:12: error: 'tegra_adma_runtime_suspend' defined but not used [-Werror=unused-function] > static int tegra_adma_runtime_suspend(struct device *dev) > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > Mark them __maybe_unused to let the compiler silently drop > those two functions. > > Fixes: 3145d73e69ba ("dmaengine: tegra210-adma: remove PM_CLK dependency") > Fixes: f46b195799b5 ("dmaengine: tegra-adma: Add support for Tegra210 ADMA") > Signed-off-by: Arnd Bergmann > --- > drivers/dma/tegra210-adma.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c > index 2805853e963f..2b4be5557b37 100644 > --- a/drivers/dma/tegra210-adma.c > +++ b/drivers/dma/tegra210-adma.c > @@ -712,7 +712,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec, > return chan; > } > > -static int tegra_adma_runtime_suspend(struct device *dev) > +static __maybe_unused int tegra_adma_runtime_suspend(struct device *dev) > { > struct tegra_adma *tdma = dev_get_drvdata(dev); > struct tegra_adma_chan_regs *ch_reg; > @@ -744,7 +744,7 @@ static int tegra_adma_runtime_suspend(struct device *dev) > return 0; > } > > -static int tegra_adma_runtime_resume(struct device *dev) > +static __maybe_unused int tegra_adma_runtime_resume(struct device *dev) > { > struct tegra_adma *tdma = dev_get_drvdata(dev); > struct tegra_adma_chan_regs *ch_reg; > Thanks Arnd, but looks like Yue has beaten you to it again ;-) https://www.lkml.org/lkml/2019/7/9/209 Cheers Jon -- nvpublic