From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH v1 4/9] iio: gyro: st_gyro: Mark gyro_pdata with __maybe_unused
Date: Mon, 23 Dec 2019 16:20:39 +0000 [thread overview]
Message-ID: <20191223162039.6282ac62@archlinux> (raw)
In-Reply-To: <20191216173853.75797-4-andriy.shevchenko@linux.intel.com>
On Mon, 16 Dec 2019 19:38:48 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> Since we put static variable to a header file it's copied to each module
> that includes the header. But not all of them are actually used it.
>
> Mark gyro_pdata with __maybe_unused to calm a compiler down:
>
> In file included from drivers/iio/gyro/st_gyro_i2c.c:18:
> drivers/iio/gyro/st_gyro.h:31:46: warning: ‘gyro_pdata’ defined but not used [-Wunused-const-variable=]
> 31 | static const struct st_sensors_platform_data gyro_pdata = {
> | ^~~~~~~~~~
> ...
Applied
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/iio/gyro/st_gyro.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/gyro/st_gyro.h b/drivers/iio/gyro/st_gyro.h
> index 592f6b34e987..fd9171cc3aba 100644
> --- a/drivers/iio/gyro/st_gyro.h
> +++ b/drivers/iio/gyro/st_gyro.h
> @@ -28,7 +28,7 @@
> * struct st_sensors_platform_data - gyro platform data
> * @drdy_int_pin: DRDY on gyros is available only on INT2 pin.
> */
> -static const struct st_sensors_platform_data gyro_pdata = {
> +static __maybe_unused const struct st_sensors_platform_data gyro_pdata = {
> .drdy_int_pin = 2,
> };
>
next prev parent reply other threads:[~2019-12-23 16:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 17:38 [PATCH v1 1/9] iio: light: st_uvis25: Drop unneeded header inclusion Andy Shevchenko
2019-12-16 17:38 ` [PATCH v1 2/9] iio: accel: st_accel: Drop unnecessary #else branch for ACPI Andy Shevchenko
2019-12-23 16:17 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 3/9] iio: pressure: st_press: " Andy Shevchenko
2019-12-23 16:19 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 4/9] iio: gyro: st_gyro: Mark gyro_pdata with __maybe_unused Andy Shevchenko
2019-12-23 16:20 ` Jonathan Cameron [this message]
2019-12-16 17:38 ` [PATCH v1 5/9] iio: accel: st_accel: Mark default_accel_pdata " Andy Shevchenko
2019-12-23 16:20 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 6/9] iio: pressure: st_press: Mark default_press_pdata " Andy Shevchenko
2019-12-23 16:21 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 7/9] iio: st_sensors: Describe function parameters in kernel-doc Andy Shevchenko
2019-12-23 16:22 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 8/9] iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe() Andy Shevchenko
2019-12-23 16:28 ` Jonathan Cameron
2020-01-13 13:58 ` Andy Shevchenko
2020-01-13 21:52 ` Jonathan Cameron
2019-12-16 17:38 ` [PATCH v1 9/9] iio: st_sensors: Make use of device properties Andy Shevchenko
2019-12-23 16:30 ` Jonathan Cameron
2020-01-13 13:58 ` Andy Shevchenko
2020-01-13 21:53 ` Jonathan Cameron
2019-12-23 16:15 ` [PATCH v1 1/9] iio: light: st_uvis25: Drop unneeded header inclusion Jonathan Cameron
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=20191223162039.6282ac62@archlinux \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=knaack.h@gmx.de \
--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;
as well as URLs for NNTP newsgroup(s).