[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB95QATm-iNJokfcSxpen3YBbx6xNUrecELD44squoaqCQ-b7w@mail.gmail.com>
Date: Mon, 28 Apr 2025 09:11:45 +0200
From: Eugene Shalygin <eugene.shalygin@...il.com>
To: Alexei Safin <a.safin@...a.ru>
Cc: Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH v2] hwmon: (asus-ec-sensors) add WARN_ONCE() on invalid
sensor index
On Fri, 25 Apr 2025 at 22:00, Alexei Safin <a.safin@...a.ru> wrote:
>
> Prevent undefined behavior by adding WARN_ONCE() when find_ec_sensor_index()
> returns a negative value.
I'm not sure about WARN_ONCE, does it bring anything useful? Clients
see the error in the return value, sensor reading is absent, do we
need to duplicate that in the log? Guenter, may I leave it up to you,
please?
Best regards,
Eugene
Powered by blists - more mailing lists