Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2872921rdb; Tue, 12 Sep 2023 15:07:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAAnVrPcNiBqlPZLEyg5sj7d+POA6ONX9huTGApNhZlRVMhGVUNjWB/9roSwAa/RZyXHU6 X-Received: by 2002:a54:410c:0:b0:3a8:1906:6a80 with SMTP id l12-20020a54410c000000b003a819066a80mr1039244oic.10.1694556464350; Tue, 12 Sep 2023 15:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694556464; cv=none; d=google.com; s=arc-20160816; b=u0HtgzCjDjhHPot/cM/UcH67x8cQJaXHnshHeC1dr0AC2mYgGY7ZVCAIkFg1HmJwsi mXiNZdH3zCCbMmbYdnMj4ZfgKktynoC8cMdVlJD66D8/8gWbWucugH7cHc+i3yYaOkzw NkI2Dt3YU75nwyLulDclGIeyCQVHlruuzdGNoxFwtpduO23sy+em7m/7XkbGo6WpfFk6 xV0g6B4rIspZbZrySFMhc/N6q9NMsSMSWpO0gPV7MSHm5++QGht4IftblzfEMkXREcai Cjj4e/TX9yS20l2SzyqrhDcOy/6u00C0dAHibUp1Mut440Tly5z5boK3wHZsR9ovFJdC Bzfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nmVQQDfuX/j76DUm++ev24Gh9ttqt0+2IKJM2QX7OSE=; fh=WZjkLD8GIcTiimDb6a3bpnw3v2cWpPaGOynAVca38no=; b=cBA0n6hH0Knpu3MhjVsmp98sxq1T+9PdAF6WxEx85jJ//xkjZRPCPRM/xoa6KDBXac JT/hPL9kpZ9feZ+1KxDE/4nGhiKnqJIvjEr4gSrcHVt+kS4fE0BqWqZCrW5f3fsFP4K2 fQOu0a23e51zhBC4/ooeo9lOFA5Ga8J72bdS+iNKQslnis6H+Fbha4An+ZNwRieIlJi1 XXrFaVHGwG7uB1Tp8kBSaLZZ9poiVeCw6HY8ON2slFOfE0jfuPyWkGvqgL5U4eJ1cIMp +2Uxp/JHSAY4TcE//JLJAlWzqeOMXiXDIrVA7Yj2q+f/dBW2udussfdAw7zRjKagMn4m GskA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=HFglwU7C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bg26-20020a056a02011a00b0054fbd904b6dsi8536455pgb.500.2023.09.12.15.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 15:07:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=HFglwU7C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1923A815B123; Tue, 12 Sep 2023 03:10:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233635AbjILKKw (ORCPT + 99 others); Tue, 12 Sep 2023 06:10:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233994AbjILKKi (ORCPT ); Tue, 12 Sep 2023 06:10:38 -0400 Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5966D1FF0 for ; Tue, 12 Sep 2023 03:09:35 -0700 (PDT) Received: by mail-ua1-x932.google.com with SMTP id a1e0cc1a2514c-7a25184a648so2490828241.2 for ; Tue, 12 Sep 2023 03:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1694513374; x=1695118174; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nmVQQDfuX/j76DUm++ev24Gh9ttqt0+2IKJM2QX7OSE=; b=HFglwU7Cb0vP34PvfqgkXzzet0UVEfDnSfMcMz/bpj4HGMQdJfeO0Y34V/5iMKm19a lrhlyISKrhaOpMHcyh/n+4GaDle6h/z8H/BLCLwq8onm7tIwWHs9TzhYh/VygAsKhUEa N7F57IzQ2M1JXe7JX6rYn+rkFAGXE0kxIUX908lEdWfoNOYkx6my6gS9YPQUrT7Dqtak 4usQ0JEg3dVJDXdmc/lb8fv8ve2WY4VaiMnfu14pTtFPRUpR7oiLXF1aJP77uKrw80K1 45SsuKusSODd/xYqzZQ3nK3hbAuywC99qguacHhHKscrWCvElRTSkZeeDO+FveX3RaVC n4vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694513374; x=1695118174; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nmVQQDfuX/j76DUm++ev24Gh9ttqt0+2IKJM2QX7OSE=; b=YmvQxMUy+NoPFZCsLAb3hV0J4U7an47S8kCL+/mb9sAjofuPR5pcx+axRHFhkJk85D 1HDNZJeQXNM4jCfJpEyWLTN3F9iaopolZIpziHBgvd+ctQP2d0DqO5PPQdaYYne+FE1d IFZlFdioX3TivGDgHXPZGvWimp2iWcULw9snnNXk/7B9NTgpNb9qDK4b79Xv5y/lSgol bwTgvaz5ZjPSipZ9TePtxycUT948E9FUxpsi3/wyLARt9zt3BztJHhPgItCgiilIRrEp LQKnKCo5cJ6/N1RyaNP/AjCTnCzEBB+EMErSQNFXg4sKHQSr0ocPCt1I6cMlASCntsot +waA== X-Gm-Message-State: AOJu0Yz9pkdHV8DMynxbZl7lAeAfXoNICanIxrdzHOmm+nM+stvVkLB/ /aPYuw0m6IIcblJQIBX+f9XJCJcbocQvGHItZLzWrQ== X-Received: by 2002:a67:f557:0:b0:44d:5b62:bcd5 with SMTP id z23-20020a67f557000000b0044d5b62bcd5mr11766196vsn.23.1694513374192; Tue, 12 Sep 2023 03:09:34 -0700 (PDT) MIME-Version: 1.0 References: <20230912094519.22769-1-brgl@bgdev.pl> <20230912094519.22769-3-brgl@bgdev.pl> <80d7b0ad-026d-6ba9-7c1f-7f0c3b5af588@linux.alibaba.com> In-Reply-To: <80d7b0ad-026d-6ba9-7c1f-7f0c3b5af588@linux.alibaba.com> From: Bartosz Golaszewski Date: Tue, 12 Sep 2023 12:09:23 +0200 Message-ID: Subject: Re: [RFT PATCH 3/3] gpio: eic-sprd: use devm_platform_ioremap_resource() To: Baolin Wang Cc: Linus Walleij , Andy Shevchenko , Orson Zhai , Chunyan Zhang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 (fry.vger.email [0.0.0.0]); Tue, 12 Sep 2023 03:10:57 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On Tue, Sep 12, 2023 at 12:05=E2=80=AFPM 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. Bart > > --- > > 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 *p= dev) > > struct device *dev =3D &pdev->dev; > > struct gpio_irq_chip *irq; > > struct sprd_eic *sprd_eic; > > - struct resource *res; > > int ret, i; > > > > pdata =3D 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 =3D platform_get_resource(pdev, IORESOURCE_MEM, i); > > - if (!res) > > - break; > > - > > - sprd_eic->base[i] =3D devm_ioremap_resource(dev, res); > > + sprd_eic->base[i] =3D devm_platform_ioremap_resource(pdev= , i); > > if (IS_ERR(sprd_eic->base[i])) > > return PTR_ERR(sprd_eic->base[i]); > > }