Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1928773rwb; Wed, 26 Jul 2023 22:40:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQ0+z2Y4hTU+rUtjfaKE7zAhZ/feRHst+40MS+PAN9vBmBoAiZe9JaQQhvIWDNhIucr2Tg X-Received: by 2002:a17:902:e5cb:b0:1b8:a328:c1e6 with SMTP id u11-20020a170902e5cb00b001b8a328c1e6mr3989746plf.63.1690436435286; Wed, 26 Jul 2023 22:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690436435; cv=none; d=google.com; s=arc-20160816; b=woPbuPw20lIVzDjwhVo7t8cQv0pJRUL/y7SLDzwMS0CCYjSgfrB7maNdGXodL77Qld 4AFrmzhVAQ0z9j0HSQs6R+hx5zsfdoq+gNq1ppIXBKS1/qKYUGe6q0sTDPg10n7emArI mIcRNaCphdVyZz1ySt5Y9fysWXDq6mJV9Yu9L7J/OGuuhOYkNFWbTloA4IsFsNKqEEPN 5Kdj/FRcOYzclC5VymrF5Mxsb0EfCgIZGA/f/cyyzijgNrfpfe1Mej16TCC6ncDaF9sv xu3TUKUtgUZ6tePr07ou8lNfW7HuBkrsMvmoSVhLrjLweoi/7SWGrU0bEIISet00HljP 1QZg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KTaajNH7kTp6fI9Xo9N4+w+xfiev+BWa6ZHyvMwcPl8=; fh=wIwBdLiRaIDbWuPcDodX6kIeM9yLd3ONS+cxWZfYxN8=; b=pdjo90yFowOnlx+pG4rAkG+Sxe7y6NPxmUj8AoKMCR9Hl85n5A3DZ5l9yigq+814yK LtGDwmDD1FUmz3ROlCJzC0cQTCw8nlMwmLrKtnUM7QZvu1TxjJ6AZLz7PgqvRL0w/f5P 6yr6Sx5CuCyZ/6SUBKxJqh4hsspEewHkCzy3K7vH4B6F9ZuMJDD1+H9ipXb3r0YGLGx/ BWnq98m6rK2echpSmZNCOGqW3R4hu8pfWDPO/2sc3EhVRjKk6ZwrvxvPW4XTILxbrZX0 uW5R9Lomm25VowuffCTXSL0KOG928XPr1z508ntPFCxHAUCvJHcLaLXedYOfWc1j/mB4 Qahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=HXN5OQDm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb13-20020a170903338d00b001bb3bcd05bbsi655334plb.471.2023.07.26.22.40.23; Wed, 26 Jul 2023 22:40:35 -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=@tuxon.dev header.s=google header.b=HXN5OQDm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231842AbjG0Ff2 (ORCPT + 99 others); Thu, 27 Jul 2023 01:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjG0Fey (ORCPT ); Thu, 27 Jul 2023 01:34:54 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C83901FFA for ; Wed, 26 Jul 2023 22:34:28 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-55e1ae72dceso432086eaf.3 for ; Wed, 26 Jul 2023 22:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436067; x=1691040867; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KTaajNH7kTp6fI9Xo9N4+w+xfiev+BWa6ZHyvMwcPl8=; b=HXN5OQDmS3v+xn2BH/Ae3zhxd54WRt/bndMAmqOC4A4G78F+7pbgIEIuCWssiIKq71 jV/MMkqrSyxvIStUj0Ypa6fy1SIIVo2wU00uOIJOcYURHRSuh++MN+B/MQZqWU/40TdE niGwqccV3U9XzhLqTF02myEoCtKxA/otC+/SFRAivfLXYkrQxOppqzLzUc6m+C4QhscJ Q3c2C3LIAmM9QXoIXSr/NrPRs3yZ/GVc5JxZoZgmWkdT0mzXCrTezmRvQZVRhlJSoTPa VtECMZ1NfU8qJHs0eiDhnsaGaMaPwJKOPd4L1OtvFM6K8ZVhUcCd4zLSFyzFL1ElpRtU qjbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436067; x=1691040867; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KTaajNH7kTp6fI9Xo9N4+w+xfiev+BWa6ZHyvMwcPl8=; b=h/zWjUy4gRs6WpuH/5WEvCtZ3eQ2zXAOPlKfLt3C62x+uulghsugupxn5e+0ay5uZ3 QGPKcg6aQOv6kG4xZNTzyOiZxO3hIz5FIA1F7cSnSiEWvy28Ps6QPElhBNHTbu+UEK0e Up8zBobDIAyh7YjzTnYbcd8udxCINEQrZVeaJxXmAPHkU17dLSigVQv0NvlsV6tfno+c AjTXWfPJrhStHzdFhJunC/kBUqJGaWY3lJnhSHtZQN76PpdwTvEuTB4Brg9zfeoukCuR ATtkxS69XD7Kx4GIXd6yR7oVYCdyEA5tdYA/koplye9/+TFVZ2mL4/EC8Bmgs7C+ImmP BoLA== X-Gm-Message-State: ABy/qLbaHTB3hvuEJLrbINY3hSbU3dTyF+2BWCAkymb/x3FEfVVBZQZB Z/TJtTDlC76DAol//iLD5oF/YS+mt074zPiSD6yvmbSI X-Received: by 2002:a05:6808:1924:b0:3a3:baf8:5b8a with SMTP id bf36-20020a056808192400b003a3baf85b8amr2727697oib.13.1690436067169; Wed, 26 Jul 2023 22:34:27 -0700 (PDT) Received: from [10.0.2.15] ([82.78.167.79]) by smtp.gmail.com with ESMTPSA id c16-20020a17090ad91000b00265a7145fe5sm2052972pjv.41.2023.07.26.22.34.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 22:34:26 -0700 (PDT) Message-ID: <9887e7a5-2422-4ab1-baf8-6eb0e27c1314@tuxon.dev> Date: Thu, 27 Jul 2023 08:34:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 08/30] usb: gadget/atmel_usba_udc: Use devm_platform_get_and_ioremap_resource() To: Yangtao Li , Cristian Birsan , Greg Kroah-Hartman , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230726113816.888-1-frank.li@vivo.com> <20230726113816.888-8-frank.li@vivo.com> Content-Language: en-US From: claudiu beznea In-Reply-To: <20230726113816.888-8-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 26.07.2023 14:37, Yangtao Li wrote: > 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 Reviewed-by: Claudiu Beznea > --- > drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c > index 6c0ed3fa5eb1..02b1bef5e22e 100644 > --- a/drivers/usb/gadget/udc/atmel_usba_udc.c > +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c > @@ -2285,15 +2285,13 @@ static int usba_udc_probe(struct platform_device *pdev) > udc->gadget = usba_gadget_template; > INIT_LIST_HEAD(&udc->gadget.ep_list); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, CTRL_IOMEM_ID); > - udc->regs = devm_ioremap_resource(&pdev->dev, res); > + udc->regs = devm_platform_get_and_ioremap_resource(pdev, CTRL_IOMEM_ID, &res); > if (IS_ERR(udc->regs)) > return PTR_ERR(udc->regs); > dev_info(&pdev->dev, "MMIO registers at %pR mapped at %p\n", > res, udc->regs); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, FIFO_IOMEM_ID); > - udc->fifo = devm_ioremap_resource(&pdev->dev, res); > + udc->fifo = devm_platform_get_and_ioremap_resource(pdev, FIFO_IOMEM_ID, &res); > if (IS_ERR(udc->fifo)) > return PTR_ERR(udc->fifo); > dev_info(&pdev->dev, "FIFO at %pR mapped at %p\n", res, udc->fifo);