All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jonathan Cameron <jic23@kernel.org>,
	linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 5/9] iio: accel: st_accel: Mark default_accel_pdata with __maybe_unused
Date: Mon, 16 Dec 2019 19:38:49 +0200	[thread overview]
Message-ID: <20191216173853.75797-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20191216173853.75797-1-andriy.shevchenko@linux.intel.com>

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 default_accel_pdata with __maybe_unused to calm a compiler down:

In file included from drivers/iio/accel/st_accel_i2c.c:19:
drivers/iio/accel/st_accel.h:67:46: warning: ‘default_accel_pdata’ defined but not used [-Wunused-const-variable=]
   67 | static const struct st_sensors_platform_data default_accel_pdata = {
      |                                              ^~~~~~~~~~~~~~~~~~~
...

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/accel/st_accel.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index af09943f38c9..5b13e293cade 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -64,7 +64,7 @@ enum st_accel_type {
 * struct st_sensors_platform_data - default accel platform data
 * @drdy_int_pin: default accel DRDY is available on INT1 pin.
 */
-static const struct st_sensors_platform_data default_accel_pdata = {
+static __maybe_unused const struct st_sensors_platform_data default_accel_pdata = {
 	.drdy_int_pin = 1,
 };
 
-- 
2.24.0


  parent reply	other threads:[~2019-12-16 17:39 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
2019-12-16 17:38 ` Andy Shevchenko [this message]
2019-12-23 16:20   ` [PATCH v1 5/9] iio: accel: st_accel: Mark default_accel_pdata " 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=20191216173853.75797-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jic23@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.