Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37278278rwd; Tue, 11 Jul 2023 11:56:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFxh4DuPJUKaphNyF6GdbJzmAbaI3BE5l1FRBDf0Hjz8ExRZ3TW9yRSs2xQ+KC7NxqsR7Jg X-Received: by 2002:a05:6512:31cf:b0:4f6:2b25:194e with SMTP id j15-20020a05651231cf00b004f62b25194emr14166208lfe.58.1689101784214; Tue, 11 Jul 2023 11:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689101784; cv=none; d=google.com; s=arc-20160816; b=G3tIfOKODOuA0R5pIianf2Cj5whzeBS/GXQI028FP58Z6S6I8EK9LxSsicZ+UeQ1LP HO8O41yHvNYXvlWLt0b62LJpXtDxWXsSsSDyYb4yqddCV2mgpSNfsUjOW5HtXRhbewcv Uy8KS6BxEqya7WoYoeSdfhttf54dIZ7+q4Dgrwd55Z+0bidA9KMOs5xyBwfscdxput3e B64YqHi2nFSpFFyF0cmZ5pTnjSCsv0QMwe9Wg8yLf6PQ6Hgj7eteoT//k0Mgmczyhogb oNn2j350iXycLv92n/SxcTA/RNiLHNUzYwNTFewPAgY78t6kPhaC2wfGkEHkmu4Z+AMV wVFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hKWUjHYl3foUxpIk1+qyClaunh32Kc8gPI+5NOFPgGs=; fh=2Tj2H0pBRuwl7/0qBZe3z5dNjntkPP2mZHeYxIK/o+w=; b=sbFa5oNia5/gKsda3Ndomdfh8KW97mILPUFD5KM5Xp6MSDYD1OoDiTFlZfzzE/88e0 vtnyVpHTvjyH37z2sllX74/dZXMLLLHIuvsYUdOn5MrPwsfeTWJRLXqGrMVK/UMTlUIH hYSUXXjQgntxYGH1clQzmVyLVI+mwmvqX3qcd1S9UP+yX3DiKShz6nlITGgy1wVXuE93 UAzg9MTihISRiNsbnahuer49xtPlP/0Nu5qTR9wzYsZ4Wg/W/qj+CobCDQoQHdkUS4Tl +B+XhfpnjJ7+Eye0tuk7Sad8dH3PVVzcLRgQLvqAjqiaR+qICDY1l/Oe40aW39jCc4eG S2rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=M+q2D1Bl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a50fb01000000b0051e5c45b42dsi2619083edq.544.2023.07.11.11.55.59; Tue, 11 Jul 2023 11:56:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=M+q2D1Bl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjGKS2B (ORCPT + 99 others); Tue, 11 Jul 2023 14:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232228AbjGKS1U (ORCPT ); Tue, 11 Jul 2023 14:27:20 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C0E1170F; Tue, 11 Jul 2023 11:27:16 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so6606989f8f.1; Tue, 11 Jul 2023 11:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689100034; x=1691692034; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hKWUjHYl3foUxpIk1+qyClaunh32Kc8gPI+5NOFPgGs=; b=M+q2D1BlRVUEVYbiFkbHFOCQCg6FTNIZE8+pqseAtFSK5xy/HDIa9hNaBOsJZqL3Xm F0Vhyn84rlKzLWKnT4xmWUyQsKu+gCzI5kMMwAQQnFFuOjifHHaf+F9yijlfC51TuKoF 9NAWm+Ezb4kfKouVrILRTHJZXAHiX9xuwISzC4kTZvFnhx+in+uDJagzgw+PrnUDEL9p cnV0VB40ArsUij1d0eVkemA6fTav9rw4om0lSiMvoU0SSkvCtv/IGnYKcfjixH1S+eTB 480EtI1dy/c2gSHKK50JHMyLmVtj75q2DxgaN3MjKwKiWr+XunGZmeft21hHExY2NSYs FKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689100034; x=1691692034; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hKWUjHYl3foUxpIk1+qyClaunh32Kc8gPI+5NOFPgGs=; b=dQGM5AOiDyQVZoyZ6Nr0tZ2Ye0AAYAUWB6mqxtatIYYxVWu9t3fDoh6bJnx6g5z4Ih tOXGSJIGH8KpzH9wPZdtiFHr6IqU/QM9ydkVRJvw0oYY91lhcErvzGFHAq9RyIF1Tn+V yJOUJmy/hlfBfavWo7qjOoCWgMM5EoORwOARiSjo8l3keqJ7qRTGgWMzvvBPCPPB0pub Slx2CEKnlE68sFqIN6j//i20I2wuG30fx1UaK2za/soZPwgqXcAiswbLr18jJZhhcJVW uPOSnBU+pfi5Wuz6p4d9nf4n54OS4afYDjLkAIvg80tSyQCi1bUXEQdOYUjTnJ+y9NZK oLLQ== X-Gm-Message-State: ABy/qLZw/R4gXZpzoR0Lg8gYiRNw7sJgdmg+0LFcOhc8HPA3dtf5aLr6 HjhO3g1h/l+HfDd/9fgEQlk= X-Received: by 2002:adf:fcca:0:b0:315:9de4:92f0 with SMTP id f10-20020adffcca000000b003159de492f0mr5931362wrs.5.1689100034540; Tue, 11 Jul 2023 11:27:14 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-1-233.dynamic.telemach.net. [82.149.1.233]) by smtp.gmail.com with ESMTPSA id k2-20020a5d5182000000b003143aa0ca8asm2929620wrv.13.2023.07.11.11.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 11:27:14 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Emilio =?ISO-8859-1?Q?L=F3pez?= , Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Samuel Holland , Yangtao Li Cc: Yangtao Li , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Date: Tue, 11 Jul 2023 20:27:13 +0200 Message-ID: <9132614.CDJkKcVGEf@jernej-laptop> In-Reply-To: <20230705065313.67043-1-frank.li@vivo.com> References: <20230705065313.67043-1-frank.li@vivo.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne sreda, 05. julij 2023 ob 08:53:01 CEST je Yangtao Li napisal(a): > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yangtao Li Acked-by: Jernej Skrabec Best regards, Jernej > --- > drivers/clk/sunxi/clk-sun9i-mmc.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c > b/drivers/clk/sunxi/clk-sun9i-mmc.c index 636bcf2439ef..0862b02b1ed4 100644 > --- a/drivers/clk/sunxi/clk-sun9i-mmc.c > +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c > @@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct > platform_device *pdev) > > spin_lock_init(&data->lock); > > - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!r) > - return -EINVAL; > - /* one clock/reset pair per word */ > - count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH); > - data->membase = devm_ioremap_resource(&pdev->dev, r); > + data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r); > if (IS_ERR(data->membase)) > return PTR_ERR(data->membase); > > + /* one clock/reset pair per word */ > + count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH); > + > clk_data = &data->clk_data; > clk_data->clk_num = count; > clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk *),