From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A724C12002 for ; Wed, 21 Jul 2021 11:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 232C26109F for ; Wed, 21 Jul 2021 11:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238080AbhGULP7 (ORCPT ); Wed, 21 Jul 2021 07:15:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239769AbhGULGf (ORCPT ); Wed, 21 Jul 2021 07:06:35 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05ED2C061787 for ; Wed, 21 Jul 2021 04:44:34 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id b12so2023771pfv.6 for ; Wed, 21 Jul 2021 04:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=oOMBLoLdDZUmJwKPMItYIv30/3dAnF/IjyteNCMVTgAl7Vs00+i0xC49Mg4KcYCRQH XDCA6ws6TiC9cYmziRd03GZESG5nW9Bi3IhSWJlzkL5ZjyknmAtZS/ryG5jgI5P56sJ0 IAFknBfWisrvP3CVkp8BV9frTdmNt/tX2auDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=Q8vaeZ9bAfIgz5GstMOC8VWWC2riHWvXeGk8yPiKf6j2VVQFTNvmSKCkK6Qb80LvKu fS06b6qLfYzbm+9r/e8mxYauwZRuMJduUs9kVHdbeOuy+wCvW61Is3vpKJBfkawQP2WX HqbNBk+A10UUgikOdIKinyiy3CJAkF2jetN7eSbkqz2OP9zhSkciwBTzYVFmkW+ft5AW zjw+iXAyI+3IXx3AW7W9K6DrPhwGjuvI8xyVbgnj8+I3Hp7tCn//yynP93I8fVRJ8che xpYdfMtOCVcs9mhooJaycO6A90fjOgbZkcPnasDdi1tznoUgNnzaEMj8kuOYxhR0UXWl qWSA== X-Gm-Message-State: AOAM531VboQa6hdfqZ+GcxznCpRFgIazupyFhVzNZWaFPh5zUrH7nQMW EulvLdFjhNk+7hqOqkoTjoHYpg9GL3N7hyvmwxciuQ== X-Google-Smtp-Source: ABdhPJzDuuXuFsg+sEvfAF7SzXJ4MRUYLPDA9Vj5ACSar4H9upnFwBC/H+/Y7qoK7WoFI+0/zLdVgr5TPKu1KmiiWMI= X-Received: by 2002:a63:3601:: with SMTP id d1mr6530858pga.299.1626867873570; Wed, 21 Jul 2021 04:44:33 -0700 (PDT) MIME-Version: 1.0 References: <20210715121209.31024-1-yong.wu@mediatek.com> <20210715121209.31024-9-yong.wu@mediatek.com> In-Reply-To: <20210715121209.31024-9-yong.wu@mediatek.com> From: Ikjoon Jang Date: Wed, 21 Jul 2021 19:44:22 +0800 Message-ID: Subject: Re: [PATCH v2 08/11] memory: mtk-smi: Use devm_platform_ioremap_resource To: Yong Wu Cc: Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/Mediatek SoC support" , iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, anan.sun@mediatek.com, ming-fan.chen@mediatek.com, yi.kuo@mediatek.com, anthony.huang@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 8:24 PM Yong Wu wrote: > > No functional change. Simplify probing code. > > Signed-off-by: Yong Wu Reviewed-by: Ikjoon Jang > --- > drivers/memory/mtk-smi.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > index ee49bb50f5f5..e5a34b3952a0 100644 > --- a/drivers/memory/mtk-smi.c > +++ b/drivers/memory/mtk-smi.c > @@ -317,7 +317,6 @@ static int mtk_smi_dts_clk_init(struct device *dev, struct mtk_smi *smi, > static int mtk_smi_larb_probe(struct platform_device *pdev) > { > struct mtk_smi_larb *larb; > - struct resource *res; > struct device *dev = &pdev->dev; > int ret; > > @@ -326,8 +325,7 @@ static int mtk_smi_larb_probe(struct platform_device *pdev) > return -ENOMEM; > > larb->larb_gen = of_device_get_match_data(dev); > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - larb->base = devm_ioremap_resource(dev, res); > + larb->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(larb->base)) > return PTR_ERR(larb->base); > > @@ -447,7 +445,6 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_smi *common; > - struct resource *res; > int ret; > > common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); > @@ -468,8 +465,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > * base. > */ > if (common->plat->type == MTK_SMI_GEN1) { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->smi_ao_base = devm_ioremap_resource(dev, res); > + common->smi_ao_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->smi_ao_base)) > return PTR_ERR(common->smi_ao_base); > > @@ -481,8 +477,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > if (ret) > return ret; > } else { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->base = devm_ioremap_resource(dev, res); > + common->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->base)) > return PTR_ERR(common->base); > } > -- > 2.18.0 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72D0BC636C9 for ; Wed, 21 Jul 2021 11:44:37 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F08B610D2 for ; Wed, 21 Jul 2021 11:44:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F08B610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EE9FC828A5; Wed, 21 Jul 2021 11:44:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ifHjgcFK6bT8; Wed, 21 Jul 2021 11:44:36 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id D4CB782CD4; Wed, 21 Jul 2021 11:44:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8E289C001A; Wed, 21 Jul 2021 11:44:35 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id EA3DEC000E for ; Wed, 21 Jul 2021 11:44:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E66526074A for ; Wed, 21 Jul 2021 11:44:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rMcaGKJoYxGP for ; Wed, 21 Jul 2021 11:44:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by smtp3.osuosl.org (Postfix) with ESMTPS id 23CEE6062A for ; Wed, 21 Jul 2021 11:44:34 +0000 (UTC) Received: by mail-pg1-x52b.google.com with SMTP id k20so1606334pgg.7 for ; Wed, 21 Jul 2021 04:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=oOMBLoLdDZUmJwKPMItYIv30/3dAnF/IjyteNCMVTgAl7Vs00+i0xC49Mg4KcYCRQH XDCA6ws6TiC9cYmziRd03GZESG5nW9Bi3IhSWJlzkL5ZjyknmAtZS/ryG5jgI5P56sJ0 IAFknBfWisrvP3CVkp8BV9frTdmNt/tX2auDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=YEE84GOG4A+rephlW1/5kL/VN6xz/EhNLeCTByAI77h0ZMLq0QF7Cc0iI6FVpoKq6E E1ix6tTRZDkx4y11m+W8dS3oVDr3SoSax/2CLhstlKCyQWTE/2uextkHY/SrKnM9GMFV aGHCIB+hPQF8nu6LxRKx868GHM3/snA9+jyfW3BgS3/xv2c3MaTV/3J17jpdLjj69gVX 9hlyqdaTxwPm3jJiSWQO2X2+JkGB7wwul/SKYcmbuE5L700hVXn9ZUi0L7+tCY6JVwGI O7mI77iMBxYY20bjc5vMOGvL/ENNNy9uC6T8kOBdhtH5gO1PHNgRA8xJMXRd8ClmqjXB jTiw== X-Gm-Message-State: AOAM530o2Nw9o6oQYCo+AjaNg5KbU/dRkWLer+JBPrXW+iRaWfKo/DJ/ lmJqe9YrL7NWlqDJ78Z0FOR7jsAG8xXB4rdUlcgktA== X-Google-Smtp-Source: ABdhPJzDuuXuFsg+sEvfAF7SzXJ4MRUYLPDA9Vj5ACSar4H9upnFwBC/H+/Y7qoK7WoFI+0/zLdVgr5TPKu1KmiiWMI= X-Received: by 2002:a63:3601:: with SMTP id d1mr6530858pga.299.1626867873570; Wed, 21 Jul 2021 04:44:33 -0700 (PDT) MIME-Version: 1.0 References: <20210715121209.31024-1-yong.wu@mediatek.com> <20210715121209.31024-9-yong.wu@mediatek.com> In-Reply-To: <20210715121209.31024-9-yong.wu@mediatek.com> From: Ikjoon Jang Date: Wed, 21 Jul 2021 19:44:22 +0800 Message-ID: Subject: Re: [PATCH v2 08/11] memory: mtk-smi: Use devm_platform_ioremap_resource To: Yong Wu Cc: youlin.pei@mediatek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , yi.kuo@mediatek.com, srv_heupstream , Krzysztof Kozlowski , Robin Murphy , open list , Krzysztof Kozlowski , iommu@lists.linux-foundation.org, Rob Herring , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , anthony.huang@mediatek.com, ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Will Deacon , "moderated list:ARM/Mediatek SoC support" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Thu, Jul 15, 2021 at 8:24 PM Yong Wu wrote: > > No functional change. Simplify probing code. > > Signed-off-by: Yong Wu Reviewed-by: Ikjoon Jang > --- > drivers/memory/mtk-smi.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > index ee49bb50f5f5..e5a34b3952a0 100644 > --- a/drivers/memory/mtk-smi.c > +++ b/drivers/memory/mtk-smi.c > @@ -317,7 +317,6 @@ static int mtk_smi_dts_clk_init(struct device *dev, struct mtk_smi *smi, > static int mtk_smi_larb_probe(struct platform_device *pdev) > { > struct mtk_smi_larb *larb; > - struct resource *res; > struct device *dev = &pdev->dev; > int ret; > > @@ -326,8 +325,7 @@ static int mtk_smi_larb_probe(struct platform_device *pdev) > return -ENOMEM; > > larb->larb_gen = of_device_get_match_data(dev); > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - larb->base = devm_ioremap_resource(dev, res); > + larb->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(larb->base)) > return PTR_ERR(larb->base); > > @@ -447,7 +445,6 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_smi *common; > - struct resource *res; > int ret; > > common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); > @@ -468,8 +465,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > * base. > */ > if (common->plat->type == MTK_SMI_GEN1) { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->smi_ao_base = devm_ioremap_resource(dev, res); > + common->smi_ao_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->smi_ao_base)) > return PTR_ERR(common->smi_ao_base); > > @@ -481,8 +477,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > if (ret) > return ret; > } else { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->base = devm_ioremap_resource(dev, res); > + common->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->base)) > return PTR_ERR(common->base); > } > -- > 2.18.0 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 626C1C636C9 for ; Wed, 21 Jul 2021 11:45:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DBF1610F7 for ; Wed, 21 Jul 2021 11:45:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DBF1610F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0Wge+BRjFwv4V8fT7WeAOMz1lN7q0u39noIKj7B6xDE=; b=XiVB5yiYinV7vN 8bnFIKh11PMW6fD/NSvSxW2B/BwkbFMKq627wKPslNhvmIQzu0k3Px8xW8gUrx79yiJFmvai6w22G ypdHU3KbRSRgk56XKs1Ldb8ykCimHuLMGD5EtcCnmgbGEoq0OLywaNieh0LytFMZEVUBsHR/mIxJH AzjYUDy6hxTqPO8s28+gsCcwoVDx8Fl9h1dgZHBc8pzomCoJmKSY6yKSqSEyGNq8M87DWdfVPRbzp Vs0O5tGdB9oqhzQM8QEe0i2k4hFVClXgT9wR6fxpiSC+4C38t1OLNknKmGuZjKB76QepJ3Shqbe3d aqMU3E8JIFwM/6jsO3Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6Aeq-00FUiA-FA; Wed, 21 Jul 2021 11:45:00 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6AeQ-00FUZD-M3 for linux-mediatek@lists.infradead.org; Wed, 21 Jul 2021 11:44:36 +0000 Received: by mail-pg1-x52e.google.com with SMTP id i16so1596022pgi.9 for ; Wed, 21 Jul 2021 04:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=oOMBLoLdDZUmJwKPMItYIv30/3dAnF/IjyteNCMVTgAl7Vs00+i0xC49Mg4KcYCRQH XDCA6ws6TiC9cYmziRd03GZESG5nW9Bi3IhSWJlzkL5ZjyknmAtZS/ryG5jgI5P56sJ0 IAFknBfWisrvP3CVkp8BV9frTdmNt/tX2auDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=JCAiLDB7St8MbCnL45A68c1/Ov1FSpLPEdkGM6XyqoU+xSAYeihWmAKKqrlWgZNJ2X FP19zu50+8cT8TEhhjV3M+owut9tjbR8RYkOBzNgU3EzbkETEls6FP5llKmwou56Z2PA 23wLuyleOMZPU88d359tgR34SMEwJTw7rgNpx5wurO6jeJloMvo61YZA2NHgekyFq+ge CCycRIeXuB4agZ+72KZKIqy/Qs6fJ+fz8VCfP63y2gAifEW9w7kd4948Tf5nhnmDl1Ep r4QFfcSkeaKW3UlIdkPL3l1ePWHlD+UaEkI4ZHSc36zFta+HM1BxLKmD8YQAAVNopdvu NLoQ== X-Gm-Message-State: AOAM533tXy6LYld7Dot2bEebMycupy8uNAYpWC6k5JXxN+hYPIann7Ka RvHpxEN4AB2uvar+oJ7DPR9nNn6G542K4IY1YnIHaA== X-Google-Smtp-Source: ABdhPJzDuuXuFsg+sEvfAF7SzXJ4MRUYLPDA9Vj5ACSar4H9upnFwBC/H+/Y7qoK7WoFI+0/zLdVgr5TPKu1KmiiWMI= X-Received: by 2002:a63:3601:: with SMTP id d1mr6530858pga.299.1626867873570; Wed, 21 Jul 2021 04:44:33 -0700 (PDT) MIME-Version: 1.0 References: <20210715121209.31024-1-yong.wu@mediatek.com> <20210715121209.31024-9-yong.wu@mediatek.com> In-Reply-To: <20210715121209.31024-9-yong.wu@mediatek.com> From: Ikjoon Jang Date: Wed, 21 Jul 2021 19:44:22 +0800 Message-ID: Subject: Re: [PATCH v2 08/11] memory: mtk-smi: Use devm_platform_ioremap_resource To: Yong Wu Cc: Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/Mediatek SoC support" , iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, anan.sun@mediatek.com, ming-fan.chen@mediatek.com, yi.kuo@mediatek.com, anthony.huang@mediatek.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_044434_822706_98703AB0 X-CRM114-Status: GOOD ( 19.81 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Thu, Jul 15, 2021 at 8:24 PM Yong Wu wrote: > > No functional change. Simplify probing code. > > Signed-off-by: Yong Wu Reviewed-by: Ikjoon Jang > --- > drivers/memory/mtk-smi.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > index ee49bb50f5f5..e5a34b3952a0 100644 > --- a/drivers/memory/mtk-smi.c > +++ b/drivers/memory/mtk-smi.c > @@ -317,7 +317,6 @@ static int mtk_smi_dts_clk_init(struct device *dev, struct mtk_smi *smi, > static int mtk_smi_larb_probe(struct platform_device *pdev) > { > struct mtk_smi_larb *larb; > - struct resource *res; > struct device *dev = &pdev->dev; > int ret; > > @@ -326,8 +325,7 @@ static int mtk_smi_larb_probe(struct platform_device *pdev) > return -ENOMEM; > > larb->larb_gen = of_device_get_match_data(dev); > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - larb->base = devm_ioremap_resource(dev, res); > + larb->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(larb->base)) > return PTR_ERR(larb->base); > > @@ -447,7 +445,6 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_smi *common; > - struct resource *res; > int ret; > > common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); > @@ -468,8 +465,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > * base. > */ > if (common->plat->type == MTK_SMI_GEN1) { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->smi_ao_base = devm_ioremap_resource(dev, res); > + common->smi_ao_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->smi_ao_base)) > return PTR_ERR(common->smi_ao_base); > > @@ -481,8 +477,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > if (ret) > return ret; > } else { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->base = devm_ioremap_resource(dev, res); > + common->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->base)) > return PTR_ERR(common->base); > } > -- > 2.18.0 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0531AC12002 for ; Wed, 21 Jul 2021 11:46:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDB2261001 for ; Wed, 21 Jul 2021 11:46:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDB2261001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xSdWvV7Ti5CKuGaLdDgcNVAIJROyKn9Im1oFbyhHq40=; b=DN1NuAprFzLWoz UD/Zoq1jHJaGyiESZJR+YimuVTmDgDh5b9dyiyu7KKi48PMLI7hFXhLIbEauE7a6jZ3AsTDcwPclA gkVkaKf7QwOrMXZaYQchAPJio4f6AtgW5ZUikagu5+ibnOR+T0TVmA+yzdZ8tK4w2BP2NfEhEryy+ b/T+EMp9bLKR1iHFfapa+HhuzkPBnBU2RFVHeJQya+QySKDgGBHYodc++lpkSD5wDaRKWHzxSCmL+ PiDW2iqaCHMtt7/t94l3hX41FGpOEIopVrIScc/2ZnwoH3ci80FXVXFmhozNMXRlUxqoIu6rZZ2gs u1KaHofN+4lg0qVbZ2fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6AeY-00FUbG-BX; Wed, 21 Jul 2021 11:44:43 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6AeQ-00FUZC-Lq for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 11:44:36 +0000 Received: by mail-pf1-x42d.google.com with SMTP id y4so2010459pfi.9 for ; Wed, 21 Jul 2021 04:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=oOMBLoLdDZUmJwKPMItYIv30/3dAnF/IjyteNCMVTgAl7Vs00+i0xC49Mg4KcYCRQH XDCA6ws6TiC9cYmziRd03GZESG5nW9Bi3IhSWJlzkL5ZjyknmAtZS/ryG5jgI5P56sJ0 IAFknBfWisrvP3CVkp8BV9frTdmNt/tX2auDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1e5owWDxMUbIBJfKFii6zS+/7R0v2+enWtZrIJ8w5gE=; b=RaiNqwRtfX2ecOAdJcCSy1VfsOffsud0yTSIdcs3Uh87LLpK2iY/vs7DKoN0B5nW+7 gYdOZUbk0JpV5Ci3rYUDUMtsLDXcnZLgTnnAvWbH0m2jvcyodWDMjvhckYW/0zg7ENVW KlvgH//cCLhZ6vaH/sJdWrRWL78D3vTtltFSc7F+WVrW9gCTdgufbsU7CzbTLdx5asjY rqQy2ckPS0X/Bbo8fceoX0gWBZ3307n2y9ctOvFm3BSTPQezoasnOiZQ/ydU3Gm/ozap u7UFfJbwqDI4d90pmkcnMmTSKW5Eh/uVVF5x+oF5bEHTooIyXQn6XNxyNt0w4u1+qR9G fIJg== X-Gm-Message-State: AOAM530334RP/BIsdjBN5Zo87pr8nRzwjdSwSU7b6ZUzapwSJVa+Ro+Z +54GkKc8EmgTkhhX0NaVcgk/TuLH+WRpLkk9uAEFpg== X-Google-Smtp-Source: ABdhPJzDuuXuFsg+sEvfAF7SzXJ4MRUYLPDA9Vj5ACSar4H9upnFwBC/H+/Y7qoK7WoFI+0/zLdVgr5TPKu1KmiiWMI= X-Received: by 2002:a63:3601:: with SMTP id d1mr6530858pga.299.1626867873570; Wed, 21 Jul 2021 04:44:33 -0700 (PDT) MIME-Version: 1.0 References: <20210715121209.31024-1-yong.wu@mediatek.com> <20210715121209.31024-9-yong.wu@mediatek.com> In-Reply-To: <20210715121209.31024-9-yong.wu@mediatek.com> From: Ikjoon Jang Date: Wed, 21 Jul 2021 19:44:22 +0800 Message-ID: Subject: Re: [PATCH v2 08/11] memory: mtk-smi: Use devm_platform_ioremap_resource To: Yong Wu Cc: Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/Mediatek SoC support" , iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, anan.sun@mediatek.com, ming-fan.chen@mediatek.com, yi.kuo@mediatek.com, anthony.huang@mediatek.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_044434_799839_7FE007EC X-CRM114-Status: GOOD ( 21.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 15, 2021 at 8:24 PM Yong Wu wrote: > > No functional change. Simplify probing code. > > Signed-off-by: Yong Wu Reviewed-by: Ikjoon Jang > --- > drivers/memory/mtk-smi.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > index ee49bb50f5f5..e5a34b3952a0 100644 > --- a/drivers/memory/mtk-smi.c > +++ b/drivers/memory/mtk-smi.c > @@ -317,7 +317,6 @@ static int mtk_smi_dts_clk_init(struct device *dev, struct mtk_smi *smi, > static int mtk_smi_larb_probe(struct platform_device *pdev) > { > struct mtk_smi_larb *larb; > - struct resource *res; > struct device *dev = &pdev->dev; > int ret; > > @@ -326,8 +325,7 @@ static int mtk_smi_larb_probe(struct platform_device *pdev) > return -ENOMEM; > > larb->larb_gen = of_device_get_match_data(dev); > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - larb->base = devm_ioremap_resource(dev, res); > + larb->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(larb->base)) > return PTR_ERR(larb->base); > > @@ -447,7 +445,6 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_smi *common; > - struct resource *res; > int ret; > > common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); > @@ -468,8 +465,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > * base. > */ > if (common->plat->type == MTK_SMI_GEN1) { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->smi_ao_base = devm_ioremap_resource(dev, res); > + common->smi_ao_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->smi_ao_base)) > return PTR_ERR(common->smi_ao_base); > > @@ -481,8 +477,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) > if (ret) > return ret; > } else { > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - common->base = devm_ioremap_resource(dev, res); > + common->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(common->base)) > return PTR_ERR(common->base); > } > -- > 2.18.0 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel