[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y4Y1x8rj7BS8FHMz@smile.fi.intel.com>
Date: Tue, 29 Nov 2022 18:39:35 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Gerald Loacker <gerald.loacker@...fvision.net>
Cc: linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jakob Hauser <jahau@...ketmail.com>,
Linus Walleij <linus.walleij@...aro.org>,
Nikita Yushchenko <nikita.yoush@...entembedded.com>,
Michael Riesch <michael.riesch@...fvision.net>
Subject: Re: [PATCH v4 3/3] iio: magnetometer: add ti tmag5273 driver
On Tue, Nov 29, 2022 at 06:37:42PM +0200, Andy Shevchenko wrote:
> On Tue, Nov 29, 2022 at 07:45:40AM +0100, Gerald Loacker wrote:
...
> > + ret = match_string(tmag5273_angle_names,
> > + ARRAY_SIZE(tmag5273_angle_names), str);
> > + if (ret < 0)
> > + dev_warn(dev, "unexpected read angle-measurement property: %s\n", str);
>
> dev_warn(dev, "unexpected value in angle-measurement property: %s\n", str);
>
> ?
>
> > + else
> > + data->angle_measurement = ret;
Actually remembering Rob's statement that Linux should not validate device
tree, this can be written rather as:
ret = match_string(tmag5273_angle_names,
ARRAY_SIZE(tmag5273_angle_names), str);
if (ret >= 0)
data->angle_measurement = ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists