Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2548607rdb; Tue, 12 Sep 2023 05:36:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFH3b/WydQJzQBWJA+Rp6SoQ3T2b0+R1y8Rfo/J1m5HQatTO8Q2ekhMmDjScHlQY9SS2VP X-Received: by 2002:a92:cd82:0:b0:34c:cb32:f799 with SMTP id r2-20020a92cd82000000b0034ccb32f799mr13877911ilb.22.1694522183217; Tue, 12 Sep 2023 05:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694522183; cv=none; d=google.com; s=arc-20160816; b=N3os1RFli1TZRfX9zfDYkoLhwBy3FcusK9sonMugSoGYDEse84mEsBUznx3LQLpmvW ZML5UlS3DD1qCHRWuSAqJwpQ8mvDEqjTefIgBKRCJGOJWR6CbXGTOZu5qMTDnYuBjQTi kmR6gk14QYIXyoWQnsBP5PkikIir4tUaHJ87ciAdYmTdbtdlxj6LX5g2j8WY7YRoEFKx UZ0yK7hIzMmgT/LBfR/kFD7zP5Ulm5m71QFs2ueNlmtJ3fcRVMxRpOfeD7G77uQ5UJDh Z9mqoNaGO2YykWGusVETb9Ot/HWH6uN51OPT3UKhBrrBXzz4ReQXxiwrh/gY7PSPobKq xjIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=AKigylsOkGcWlZ9HKdaYiB2M47AUw48fKQ2HID8O5f8=; fh=7JoJ/oJb5qD5i6hL8vO1DDgkOGJfGsR1ndr4mXtOQ6g=; b=blixRtyYHbkOmlFRkAu64UKcxsj0ZlnWubuYlS6rIMfilylxtSCmxIbPGYlfxrjJeC ZE2kiAjA42PorvjVRyRWhpifYqnucuA80SxPi0nYjcbJfj01k3udkUYzJiFMmdPKuu7x YNRQmt9+WJK7I72rzcLTw4HM6OoBF9HM8qy7bXcjC+9bXP34NeYHQ+E2OpuQEJXaLoqU jS812lujXcT1b8E5egtxxWNDDjQwIM7YYe5y/Qb0MhR26WRLfieAhLIIqYHLpKswdPpy pmx5dJQcNX/4EaqrRhY+udfwymMtaHFwVigMHUVB0Ulvxg+BLu7d7JG7FELtSDwh95lB N3yQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id t23-20020a656097000000b0056fad9586d2si7567328pgu.429.2023.09.12.05.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 05:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B7A2B80E60B8; Tue, 12 Sep 2023 04:08:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234254AbjILLIS (ORCPT + 99 others); Tue, 12 Sep 2023 07:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234463AbjILLHS (ORCPT ); Tue, 12 Sep 2023 07:07:18 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187921708; Tue, 12 Sep 2023 04:07:12 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R511e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VrwdjfR_1694516829; Received: from 30.97.48.71(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VrwdjfR_1694516829) by smtp.aliyun-inc.com; Tue, 12 Sep 2023 19:07:10 +0800 Message-ID: <0d45564d-bceb-2fb5-67e4-50c6139de992@linux.alibaba.com> Date: Tue, 12 Sep 2023 19:07:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [RFT PATCH 3/3] gpio: eic-sprd: use devm_platform_ioremap_resource() To: Bartosz Golaszewski Cc: Linus Walleij , Andy Shevchenko , Orson Zhai , Chunyan Zhang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski References: <20230912094519.22769-1-brgl@bgdev.pl> <20230912094519.22769-3-brgl@bgdev.pl> <80d7b0ad-026d-6ba9-7c1f-7f0c3b5af588@linux.alibaba.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 04:08:28 -0700 (PDT) X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On 9/12/2023 6:09 PM, Bartosz Golaszewski wrote: > On Tue, Sep 12, 2023 at 12:05 PM Baolin Wang > wrote: >> >> >> >> On 9/12/2023 5:45 PM, Bartosz Golaszewski wrote: >>> From: Bartosz Golaszewski >>> >>> Make two calls into one by using devm_platform_ioremap_resource(). >>> >>> Signed-off-by: Bartosz Golaszewski >> >> Please don't do this. See the previous commit: >> 4ed7d7dd4890bb8120a3e77c16191a695fdfcc5a ("Revert "gpio: eic-sprd: Use >> devm_platform_ioremap_resource()"") >> > > Ah, I see. Dropped. Could use a comment describing the problem though. Yes, I think so, in case someone does the same thing in the future. >>> --- >>> drivers/gpio/gpio-eic-sprd.c | 7 +------ >>> 1 file changed, 1 insertion(+), 6 deletions(-) >>> >>> diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c >>> index be7f2fa5aa7b..1e548e4e4cb8 100644 >>> --- a/drivers/gpio/gpio-eic-sprd.c >>> +++ b/drivers/gpio/gpio-eic-sprd.c >>> @@ -594,7 +594,6 @@ static int sprd_eic_probe(struct platform_device *pdev) >>> struct device *dev = &pdev->dev; >>> struct gpio_irq_chip *irq; >>> struct sprd_eic *sprd_eic; >>> - struct resource *res; >>> int ret, i; >>> >>> pdata = of_device_get_match_data(dev); >>> @@ -621,11 +620,7 @@ static int sprd_eic_probe(struct platform_device *pdev) >>> * have one bank EIC, thus base[1] and base[2] can be >>> * optional. >>> */ >>> - res = platform_get_resource(pdev, IORESOURCE_MEM, i); >>> - if (!res) >>> - break; >>> - >>> - sprd_eic->base[i] = devm_ioremap_resource(dev, res); >>> + sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, i); >>> if (IS_ERR(sprd_eic->base[i])) >>> return PTR_ERR(sprd_eic->base[i]); >>> }