Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp767200pxb; Thu, 19 Nov 2020 13:19:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMj6ghAfPeRCAPCpaka7QkwkhE5ELRDQ86E6tT1ftSlCpmn0f0pmVQjRzh0Q00MYKlq0DM X-Received: by 2002:a17:906:14cd:: with SMTP id y13mr12002105ejc.510.1605820757190; Thu, 19 Nov 2020 13:19:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605820757; cv=none; d=google.com; s=arc-20160816; b=w03kFA4A2IeQ1kBpKNTHrmVaTpMP1nokL3LCrx7iwKdvLHLwLqwj4ez1pH0He6LBU4 KQybfzzerPskUZj5bGZK+XNId58HE16U5LJ6h9CJaWqy56iw5UyEpqaA7JDjPsE7wG8N i+yGK4fLIp8T0gK0MqDa9GUkcoFzz43KjyCV7cDPybmQF/HHY9Z65GvmZfseSdLVtNKq emD+BiHj7K1/4CoawRJeMO3A+vmzqidK+v4nFBYTex1DJ+gStwnuxfEyN9eEcoEaPlJh EkgnR3mTwUNwUDfV46XyTMX9AGrhJjk7kdyMKsm4ZazYXKB0Nye8+rM5u0+fQffJF9dw 83nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=6x5+zSmGmoZLYsG84UhFq8eMCxFBYISt4Ge2M1I4b50=; b=HW6sLc86iavfLyySBsKtuOVt/Tznuye9VyGqgrB7LUzEjryfkDWvO+701MNk+YLNnV rYQQaa6d+Kq2QDz0DfSwCtI8wnEb//7vh5JDU/fkaE857fbhY+Wa8ouuZ2QVbEE0e7ze U3IQxk4Mvg80gYG+ys8pewwaN0VM55VHzTXsBhbG8Ov3tQ8WMGwKnfISSHHuc+NuuQby 3TiW0nOhV5Mh4fQojcVkiK8LARdFUrFZqPUHON2gV85EqTNqobKP3ag4nw/yMKtCezqo HksORsBtNQASIeDjoGKI9ApJtR0YdaNyD0tPBlrX1XL0K/mPTXWVXORAkIEiFMSM/zdi UKwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i41BoCsj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si470966ejy.610.2020.11.19.13.18.54; Thu, 19 Nov 2020 13:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i41BoCsj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgKSVRU (ORCPT + 99 others); Thu, 19 Nov 2020 16:17:20 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37802 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbgKSVRU (ORCPT ); Thu, 19 Nov 2020 16:17:20 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AJLHC1g079602; Thu, 19 Nov 2020 15:17:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605820632; bh=6x5+zSmGmoZLYsG84UhFq8eMCxFBYISt4Ge2M1I4b50=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=i41BoCsjjdj3PMOH9lqKSjqL27a/NJpnksn6kfANG6hJ3P4r4+qPYuu5lyxKd7FOe hKl3PYI/Q6axPVfOauK+lzIKVFvrdnXulNPJkYCQXUEV6FciAT27dvF14aKTUeE343 83IHkXKLCNT4VDsBeiOBCBtCeJWHfZpSdVbQBGPc= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AJLHC59041139 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Nov 2020 15:17:12 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 19 Nov 2020 15:17:11 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 19 Nov 2020 15:17:12 -0600 Received: from [10.250.100.73] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AJLH9Qh126529; Thu, 19 Nov 2020 15:17:10 -0600 Subject: Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER To: Heiner Kallweit , "David S. Miller" , , Jakub Kicinski , Andrew Lunn CC: References: <20201119203446.20857-1-grygorii.strashko@ti.com> <1a59fbe1-6a5d-81a3-4a86-fa3b5dbfdf8e@gmail.com> From: Grygorii Strashko Message-ID: Date: Thu, 19 Nov 2020 23:17:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1a59fbe1-6a5d-81a3-4a86-fa3b5dbfdf8e@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/11/2020 23:11, Heiner Kallweit wrote: > Am 19.11.2020 um 21:34 schrieb Grygorii Strashko: >> The mdio_bus may have dependencies from GPIO controller and so got >> deferred. Now it will print error message every time -EPROBE_DEFER is >> returned which from: >> __mdiobus_register() >> |-devm_gpiod_get_optional() >> without actually identifying error code. >> >> "mdio_bus 4a101000.mdio: mii_bus 4a101000.mdio couldn't get reset GPIO" >> >> Hence, suppress error message for devm_gpiod_get_optional() returning >> -EPROBE_DEFER case by using dev_err_probe(). >> >> Signed-off-by: Grygorii Strashko >> --- >> drivers/net/phy/mdio_bus.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c >> index 757e950fb745..83cd61c3dd01 100644 >> --- a/drivers/net/phy/mdio_bus.c >> +++ b/drivers/net/phy/mdio_bus.c >> @@ -546,10 +546,10 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) >> /* de-assert bus level PHY GPIO reset */ >> gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW); >> if (IS_ERR(gpiod)) { >> - dev_err(&bus->dev, "mii_bus %s couldn't get reset GPIO\n", >> - bus->id); >> + err = dev_err_probe(&bus->dev, PTR_ERR(gpiod), >> + "mii_bus %s couldn't get reset GPIO\n", bus->id); > > Doesn't checkpatch complain about line length > 80 here? :) commit bdc48fa11e46f867ea4d75fa59ee87a7f48be144 Author: Joe Perches Date: Fri May 29 16:12:21 2020 -0700 checkpatch/coding-style: deprecate 80-column warning > >> device_del(&bus->dev); >> - return PTR_ERR(gpiod); >> + return err; >> } else if (gpiod) { >> bus->reset_gpiod = gpiod; >> >> > > Last but not least the net or net-next patch annotation is missing. > I'd be fine with treating the change as an improvement (net-next). > > Apart from that change looks good to me. > -- Best regards, grygorii