From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Andy Shevchenko <andy@infradead.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Jeremy Cline <jeremy@jcline.org>,
linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] iio: accel: bmc150: Removed unused bmc150_accel_dat irq member
Date: Mon, 30 Nov 2020 20:46:12 +0000 [thread overview]
Message-ID: <20201130204536.71d67c07@archlinux> (raw)
In-Reply-To: <CAHp75Vd2Jhep0z7i3_5jnvsnMN2zyudCRM6YNy_neCd6_ydSvw@mail.gmail.com>
On Mon, 30 Nov 2020 16:32:21 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Nov 30, 2020 at 4:20 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >
> > The bmc150_accel_dat struct irq member is only ever used inside
> > bmc150_accel_core_probe, drop it and just use the function argument
> > directly.
>
> FWIW, for all three
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
This crossed with a series adding regulator control to this driver, but I'm fairly
sure that won't cause any problems so I've dealt with the fuzz and applied it anyway.
However...
drivers/iio/accel/bmc150-accel-i2c.c: In function ‘bmc150_accel_probe’:
drivers/iio/accel/bmc150-accel-i2c.c:55:28: error: implicit declaration of function ‘acpi_device_hid’; did you mean ‘dmi_device_id’? [-Werror=implicit-function-declarati
on]
55 | if (!id && adev && strcmp(acpi_device_hid(adev), "BOSC0200") == 0) {
| ^~~~~~~~~~~~~~~
| dmi_device_id
drivers/iio/accel/bmc150-accel-i2c.c:55:28: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
55 | if (!id && adev && strcmp(acpi_device_hid(adev), "BOSC0200") == 0) {
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
I've added #ifdef CONFIG_ACPI around the relevant block and shuffled around assignment of
adev + added a __maybe_unused marking to it. Perhaps I should have pulled that block
out into another function but it seemed more trouble than it was worth.
I'm slightly confused on how I ended up with a test .config that doesn't have CONFIG_ACPI
but that's another story and handy on this occasion as we didn't have to wait for 0-day
to notice this.
Please sanity check I didn't mess it up.
Series applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to see what else we missed.
Thanks
Jonathan
>
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > ---
> > drivers/iio/accel/bmc150-accel-core.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> > index 48435865fdaf..088716d55855 100644
> > --- a/drivers/iio/accel/bmc150-accel-core.c
> > +++ b/drivers/iio/accel/bmc150-accel-core.c
> > @@ -183,7 +183,6 @@ enum bmc150_accel_trigger_id {
> >
> > struct bmc150_accel_data {
> > struct regmap *regmap;
> > - int irq;
> > struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
> > struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
> > struct mutex mutex;
> > @@ -1568,7 +1567,6 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
> >
> > data = iio_priv(indio_dev);
> > dev_set_drvdata(dev, indio_dev);
> > - data->irq = irq;
> >
> > data->regmap = regmap;
> >
> > @@ -1599,9 +1597,8 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
> > return ret;
> > }
> >
> > - if (data->irq > 0) {
> > - ret = devm_request_threaded_irq(
> > - dev, data->irq,
> > + if (irq > 0) {
> > + ret = devm_request_threaded_irq(dev, irq,
> > bmc150_accel_irq_handler,
> > bmc150_accel_irq_thread_handler,
> > IRQF_TRIGGER_RISING,
> > --
> > 2.28.0
> >
>
>
next prev parent reply other threads:[~2020-11-30 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 14:19 [PATCH v2 1/3] iio: accel: bmc150: Removed unused bmc150_accel_dat irq member Hans de Goede
2020-11-30 14:19 ` [PATCH v2 2/3] iio: accel: bmc150: Check for a second ACPI device for BOSC0200 Hans de Goede
2020-11-30 14:19 ` [PATCH v2 3/3] iio: accel: bmc150: Get mount-matrix from ACPI Hans de Goede
2020-11-30 14:32 ` [PATCH v2 1/3] iio: accel: bmc150: Removed unused bmc150_accel_dat irq member Andy Shevchenko
2020-11-30 20:46 ` Jonathan Cameron [this message]
2020-12-01 12:22 ` Hans de Goede
2020-12-01 13:37 ` Andy Shevchenko
2020-12-01 12:54 ` Hans de Goede
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=20201130204536.71d67c07@archlinux \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=hdegoede@redhat.com \
--cc=jeremy@jcline.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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