Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2479089rdb; Tue, 12 Sep 2023 03:17:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsv22uP872YDDUpRPB1Qioxo0DIqGenmFKHYKuwYSPYjjcOVJbCM4c/ASUyG88tRubTCf8 X-Received: by 2002:a05:6a00:1348:b0:682:4ef7:9b0b with SMTP id k8-20020a056a00134800b006824ef79b0bmr14985157pfu.0.1694513823977; Tue, 12 Sep 2023 03:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694513823; cv=none; d=google.com; s=arc-20160816; b=ll/b3FHBPGKyPlquY3CHk/ALUD4RlZUSEYj4M25TskGU+loVEyeqgZEcrZM418pbxH ViV9LeIKHeVSWVppFYGn/G0dX8rU8FMD20Dl//Pur8UItR7qyEaaO2BgeJBHPAJx7hRA HL6peW54LdCLaX3mEIZLG2hTgRwYG89weyUkXado1P3Vxm+nuT6qlpGp5MGrUabuDfCV 5ILX9qeqBgIDiLDvIKI3Yc7fR26rj57E/qr2uy8EsLYonPj2qdnKwBJ9+KchSO74pSgr mn2e0ak7D/xvQU8dUxKFAfzBz3o5D7BqQs95HAeIcdlW8VdfW8W1zMclqlcdTYl88rXv vCOQ== 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=2ZlApc7S4dumAsg1DGrrCR4DqhSw/1kWQL4/8nylieQ=; fh=Nis5Exja9L6qsT9nTNmhOlHDOQ4cOYSKfA0ZGWTBVqI=; b=Hr3UY+7cNQ+bKJOHpGwY+r1liwFfdozEfkzahJ0oifAZNEq1bdAwNnVULNne05aLqO vu7GJ2/e2nBAk65petCtwWYL7hwXsG9hv+CzSqdd0JmJveHFPyt/kHOzrpJxqo79SdsY i7dq2td5g6wypby4p2k/iWnPR3yoz/FmJfCjxdO5amGAm/wRaE4Xyn8Jth+pBZ+aCxxS Fp5Y2XRPKK+MUPQUXYjdQqSTX28QmZRQDo05n/T6DegfjlxVD1GhpuCZINW8noJjd1Rl 3bUecsdz/d+nZhyD8gznLt+P4HhWQKItLERq87+MBXyfYnmD6U0po9dMXb1EAFQ7vebX +WEA== 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:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t19-20020aa79393000000b00687427c1ac1si1879444pfe.25.2023.09.12.03.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 03:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 7490A824E7BD; Tue, 12 Sep 2023 03:06:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233947AbjILKGg (ORCPT + 99 others); Tue, 12 Sep 2023 06:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234123AbjILKGT (ORCPT ); Tue, 12 Sep 2023 06:06:19 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D4E82D59; Tue, 12 Sep 2023 03:05:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R401e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VrwXrmS_1694513141; Received: from 30.97.48.71(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VrwXrmS_1694513141) by smtp.aliyun-inc.com; Tue, 12 Sep 2023 18:05:42 +0800 Message-ID: <80d7b0ad-026d-6ba9-7c1f-7f0c3b5af588@linux.alibaba.com> Date: Tue, 12 Sep 2023 18:05:48 +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 , Linus Walleij , Andy Shevchenko , Orson Zhai , Chunyan Zhang Cc: 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> From: Baolin Wang In-Reply-To: <20230912094519.22769-3-brgl@bgdev.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 03:06:51 -0700 (PDT) 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()"") > --- > 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]); > }