public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org" 
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"kernel@collabora.com" <kernel@collabora.com>
Subject: Re: [PATCH 1/3] drm/mediatek: Use devm_platform_get_and_ioremap_resource()
Date: Tue, 4 Jul 2023 06:28:29 +0000	[thread overview]
Message-ID: <ef62141b4b9940d9642e1318763ea6c687deaa8d.camel@mediatek.com> (raw)
In-Reply-To: <20230608101209.126499-2-angelogioacchino.delregno@collabora.com>

Hi, Angelo:

On Thu, 2023-06-08 at 12:12 +0200, AngeloGioacchino Del Regno wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Instead of open coding calls to platform_get_resource() followed by
> devm_ioremap_resource(), perform a single call to the helper
> devm_platform_get_and_ioremap_resource().
> 
> This commit brings no functional changes.
> 
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_cec.c        | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_aal.c   | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_color.c | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_merge.c | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_ovl.c   | 3 +--
>  drivers/gpu/drm/mediatek/mtk_disp_rdma.c  | 3 +--
>  drivers/gpu/drm/mediatek/mtk_dsi.c        | 3 +--
>  drivers/gpu/drm/mediatek/mtk_hdmi.c       | 3 +--
>  drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c   | 3 +--
>  drivers/gpu/drm/mediatek/mtk_mdp_rdma.c   | 3 +--
>  12 files changed, 12 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c
> b/drivers/gpu/drm/mediatek/mtk_cec.c
> index b640bc0559e7..5136aada9023 100644
> --- a/drivers/gpu/drm/mediatek/mtk_cec.c
> +++ b/drivers/gpu/drm/mediatek/mtk_cec.c
> @@ -195,8 +195,7 @@ static int mtk_cec_probe(struct platform_device
> *pdev)
>  	platform_set_drvdata(pdev, cec);
>  	spin_lock_init(&cec->lock);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	cec->regs = devm_ioremap_resource(dev, res);
> +	cec->regs = devm_platform_get_and_ioremap_resource(pdev, 0,
> &res);

The 'res' is useless, so drop it.

Regards,
CK

>  	if (IS_ERR(cec->regs)) {
>  		ret = PTR_ERR(cec->regs);
>  		dev_err(dev, "Failed to ioremap cec: %d\n", ret);
> 

  parent reply	other threads:[~2023-07-04  6:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 10:12 [PATCH 0/3] drm/mediatek: General cleanups AngeloGioacchino Del Regno
2023-06-08 10:12 ` [PATCH 1/3] drm/mediatek: Use devm_platform_get_and_ioremap_resource() AngeloGioacchino Del Regno
2023-06-21  8:51   ` Alexandre Mergnat
2023-07-04  6:28   ` CK Hu (胡俊光) [this message]
2023-06-08 10:12 ` [PATCH 2/3] drm/mediatek: Use dev_err_probe() in probe functions AngeloGioacchino Del Regno
2023-06-21  9:33   ` Alexandre Mergnat
2023-07-04  6:52   ` CK Hu (胡俊光)
2023-06-08 10:12 ` [PATCH 3/3] drm/mediatek: Use devm variant for pm_runtime_enable() when possible AngeloGioacchino Del Regno
2023-06-21  9:36   ` Alexandre Mergnat
2023-07-04  9:24   ` CK Hu (胡俊光)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef62141b4b9940d9642e1318763ea6c687deaa8d.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox