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 4C873C32793 for ; Wed, 18 Jan 2023 17:01:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjARRBV (ORCPT ); Wed, 18 Jan 2023 12:01:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbjARRBQ (ORCPT ); Wed, 18 Jan 2023 12:01:16 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0C8FF45BDA for ; Wed, 18 Jan 2023 09:01:14 -0800 (PST) Received: (qmail 214419 invoked by uid 1000); 18 Jan 2023 12:01:13 -0500 Date: Wed, 18 Jan 2023 12:01:13 -0500 From: Alan Stern To: Geert Uytterhoeven Cc: Madalin Bucur , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , UNGLinuxDriver@microchip.com, Thierry Reding , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Jonathan Hunter , Vinod Koul , Kishon Vijay Abraham I , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Siddharth Vadapalli , Russell King , netdev@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 7/7] usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, Jan 18, 2023 at 05:50:00PM +0100, Geert Uytterhoeven wrote: > Hi Alan, > > On Wed, Jan 18, 2023 at 5:26 PM Alan Stern wrote: > > On Wed, Jan 18, 2023 at 11:15:20AM +0100, Geert Uytterhoeven wrote: > > > Use the new devm_of_phy_optional_get() helper instead of open-coding the > > > same operation. > > > > > > This lets us drop several checks for IS_ERR(), as phy_power_{on,off}() > > > handle NULL parameters fine. > > > > The patch ignores a possible -ENOSYS error return. Is it known that > > this will never happen? > > While some phy_*() dummies in include/linux/phy/phy.h do return -ENOSYS > if CONFIG_GENERIC_PHY is not enabled, devm_of_phy_optional_get() > returns NULL in that case, so I think this cannot happen. You could mention that in the patch description. Apart from this one issue: Acked-by: Alan Stern Alan Stern