From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0E64C6379F for ; Fri, 3 Feb 2023 08:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232455AbjBCIL0 (ORCPT ); Fri, 3 Feb 2023 03:11:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232545AbjBCIKw (ORCPT ); Fri, 3 Feb 2023 03:10:52 -0500 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E507EBB9B; Fri, 3 Feb 2023 00:10:09 -0800 (PST) Received: by mail-oi1-f174.google.com with SMTP id c15so3375919oic.8; Fri, 03 Feb 2023 00:10:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=kDxWR290mL61G5r22X9+N8Kd9HuPTjlQvTYHZMCubL4=; b=3eDzzWTiVP1aYFzPvZd8gKqPSx+KLtHm0PKZeHp3NYuZJ+wTXr0R/tTlic1v+1wjQJ Bfxp+jWw9ENk3ZIW3W5zLK0hpYpBZndRhkl5yh1AqqjaNTzxFP8vhrlkt5uzwZvYLFLj rwd8pSc+ZwpDai3zuCpzTgSzaWguZ8gssHfNcW7m9uPkhnuQ5rkdH+3SZAX0S+sORfij gwERmBL1q08YRKqq2TxJcYK0x5ZnjiKYW/gWsWZBQc7qV277g13EkKh/nBToEADED7rD 8T5zp7F8ug454zLx1jFQGF3MLyCMMpsoD3H90e+v7408nD/ZM9mI4o0l6EOVKwMVt07/ dU/g== X-Gm-Message-State: AO0yUKWiIn9oW1g7jpOEe0Cc3ANQyb9cWsWoH+VpAvvN09Kn/6nWdop2 /4EyHH8/eBmAaBTpKRFcesTAIR6giUUjSQ== X-Google-Smtp-Source: AK7set9OnnbUpKR2KW2u/fmuxsyJ48mxJX3thUsf4xqf7oPnWAZMhOZ987ucA0ujE5juIfy+gaYgWg== X-Received: by 2002:a05:6808:10c1:b0:35a:7043:ee4d with SMTP id s1-20020a05680810c100b0035a7043ee4dmr5791990ois.0.1675411809101; Fri, 03 Feb 2023 00:10:09 -0800 (PST) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com. [209.85.210.54]) by smtp.gmail.com with ESMTPSA id bk30-20020a0568081a1e00b0037880fdb1f6sm584350oib.24.2023.02.03.00.10.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Feb 2023 00:10:08 -0800 (PST) Received: by mail-ot1-f54.google.com with SMTP id n25-20020a9d7119000000b0068bd8c1e836so1148749otj.3; Fri, 03 Feb 2023 00:10:08 -0800 (PST) X-Received: by 2002:a25:ada1:0:b0:839:c329:be37 with SMTP id z33-20020a25ada1000000b00839c329be37mr1030442ybi.89.1675411484019; Fri, 03 Feb 2023 00:04:44 -0800 (PST) MIME-Version: 1.0 References: <3d612c95031cf5c6d5af4ec35f40121288a2c1c6.1674584626.git.geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 3 Feb 2023 09:04:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 6/9] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() To: Vinod Koul Cc: Jonathan Corbet , Madalin Bucur , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , UNGLinuxDriver@microchip.com, Thierry Reding , Lorenzo Pieralisi , Rob Herring , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Jonathan Hunter , Kishon Vijay Abraham I , Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Siddharth Vadapalli , Russell King , linux-phy@lists.infradead.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Vinod, On Fri, Feb 3, 2023 at 6:27 AM Vinod Koul wrote: > On 24-01-23, 19:37, Geert Uytterhoeven wrote: > > Use the new devm_of_phy_optional_get() helper instead of open-coding the > > same operation. > > > > Signed-off-by: Geert Uytterhoeven > > --- > > v2: > > - Rebase on top of commit 854617f52ab42418 ("net: ethernet: ti: > > am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in net-next > > (next-20230123 and later). > > I was trying to apply this on rc1, so ofcourse this fails for me? How do > we resolve this? > > I can skip this patch, provide a tag for this to be pulled into -net > tree Thanks, that's one option. The other option is to postpone this patch, and apply it after v6.3-rc1. Thanks! > > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c > > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c > > @@ -1460,11 +1460,9 @@ static int am65_cpsw_init_serdes_phy(struct device *dev, struct device_node *por > > struct phy *phy; > > int ret; > > > > - phy = devm_of_phy_get(dev, port_np, name); > > - if (PTR_ERR(phy) == -ENODEV) > > - return 0; > > - if (IS_ERR(phy)) > > - return PTR_ERR(phy); > > + phy = devm_of_phy_optional_get(dev, port_np, name); > > + if (IS_ERR_OR_NULL(phy)) > > + return PTR_ERR_OR_ZERO(phy); > > > > /* Serdes PHY exists. Store it. */ > > port->slave.serdes_phy = phy; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds