Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3508337rwb; Mon, 5 Sep 2022 13:02:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6wWl5Ex2tnib35su7s+V699/zGNzskmIQLU7iF5EzIHOYsOZ76LC/N7Ip3f+du5HsJ5pbi X-Received: by 2002:a65:6bc4:0:b0:3c2:2f7c:cc74 with SMTP id e4-20020a656bc4000000b003c22f7ccc74mr42373603pgw.307.1662408164105; Mon, 05 Sep 2022 13:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662408164; cv=none; d=google.com; s=arc-20160816; b=k5B6hG7CG33oTsfkOlesDa/ZYylFMoS60t2BqgKmilfqzzacS+zacqkxLYz7gbslsm A4HErREygUz2EegXoV47dRy2wMrw7dl0LTL7MW+59Dn9ilEbLC7A9/z6jsVkwhFc7UQ+ UqaZAs9H5SCBIcwkVMc8fjOvwCw5zfOIVi93xPJ5UumbwPdJJBer8q5fiUFhoq1rbGon jokPckTW5r6IJnPHFw/Fgo/GJ3O/9LC7z6shIJu35fpeCS219Dsd5wnnaHtU7zMPp0hX ccYBPQim7Bf4+Uw6OvwtPuwp3enfrT7gFYaCH8z03G2Sk6rsiF/w8twm6yb86T8CtF3z 1oZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wO/CS8iR8KxuQ0QSMzm6/WiY5ujYMWA4u/2Kf3nOOU4=; b=oolHncT0lz3ArPn0b23jnNXVrnkbDHPFDpz+lH8FI5Ofq0vBNyoGNEuhT696mEvg3A U/VYvnHqVf6caphla9SwAbcGKi2RQ2U5ysfcww8M6zzFpwxziDbqGE/SKt0fUnj6so5m YJTsE5GYKDc1Iq8ECLfsexXguOIY1CUDo/MXfoieTgf77GBNzsB3j44yV922Vi0rGq/T wx0mzuOdpV5nb6cIb6I3BbtZv5Qd9R/cP/aPFcqGJ+30LPmzmYm3+VREgYCrRvDieXsm 03dMrr99h+q2YytwXP4td8BzxaWASLsquQr3vHJ72Hh+/acBgixMA232WGGi7R9HHsJq /yAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JSci26Ho; 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=pass (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 200-20020a6304d1000000b0042be3b90259si13215933pge.564.2022.09.05.13.02.30; Mon, 05 Sep 2022 13:02:44 -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=@gmail.com header.s=20210112 header.b=JSci26Ho; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232525AbiIETnA (ORCPT + 99 others); Mon, 5 Sep 2022 15:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbiIETm6 (ORCPT ); Mon, 5 Sep 2022 15:42:58 -0400 Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F28B25142A; Mon, 5 Sep 2022 12:42:56 -0700 (PDT) Received: by mail-vs1-xe30.google.com with SMTP id 67so9684880vsv.2; Mon, 05 Sep 2022 12:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=wO/CS8iR8KxuQ0QSMzm6/WiY5ujYMWA4u/2Kf3nOOU4=; b=JSci26HogKWKQ4bQAPYj/qj3KQoQKdAM0djoTD3V3pfJRNYBkb/crHGNg1ZxmTaRZt Y2OeStRuHo3E/9wsjJPHVnMww72oojhAo7UJLNnJ0gRUC+nhaCUEHH9ZmDdynKfHloX2 0bjx9qX1YL+G8A4rsdAU0h6gp40P8lRhXVGDtlCWUMjl1D8b39ZkjvsqK3cSjapHLUZz EVRCqi1r10xb9iSsdWdvvlb6dzMQ8cDz9uv1Pe05ngskplsNCt6Z3TRknJQasbAHVJ+g GwNPbWO8101YPtZqf6x/GwXmJmCDOz+EBKotqmHSc5fKyGy5JGnKrxr8z/8BsuU8OywW Yx7g== 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; bh=wO/CS8iR8KxuQ0QSMzm6/WiY5ujYMWA4u/2Kf3nOOU4=; b=0h+wlIvdtxqhDv95hO/P0h/erE724dlsng8G4p99avVZEeYIKM17TyGaoQoQYO8IRi ROR8Uwzu9NlXHl4ZHviIyWstpRWj5oruIyXZJjvHzHpW8NVKwwJNYLA/lAxxmLgqTqwd FcXB6+eeSGCmzFvYb9WPNaHDveyOBLHMlYzGmM8hexMLxMjmsIqZXTlYxlUv2u+ZiJ0a 6XBetqtlExsTmIZ7LT3rtLtGr6IjuxSqPcfVeozFrSNbZQxcsXNNwEMqssYlbRg2bOYr jOeqC7Im7cgwLYsFX5olY+q6FHr0PBLvoyeAMN/RpUDlc4WQQ8iH0ypvQJU8SgSVG2c8 mHxg== X-Gm-Message-State: ACgBeo2i11kvwNAUhKkuSRQqxBPDoh0oQ6kkUCOTRu3iEmZkUHruxvyh TvtAOWDx6OGfvxRoyOtUfeG7fVyxkaB9imd5Zvm0cVOM8bE= X-Received: by 2002:a67:c097:0:b0:390:d097:df91 with SMTP id x23-20020a67c097000000b00390d097df91mr12625663vsi.85.1662406976034; Mon, 05 Sep 2022 12:42:56 -0700 (PDT) MIME-Version: 1.0 References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> <20220903-gpiod_get_from_of_node-remove-v1-4-b29adfb27a6c@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 5 Sep 2022 22:41:40 +0300 Message-ID: Subject: Re: [PATCH v1 04/11] usb: phy: tegra: switch to using devm_gpiod_get() To: Dmitry Torokhov Cc: Thierry Reding , Mark Brown , Matti Vaittinen , Lorenzo Pieralisi , Claudiu Beznea , Liam Girdwood , Wim Van Sebroeck , Greg Kroah-Hartman , Guenter Roeck , Miquel Raynal , Linus Walleij , Felipe Balbi , Alexandre Belloni , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Vignesh Raghavendra , Daniel Vetter , Thomas Petazzoni , Alexandre Torgue , Marc Zyngier , Richard Weinberger , David Airlie , Nicolas Ferre , Alyssa Rosenzweig , Bartosz Golaszewski , Jonathan Hunter , Rob Herring , Maxime Coquelin , Bjorn Helgaas , =?UTF-8?Q?Pali_Roh=C3=A1r?= , LINUXWATCHDOG , USB , "open list:GPIO SUBSYSTEM" , linux-pci , linux-tegra , "open list:MEMORY TECHNOLOGY..." , Linux Kernel Mailing List , dri-devel , linux-stm32@st-md-mailman.stormreply.com, linux-arm Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Sep 5, 2022 at 10:40 PM Dmitry Torokhov wrote: > On Mon, Sep 05, 2022 at 01:59:44PM +0300, Andy Shevchenko wrote: > > On Mon, Sep 5, 2022 at 9:32 AM Dmitry Torokhov > > wrote: ... > > > - gpiod = devm_gpiod_get_from_of_node(&pdev->dev, np, > > > - "nvidia,phy-reset-gpio", > > > - 0, GPIOD_OUT_HIGH, > > > - "ulpi_phy_reset_b"); > > > + gpiod = devm_gpiod_get(&pdev->dev, "nvidia,phy-reset", > > > + GPIOD_OUT_HIGH); > > > err = PTR_ERR_OR_ZERO(gpiod); > > > > What does _OR_ZERO mean now? > > This converts a pointer to an error code if a pointer represents > ERR_PTR() encoded error, or 0 to indicate success. Yes, I know that. My point is, how is it useful now (or even before)? I mean that devm_gpio_get() never returns NULL, right? -- With Best Regards, Andy Shevchenko