Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp874195pxb; Wed, 1 Sep 2021 11:50:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRxmmRHvbrcjUk2SKrEobodvmGYVz9dmVGvSEqMORcHHplkiZh4DRhFdaDwi6LYTRXCaSq X-Received: by 2002:a05:6e02:1294:: with SMTP id y20mr671284ilq.42.1630522214102; Wed, 01 Sep 2021 11:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522214; cv=none; d=google.com; s=arc-20160816; b=tlDUJb87SFkY8/EaKb0pXeWSY+hHpWV9ebVau+KEPwo6LxaovXl0Cquy49iEvYeC9e fmUJQfmtSyMNEUFVZ+St5IMALtvQsjvP4wgd9frf/ErONfut5f2JSdCeT68CtfsIoNU7 XF/JrtZi0unlzcPDTXCh/pN5KKLzWx2zPb94rC9B7rJfhrJmfh4Uz5ZC9hB42CMixNbP XOEohO3ZwX+VdS1515NCUG4y3yA3DxBEb4oDBFPcgvZcHSArECQIya3Lb89Ld6SJ73+7 Pas466ihrOTzDMRdO6ib/4wG3wCUUC9Hus2tmL7CeGRnxQ9Km75u7n9td1rjtuKaaFSI uauA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1oA3g4WV8hAam/6kv0LvNABd7SgAakZdIKN0HgyLQxU=; b=UEDqfh2cekCGVeHayCF8SxgOc8WEMoDI8t5KgElewS3Gr6mNruTEcSpWx/IYDN06/D 7P3O5is6ZrrtqUQX1pEGWf2mjUMEQ2NEM44YW8upe3l+kSB0F4vL7QLJlQ1mnbssbR7U kxYa5v+XwpefPtiryrJfdf+novoaQHNGlZHKNtH3xT60Fgz3mcPXsx5mtXI3hrBj8glh PDUAhzZKzcgfpmsNsyR4uh6p+Yf2bg2ikfkFfZVJ1qOJl3G3vjDJO2wX+OyVMwPpz+2O b/oWx4rG76w3PajI43reeYyLDUlBk6Am0HDNS71Bn9A5CHMQOM9HfREh+/o+ABwgrw3J UZ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=QCDJV7u3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si266996jac.26.2021.09.01.11.50.02; Wed, 01 Sep 2021 11:50:14 -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; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=QCDJV7u3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243230AbhIAIUt (ORCPT + 99 others); Wed, 1 Sep 2021 04:20:49 -0400 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:44063 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243163AbhIAIUo (ORCPT ); Wed, 1 Sep 2021 04:20:44 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id LLT9mbwvPlQKhLLTAmHxWp; Wed, 01 Sep 2021 10:19:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1630484381; bh=1oA3g4WV8hAam/6kv0LvNABd7SgAakZdIKN0HgyLQxU=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=QCDJV7u3aXa61qVWFiMoqu9/CyJCBST2bJd/nRzKGzkdVewHJnSzM8w6nSjBcZ7tJ hhaZ2qEIRLxXx7iYjDHsdLj/VyniHq4HTqpldyKYa+cMdEeEXF1SeaRTlNKTn1gPM3 wQmqa3PayN2IoZoJ2qSp3XtXhvvUk8SCnDdFfH1uY0UMbWUPCtGZihqsQQjOe+SMD7 KQUT61YblFMVbi6MEuTzjNaIeK4MAv9DU44eXCgBsLUqIc318eoCuenlhpuxAD8+RI PD/1ixO0d3VhwtR0TaVZxPZfvcl5RzXL5/Js9zc9DpRauSf5rh9Ggvg0AVZlDJYUTQ 7dSV7Vq6/qrZQ== Subject: Re: [PATCH] media: rcar_drif: Make use of the helper function devm_platform_ioremap_resource() To: Cai Huoqing Cc: Fabrizio Castro , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210901055517.7329-1-caihuoqing@baidu.com> From: Hans Verkuil Message-ID: Date: Wed, 1 Sep 2021 10:19:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210901055517.7329-1-caihuoqing@baidu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfIDlik5mjhflElGwtSmDwaYXi9gSZLE+y2/z8xRdmWW/RlXvmth2F9ZgcLV3K+7AGiQhzdMXG4GYrto/ntIs1K1VkTxPOKFtmaOI/f4vIMT8Q/5nX8mc EP/RcrGIlejq3VT2r4LYkOyFv4NvNI+ww9FnEf9ldC1K7CPUqRGqx6DkjtyviGApWiaQt/+u3k3E0lAqgxOUWUp2YL+aE5svRxG8Wwk3TqgSyshlNVbU5S2S 0mZ/r9mbn+hs5IngcsRQmdAxT25Q3jSaBtC6pa84dF6Ps5CHib5polpWpAsbnGV7rfICf+BD+7yHfasf1ommz8OfA6bkNnJl0AziyVN3BNCgCa7rmluSDTjb 59VRWo593RB0R84sSgLu6oETkTFUmwjC7T7J4lspExW2JRF1VoO/thEcQgm4kNr3a2d2WgxhCjEvPx3L1Vm0PeRogALUTVamByKYJa2rf6zqdHdin+S+aGy2 7Fq5LvXJax3VK4cR Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/09/2021 07:55, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing > --- > drivers/media/platform/rcar_drif.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c > index a505d991548b..f0a1edb57841 100644 > --- a/drivers/media/platform/rcar_drif.c > +++ b/drivers/media/platform/rcar_drif.c > @@ -1376,7 +1376,6 @@ static int rcar_drif_probe(struct platform_device *pdev) > struct rcar_drif_sdr *sdr; > struct device_node *np; > struct rcar_drif *ch; > - struct resource *res; > int ret; > > /* Reserve memory for enabled channel */ > @@ -1395,8 +1394,7 @@ static int rcar_drif_probe(struct platform_device *pdev) > } > > /* Register map */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - ch->base = devm_ioremap_resource(&pdev->dev, res); > + ch->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(ch->base)) > return PTR_ERR(ch->base); > > Compile error: drivers/media/platform/rcar_drif.c: In function ‘rcar_drif_probe’: drivers/media/platform/rcar_drif.c:1401:14: error: ‘res’ undeclared (first use in this function); did you mean ‘ret’? 1401 | ch->start = res->start; | ^~~ | ret drivers/media/platform/rcar_drif.c:1401:14: note: each undeclared identifier is reported only once for each function it appears in Regards, Hans