From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6E62101DF for ; Sat, 3 Jun 2023 20:30:32 +0000 (UTC) Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C691A18D for ; Sat, 3 Jun 2023 13:30:30 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 7a2b1d70-024d-11ee-b972-005056bdfda7; Sat, 03 Jun 2023 23:30:28 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sat, 3 Jun 2023 23:30:27 +0300 To: Nikita Shubin Cc: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Hartley Sweeten , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michael Peters , Kris Bahnsen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v1 20/43] net: cirrus: add DT support for Cirrus EP93xx Message-ID: References: <20230424123522.18302-1-nikita.shubin@maquefel.me> <20230601054549.10843-2-nikita.shubin@maquefel.me> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230601054549.10843-2-nikita.shubin@maquefel.me> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Thu, Jun 01, 2023 at 08:45:25AM +0300, Nikita Shubin kirjoitti: > - find register range from the device tree > - get "copy_addr" from the device tree > - get phy_id from the device tree ... > -#include > #include > +#include Stray change. ... > mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > irq = platform_get_irq(pdev, 0); > if (!mem || irq < 0) > return -ENXIO; > > - dev = ep93xx_dev_alloc(data); > + base_addr = ioremap(mem->start, resource_size(mem)); > + if (!base_addr) { > + dev_err(&pdev->dev, "Failed to ioremap ethernet registers\n"); > + return -EIO; > + } Why not switching to devm_platform_ioremap_resource()? ... > + if (of_property_read_u32(np, "reg", &phy_id)) { > + dev_err(&pdev->dev, "Failed to locate \"phy_id\"\n"); > + return -ENOENT; return dev_err_probe(...); ? > + } -- With Best Regards, Andy Shevchenko