[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aW6Crdsu614Xt4yF@smile.fi.intel.com>
Date: Mon, 19 Jan 2026 21:14:53 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, Andy Shevchenko <andy@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
David Jander <david@...tonic.nl>
Subject: Re: [PATCH v1 7/8] iio: dac: ds4424: ratelimit read errors and use
device context
On Mon, Jan 19, 2026 at 07:24:23PM +0100, Oleksij Rempel wrote:
> Replace pr_err() with dev_err_ratelimited() in the RAW read path to avoid
> log spam on repeated I2C failures and to include the device context.
>
> Use %pe to print errno names for faster debugging.
...
> - pr_err("%s : ds4424_get_value returned %d\n",
> - __func__, ret);
> + dev_err_ratelimited(&indio_dev->dev,
> + "%s: ds4424_get_value failed %pe\n",
> + __func__, ERR_PTR(ret));
Too many information in the output now. __func__ obviously is redundant from
pr_*() limits, since you have now device, no need to have that, I believe. In
general, if you want to use __func__ it's most likely that the message itself
is badly written (not so unique). Rephrasing helps. Also "ds4424_get_value()"
will hint the user that this is about returned value from the call to the
function.
> return ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists