From: Jonathan Cameron <jic23@kernel.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Mehdi Djait <mehdi.djait.k@gmail.com>,
krzysztof.kozlowski+dt@linaro.org,
andriy.shevchenko@linux.intel.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/5] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility
Date: Sat, 22 Apr 2023 18:26:52 +0100 [thread overview]
Message-ID: <20230422182652.3f4d3342@jic23-huawei> (raw)
In-Reply-To: <6caba41c-3db2-90c4-e1f7-2392162e2b0a@gmail.com>
On Fri, 21 Apr 2023 06:44:28 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> On 4/20/23 23:22, Mehdi Djait wrote:
> > Avoid error returns on a failure to match and instead just warn with
> > assumption that we have a correct dt-binding telling us that
> > some new device with a different ID is backwards compatible.
> >
> > Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
> > ---
> > v2:
> > - no changes, this patch is introduced in the v2
> >
> > drivers/iio/accel/kionix-kx022a.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
> > index f98393d74666..70530005cad3 100644
> > --- a/drivers/iio/accel/kionix-kx022a.c
> > +++ b/drivers/iio/accel/kionix-kx022a.c
> > @@ -1038,9 +1038,7 @@ int kx022a_probe_internal(struct device *dev)
> > return dev_err_probe(dev, ret, "Failed to access sensor\n");
> >
> > if (chip_id != KX022A_ID) {
> > - dev_err(dev, "unsupported device 0x%x\n", chip_id);
> > - return -EINVAL;
> > - }
> > + dev_warn(dev, "unsupported device 0x%x\n", chip_id);
>
> Just a 'nit' - no need to re-spin the series for this if there is no
> other changes requested.
>
> Maybe a slightly better wording here would be "unknown device"? If I am
> not mistaken the code proceeds because device is assumed to be supported.
>
> Jonathan, do you think this change is worth backporting? If yes, then we
> might need a Fixes tag.
We haven't backported similar cases as far as I know.
It's fine to request it explicitly gets picked up for stable if we decide
we care later.
I'll tidy up above if I take this version..
Jonathan
>
> Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
> >
> > irq = fwnode_irq_get_byname(fwnode, "INT1");
> > if (irq > 0) {
>
next prev parent reply other threads:[~2023-04-22 17:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 20:22 [PATCH v2 0/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 1/5] dt-bindings: iio: Add " Mehdi Djait
2023-04-21 3:36 ` Matti Vaittinen
2023-04-21 8:12 ` Krzysztof Kozlowski
2023-04-20 20:22 ` [PATCH v2 2/5] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Mehdi Djait
2023-04-21 3:44 ` Matti Vaittinen
2023-04-22 17:26 ` Jonathan Cameron [this message]
2023-04-22 17:28 ` Jonathan Cameron
2023-04-23 20:59 ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 3/5] iio: accel: kionix-kx022a: Refactor driver and add chip_info structure Mehdi Djait
2023-04-21 6:19 ` Matti Vaittinen
2023-04-22 17:32 ` Jonathan Cameron
2023-04-23 21:01 ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 4/5] iio: accel: kionix-kx022a: Add a function to retrieve number of bytes in buffer Mehdi Djait
2023-04-21 6:14 ` Matti Vaittinen
2023-04-22 17:36 ` Jonathan Cameron
2023-04-22 17:42 ` Jonathan Cameron
2023-04-23 22:06 ` Mehdi Djait
2023-04-22 17:46 ` Jonathan Cameron
2023-04-23 22:05 ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 5/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-04-21 23:19 ` kernel test robot
2023-04-22 16:09 ` Andy Shevchenko
2023-04-23 20:56 ` Mehdi Djait
2023-04-24 14:56 ` Mehdi Djait
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230422182652.3f4d3342@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=mehdi.djait.k@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).