Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2507277pxb; Tue, 9 Mar 2021 04:27:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9Yzg9gty0VVu0LtdpCYLrwkF9/RuiIzIF9dwfJ4EtuqQ0IMdWN1rDuiu+Zogpsl09cf41 X-Received: by 2002:a17:907:216d:: with SMTP id rl13mr19714327ejb.362.1615292831017; Tue, 09 Mar 2021 04:27:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615292831; cv=none; d=google.com; s=arc-20160816; b=mFeLgLM9ONzt+vu1KtFkjIznHrFyRxn3Bchvq2AENRIZsrsUz1DIFDbC4fLjJZ+KM4 oHDwuzfwwR88Os2x5zY11KdH7XuKIFbTsAi+Yq6PcpbwE6zAMmS0G96jZp6rdJl43BKt htHDKvrK/lWY7RYPvGCjEFstAmJd0AHIH+OjI5BawVjByQwsf/ElyUSNCg81jepkRgKs b/dxaXPEJuXsQAhVFET8R5Qwr3loN0JfbW1OGKsQZNuZExJ49M/sfyaFUEvEelW+PhfV uxXpcTnL+gMbHeB8zPa2C/PiRCjQRjogP4zWHH/6qdwQ9h+5gSZqWwCFGahqisbqh7C7 U4gA== 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=tpQglO11Y0yp4pHE6NPWOrsYGCm5XZNoTmIeuuzr4I0=; b=IfLNRgo9FgFuVIdaj4iEprE2/mbMKC8zmU+W3IjWiNzpfnfgiJcrTOsvTSYz/U8+a1 ++MjhAMANSPqAZAijqNbk2NRQpcwsRezc9ilvqRUyRm8/WWuqnBECj71zZKof4lXsXOA YLt2b3fleSVGCHAj7mVPZ0/+4lyRxeshRmqzqTBlbUc4Ed6B6fuYVC2/M88BgvI7Ef64 wetN+4PfJVSfcIgWIbFNrSiuz8Ug0d873mtkJh7+EBKGHnjkwkkOx/rKCUe2yGgiHz8E PvcTat/iDhBR8UZs8K7t4Z+etHRf/4HAS7ZFodapfp0mNvsi2S5WR4cjItjaOsNJVA7g 53fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b="TUll/KMa"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i13si9249686edq.522.2021.03.09.04.26.48; Tue, 09 Mar 2021 04:27:11 -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=@aruba.it header.s=a1 header.b="TUll/KMa"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230523AbhCIMZT (ORCPT + 99 others); Tue, 9 Mar 2021 07:25:19 -0500 Received: from smtpweb147.aruba.it ([62.149.158.147]:39973 "EHLO smtpweb147.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbhCIMZH (ORCPT ); Tue, 9 Mar 2021 07:25:07 -0500 Received: from [192.168.1.56] ([79.0.204.227]) by Aruba Outgoing Smtp with ESMTPSA id JbQAl6skf1jmzJbQAl3KDz; Tue, 09 Mar 2021 13:25:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1615292707; bh=sL9nF7AOdYs3XiB8N1ibpRKX3i5PP8HuGzrTcAexPx8=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=TUll/KMaVTzV8lKVPEsXd8t6L68i+jsHZCXl6c5z1J5KvUwMYI2zj1yAyDESewbFi k4igVQJjmhn9xhd6w2OPprf7Ue54YIKEWzDLGXseGCBjDLxWX5lUwL6Eq4/LEKv5ip eqHFq4j+ks3mHcjJLLs2nT1bC4cXlw5Ii2lhEgLT4Y9t0LkJHVMfXKipcQkD/15FjK /oi5ecOVrPXq2S+WixtqqP4S2K3xAP0lWz9JpU8qXFjLdIB7g+Ur12cRg7AEg5juWC 9ntT8JXksLR+cFBxhrElrjd1XsdVJc352/uN8GxyRJwS/NS17L5cwjirNx5IB+/1D2 M1T1B2z5etIIw== Subject: Re: [PATCH resend v1 2/7] pps: clients: gpio: Use dev_err_probe() to avoid log noise To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Ryan Govostes , Greg Kroah-Hartman References: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> <20210309112403.36633-2-andriy.shevchenko@linux.intel.com> From: Rodolfo Giometti Message-ID: Date: Tue, 9 Mar 2021 13:25:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210309112403.36633-2-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfArjjZQn26j3EOI86MrhKaaAo1cb6uB/NJajzlmwIBpz0SapOtgiBU8qH7LWBDGdAQd7sHkRpis7IkrpToQ3vERIh/F+SbjTXL3CsRFscC62pUaPr6rs d0PuKwYBMVPbo+H/ytwaWsWavHYpz58cPbbBji3FhPwcCbnP1rtGHfinMUPI9jFiiHGAbq5bLZjqxI+YNGZzP05G1+e5bXqFWc7ovl2FZmZHfVUOqGLY8PyS nrnZlL83BawVxzB9DK6Dy2hw7ugm3yAHeDOJllNA7NLHaec18xM3s+IY32bTpakE Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/21 12:23, Andy Shevchenko wrote: > When GPIO APIs return -EPROBE_DEFER there is no need to print the message, > especially taking into consideration that it may repeat several times. > Use dev_err_probe() to avoid log noise in such cases. > > Signed-off-by: Andy Shevchenko > --- > drivers/pps/clients/pps-gpio.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c > index f89c31aa66f1..78c9680e8063 100644 > --- a/drivers/pps/clients/pps-gpio.c > +++ b/drivers/pps/clients/pps-gpio.c > @@ -110,19 +110,16 @@ static int pps_gpio_setup(struct platform_device *pdev) > data->gpio_pin = devm_gpiod_get(&pdev->dev, > NULL, /* request "gpios" */ > GPIOD_IN); > - if (IS_ERR(data->gpio_pin)) { > - dev_err(&pdev->dev, > - "failed to request PPS GPIO\n"); > - return PTR_ERR(data->gpio_pin); > - } > + if (IS_ERR(data->gpio_pin)) > + return dev_err_probe(&pdev->dev, PTR_ERR(data->gpio_pin), > + "failed to request PPS GPIO\n"); > > data->echo_pin = devm_gpiod_get_optional(&pdev->dev, > "echo", > GPIOD_OUT_LOW); > - if (IS_ERR(data->echo_pin)) { > - dev_err(&pdev->dev, "failed to request ECHO GPIO\n"); > - return PTR_ERR(data->echo_pin); > - } > + if (IS_ERR(data->echo_pin)) > + return dev_err_probe(&pdev->dev, PTR_ERR(data->echo_pin), > + "failed to request ECHO GPIO\n"); > > if (data->echo_pin) { > ret = of_property_read_u32(np, > Acked-by: Rodolfo Giometti -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti