Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4544612pxb; Tue, 31 Aug 2021 07:39:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+JbeIKhAxssc9zlz6xZgEl1wqZRieK3SNYGiiEExSibbAzNxHnt2F/fZXyb1vJ+ofd7DX X-Received: by 2002:adf:910b:: with SMTP id j11mr24973631wrj.114.1630420761654; Tue, 31 Aug 2021 07:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630420761; cv=none; d=google.com; s=arc-20160816; b=LDffU1FDkCaO0k+Jzh+gV8/pAg/CmmsgAckPWEsHRiTmzzljtboOHcRcvMJlkPdTIr L6RIy7GrjhQbiDueEqfZKKm0QNjwt+m+gUtxaOLM5w7ppVGetML3u4McncKoJg+tW0ik icqanjy8L/eGk/aJPSMlDdchfos/UCkZb0rinJoB6Ptff/7fiEx+OLus+2TivyvEJyp/ uPPh4J8/ca8h9TxU6skEZ1wtvwPNz/u+loyabYxulnk885kuuxoBCcegHzu1kB8OShwJ AZaqi+IkWjxJ9Eppw8n9LsDHOW6Tq9tLwhFNmRRE7llokXvjyNoGqE1K45GTsZ42ooFc +Iow== 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:organization :from:references:cc:to:subject:dkim-signature; bh=t4rZGwfZEIOrCqcjibED3N9c7CMYt/1s+laPidanJ9U=; b=1Ih+soEt0iaL2h39jenJcJG5sY1QrLfExGcHsRgq0eESpqKhe6mRKBbOGU6uJ2oX6A D0q0TLxXojKKDBe6xDJ5hL864XQaR+cA5xwtpEUC90ew2C3vMGd/gZIIBlBiewtuuXw6 uv2fYgN7kStPIqYrBaAh3QWPgSBMEL/6Md/zsgR0I7xz3qkkUwXFIAtg5h/xfzV4iH9z mJyc3URrgN5aVx5a7NME7uFyd21/UeoBuHtX83wGQ9TXvGXedVtNIA9OgZW1blT2wd1P Gzn6NvPN6ZN81Ykv+Owui5dFPXw+HtuHIE12Lxps2MYi9NS2ol7sIISBcUhcFNLyh5Lz CpPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="yC/J2Ika"; 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 d15si19172488edt.431.2021.08.31.07.38.47; Tue, 31 Aug 2021 07:39:21 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="yC/J2Ika"; 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 S238304AbhHaOgo (ORCPT + 99 others); Tue, 31 Aug 2021 10:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238227AbhHaOgm (ORCPT ); Tue, 31 Aug 2021 10:36:42 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06657C061575 for ; Tue, 31 Aug 2021 07:35:47 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id q11so28070893wrr.9 for ; Tue, 31 Aug 2021 07:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t4rZGwfZEIOrCqcjibED3N9c7CMYt/1s+laPidanJ9U=; b=yC/J2IkaFivBRU9NGiW59trje7d4yntYagBVo9vlQoNWteSJIXEi+XV1UN92LQXU6Y 6X+b1KiPiOuE0hH9FDgslu7r9hvH7P1KkUXuKL+2BDJnLDMtlb7yZkAhciDqUppAOdx9 cjcp2KWoXQIDBLLoadxkk9MFxIjtU2mFpVIX6OC6Lg1X2zAZFt1mItcD5/zuvAjBsbwq Xwrhr6/tGl5uf6t/ImCIhMMM0L9ucBr9VrsuIps+nHNZUa/DJPkvLzRtcXVn8b+XUT7K wox/1EqzDbBcObZAKMxZNbe6AC80atzRyp7evrBnWvdIx2ainMfCLIZ/b86bm9k0CO2P xrbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=t4rZGwfZEIOrCqcjibED3N9c7CMYt/1s+laPidanJ9U=; b=LnnOBwsrxbkQ7tM49LjBzU4pYMi+9EaaKDbNgR0ZshF2E/B50odopJvwlR4CFVU1QU XfrdNpAs/o2t8vpuwAWl2s6udGzY1JlUMD+57Qew2blBcY9pEHW8BIa2J4XQN1b7Bo+h ASHUqK/LBwrsu00Zml4U88s0FLRdGecLeVo7tqwhk3c9OOSgpQHr2xlbvZkYMvaxZhEq LkT8VgEYiDP2o//BJe2vzI98uG+JEvHGnRK1WDRMKdQ9JDV04EIBDLUG9f0ZUUj2g6Uj +Ja4R+x3Ztoq9/bPvFrZ+CBFfMTiWbUY8muTkmeFurzlG9Gm0KKhLn3RCuPOrrCZgZnT jf4g== X-Gm-Message-State: AOAM530hN+BuxdI1j1bQ28Cl3BURxd8ZX7oylyDA6QmY+eTnybqDVUXn AtgFm3Z2PsvjHbMgycpG4zb5ywB4okcPyyWB X-Received: by 2002:a5d:490d:: with SMTP id x13mr31431795wrq.412.1630420544859; Tue, 31 Aug 2021 07:35:44 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:fc41:6c:2c4e:2156? ([2001:861:44c0:66c0:fc41:6c:2c4e:2156]) by smtp.gmail.com with ESMTPSA id c24sm18471493wrb.57.2021.08.31.07.35.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Aug 2021 07:35:44 -0700 (PDT) Subject: Re: [PATCH] drm/meson: Make use of the helper function devm_platform_ioremap_resourcexxx() To: Cai Huoqing Cc: David Airlie , Daniel Vetter , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210831135644.4576-1-caihuoqing@baidu.com> From: Neil Armstrong Organization: Baylibre Message-ID: <896e4f35-f410-41e8-50ad-ed16c65cab45@baylibre.com> Date: Tue, 31 Aug 2021 16:35:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210831135644.4576-1-caihuoqing@baidu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/08/2021 15:56, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource_byname() helper instead of > calling platform_get_resource_byname() and devm_ioremap_resource() > separately > > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing > --- > drivers/gpu/drm/meson/meson_drv.c | 3 +-- > drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 +--- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c > index bc0d60df04ae..7f41a33592c8 100644 > --- a/drivers/gpu/drm/meson/meson_drv.c > +++ b/drivers/gpu/drm/meson/meson_drv.c > @@ -206,8 +206,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) > priv->compat = match->compat; > priv->afbcd.ops = match->afbcd_ops; > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vpu"); > - regs = devm_ioremap_resource(dev, res); > + regs = devm_platform_ioremap_resource_byname(pdev, "vpu"); > if (IS_ERR(regs)) { > ret = PTR_ERR(regs); > goto free_drm; > diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c > index 2ed87cfdd735..0afbd1e70bfc 100644 > --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c > +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c > @@ -978,7 +978,6 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, > struct dw_hdmi_plat_data *dw_plat_data; > struct drm_bridge *next_bridge; > struct drm_encoder *encoder; > - struct resource *res; > int irq; > int ret; > > @@ -1042,8 +1041,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, > return PTR_ERR(meson_dw_hdmi->hdmitx_phy); > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - meson_dw_hdmi->hdmitx = devm_ioremap_resource(dev, res); > + meson_dw_hdmi->hdmitx = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(meson_dw_hdmi->hdmitx)) > return PTR_ERR(meson_dw_hdmi->hdmitx); > > Reviewed-by: Neil Armstrong