Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31146299rwd; Thu, 6 Jul 2023 16:50:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPykB0M+4ybzlxcaQv54R/tdrYHL/ke1Rgc2R+b0jG/WOv/hrEAkU3ZXz6feG/ZiFFhsXB X-Received: by 2002:a05:6a20:8405:b0:130:d5a:e40d with SMTP id c5-20020a056a20840500b001300d5ae40dmr3191227pzd.7.1688687421171; Thu, 06 Jul 2023 16:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688687421; cv=none; d=google.com; s=arc-20160816; b=cwD76FYgUEeCVUBCihGwZZimxm3x0RHRmshm7ecvF76zGg+7/V9EY40cRYOx4Qg9qG mA3XlKOBuk7yQ7LiENR/oyfI7nSz1D406+9DY2qAuh473vLY1SkkxkPqgJzkF82OBBfq kBpgYtQOW5qYjDA8sVtOJ/lnqBkHrLBaY3N5KhcdjMTUPH0YuwBp5YLymJjJt+Wchze/ GVU1UQ8xCbhjAYKVlRObQEwsbROQJRnQ9xM+xpz6PC6CgOOJQdo1Tj/ChWZDnTIsHek/ Og4Lhcopkh9pIAQuhiR0Rvb6zmn1woq6s93NMMimh3ghNjuXVzLOPcp4kZU16Y4pCM0L T+5w== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=JWV9nkCedXZ4J+OmZh76vR5EjvDdSCLHT7YpypeRy5w=; fh=O1fXBUGJTciTfRa19XuK2CISMJAB+FzEOKRAKpJgTFE=; b=BwyfKKBwVnfKl52DeA7jzzTxLNDHXF+1EuSH4xtLW/kBrXhewY75sU0rJBO2RhNT+L reju189m/fEoAXeY8JQvURcbfeZuK2LqT5kP5KlUBTpWNMOELy2lD+9DR0iL9I0mTQWt bQbtsUM7YN240El+MLW5JhMy/yspHQGhvcS8mBZrkWLMxgErnrVdOqgXSg7wiPraSS7F qNbdi5kdxYgUie9acnDWagEBCmmtcole0Pc/e3uqA3UkbQbEdMh8ilJHg2n2n7Y8EPCA DR73VGrk2WhBHUTj5QLcQAVQVs1IPUw15jJmJzzyCQ+Sp+Ua8FYzexIMFPxzBuR/iSFV 8vyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JwBfPSuH; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a170903230300b001b8b4ed422bsi2522785plh.308.2023.07.06.16.50.07; Thu, 06 Jul 2023 16:50:21 -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=@kernel.org header.s=k20201202 header.b=JwBfPSuH; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231407AbjGFXhr (ORCPT + 99 others); Thu, 6 Jul 2023 19:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjGFXhq (ORCPT ); Thu, 6 Jul 2023 19:37:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D91281BE1; Thu, 6 Jul 2023 16:37:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 75CA261476; Thu, 6 Jul 2023 23:37:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55D12C433C8; Thu, 6 Jul 2023 23:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688686664; bh=G+V2hz9n6fp+8qO6nu/vx8tNdEv7FhsV5V05r1dTJGA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JwBfPSuH7WthDPZdzCC2uh9oT0Xpp8fXWYJeJI1eEC2kngrkOrVULIUK6ghbY9loN 9VwF0ogybOEMOPVMXPCYXMlJdZeJ3zqDQZDXYSX3H6CoDNMpU3S/xCnN+6tMC9d68k 1dNqKt5oakvAtLP+OBxfdz5IAvIix3yBpQ9/XReQrKQ490rMZt6wiDWb5Obo2MPGSO v29liHzCVQZaT9Ns4BacSQfFCaK2llugoRugDKS/B0+YKO5uiYW0q5KuJxUo4JiLbi 1mpVSrR4qvZVJVhsh06/Or5Vt2KcT1uR25qV+OxQqcrg6cnFNRxjQsL9f9yX+xFnJQ pXcobZZHydVQQ== Message-ID: <31792407-2990-6f31-e2ec-aad81c8870ee@kernel.org> Date: Fri, 7 Jul 2023 08:37:43 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 5/8] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Content-Language: en-US To: Yangtao Li , Sergey Shtylyov Cc: linux-ide@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230706124239.23366-1-frank.li@vivo.com> <20230706124239.23366-5-frank.li@vivo.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20230706124239.23366-5-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 On 7/6/23 21:42, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li > --- > drivers/ata/sata_rcar.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c > index 34790f15c1b8..63f8337c2a98 100644 > --- a/drivers/ata/sata_rcar.c > +++ b/drivers/ata/sata_rcar.c > @@ -861,15 +861,11 @@ static int sata_rcar_probe(struct platform_device *pdev) > struct device *dev = &pdev->dev; > struct ata_host *host; > struct sata_rcar_priv *priv; > - struct resource *mem; > - int irq; > - int ret = 0; > + int irq, ret; > > irq = platform_get_irq(pdev, 0); > if (irq < 0) > return irq; > - if (!irq) > - return -EINVAL; Same comment as Geert: this is OK to remove, but make that a different patch. > > priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL); > if (!priv) > @@ -890,8 +886,7 @@ static int sata_rcar_probe(struct platform_device *pdev) > > host->private_data = priv; > > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->base = devm_ioremap_resource(dev, mem); > + priv->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(priv->base)) { > ret = PTR_ERR(priv->base); > goto err_pm_put; -- Damien Le Moal Western Digital Research