From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jackie Liu <liu.yun@linux.dev>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: da9150-gpadc: fix build on mips CONFIG_MIKROTIK_RB532=y
Date: Sun, 27 Mar 2022 15:57:18 +0100 [thread overview]
Message-ID: <20220327155718.0d00be25@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfEyhB92iP8sRyGn+2WLzazFtok=47xzewhCt=bo=a7Zw@mail.gmail.com>
On Thu, 24 Mar 2022 12:18:14 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Thu, Mar 24, 2022 at 7:58 AM Jackie Liu <liu.yun@linux.dev> wrote:
> >
> > From: Jackie Liu <liuyun01@kylinos.cn>
> >
> > kernel robot report build fail by randconfig:
> >
> > [...]
> > drivers/iio/adc/da9150-gpadc.c:254:13: error: ‘DA9150_GPADC_CHAN_0x08’ undeclared here (not in a function); did you mean ‘DA9150_GPADC_CHAN_TBAT’?
> > 254 | .channel = DA9150_GPADC_CHAN_##_id, \
> > | ^~~~~~~~~~~~~~~~~~
> > drivers/iio/adc/da9150-gpadc.c:273:2: note: in expansion of macro ‘DA9150_GPADC_CHANNEL’
> > 273 | DA9150_GPADC_CHANNEL(_id, _hw_id, _type, \
> > | ^~~~~~~~~~~~~~~~~~~~
> > drivers/iio/adc/da9150-gpadc.c:281:2: note: in expansion of macro ‘DA9150_GPADC_CHANNEL_PROCESSED’
> > 281 | DA9150_GPADC_CHANNEL_PROCESSED(GPIOD, GPIOD_6V, IIO_VOLTAGE, NULL),
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> > make[4]: *** [../scripts/Makefile.build:288: drivers/iio/adc/da9150-gpadc.o] Error 1
> > make[3]: *** [../scripts/Makefile.build:550: drivers/iio/adc] Error 2
> > make[3]: *** Waiting for unfinished jobs....
> > [...]
>
> These lines are noise and no need to be in the commit message.
>
> > +/*
> > + * Workaround for arch/mips/include/asm/mach-rc32434/rb.h
> > + * #define GPIOD 0x08
> > + */
> > +#undef GPIOD
>
> Looking at the bottom here the better approach seems to be namespacing
> of GPIO registers in the above mentioned header and corresponding
> users.
Agreed. Having around it here is just going to the tip of the iceberg long
term. The header + users need fixing if it's going to be widely enough
included that we can see it in places like this.
From some very basic grepping I 'suspect' you could just push the defines
down into arch/mips/rb532/gpio.c but I may well be wrong...
Jonathan
>
> > /* Supported channels */
> > static const struct iio_chan_spec da9150_gpadc_channels[] = {
> > DA9150_GPADC_CHANNEL_PROCESSED(GPIOA, GPIOA_6V, IIO_VOLTAGE, NULL),
>
next prev parent reply other threads:[~2022-03-27 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 5:58 [PATCH] iio: adc: da9150-gpadc: fix build on mips CONFIG_MIKROTIK_RB532=y Jackie Liu
2022-03-24 10:18 ` Andy Shevchenko
2022-03-27 14:57 ` Jonathan Cameron [this message]
2022-03-27 19:35 ` Andy Shevchenko
2022-03-28 1:08 ` Jackie Liu
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=20220327155718.0d00be25@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=liu.yun@linux.dev \
/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