Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3869212rwd; Sat, 3 Jun 2023 13:55:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6uI5yBFQaY1aHI/D1m+nGwQOh4NhTCeA1QOSrOTvsHLvh+Nya98gNJbfxTZrsNuZz56nRx X-Received: by 2002:a25:cfd3:0:b0:ba6:a14e:f166 with SMTP id f202-20020a25cfd3000000b00ba6a14ef166mr8286853ybg.29.1685825750094; Sat, 03 Jun 2023 13:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685825750; cv=none; d=google.com; s=arc-20160816; b=eAsBieVk0OAEx6rV0JKI+xXzNqifh76wlYHZiAzeaZUnnDcYxKj4CCJuqlkO3G+xuE YeHOwopc4RN4W/yHswEoDhm0BghoTrf7Y0Q5NTOudCl5UOFQKFS3Euv/cn51k/3H8VMJ eU/xU4rbrcwYbafkUnk185/ReD8+bE2CaLUS4baM3iPCJnEOn0QlGqi3NhNu2o1ikTTB 7CtRuwOKC9wGDhbhEoTGEZaYwjROVTsXbEM+rzt43ZLu2BS5ujnzBvxaUhiS+s6J9fZK /ZwNVROXiOGcxHmWm7jeO0scpvukNe7AsVNdSj293p2LYfCpjMuLdLZQhw95RZODhO3t HNfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=J9RJ7rzcz7XaGUWPDA1Q9+romsu2sthAW+UUQgnwAE0=; b=wVaH9IGk8hAqrCmw3aPF+48W2lD7xj1MMh+ynh+vWaOPW93awaeEfR1ht4hNlIQXhv kjYEIJ2iuqhrj5iYpO0amEUIpoufyQW9cOvk5Gi5g6dGdSaIhTTmR267nah6Jo6EEV9a YhUwpoTZrIBS6o/fukyWxA3j6FspbdR0z7dvSrIjZdZG0XQ64J9Ew5bs8eDLaCCueN2F fT9UiZuRpQxlfkIxOJw+rhjS3DSqxQXZY7kET8SkiWkiM8GT+Tnarrvx44K3tSL7rSbS eZCRJ2VWs+OoQQTrPQRJEEp/eC27UuhQj84oK5WPqhfy2nxaJUJc2BXLY4xYZbiDV7Eh H7Zg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a170902d4cc00b001b061af0599si3158679plg.340.2023.06.03.13.55.37; Sat, 03 Jun 2023 13:55:50 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbjFCUad (ORCPT + 99 others); Sat, 3 Jun 2023 16:30:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbjFCUab (ORCPT ); Sat, 3 Jun 2023 16:30:31 -0400 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFA0F12E 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> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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