lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241012083701.2189663-1-suhui@nfschina.com>
Date: Sat, 12 Oct 2024 16:37:02 +0800
From: Su Hui <suhui@...china.com>
To: jagathjog1996@...il.com,
	jic23@...nel.org,
	lars@...afoo.de,
	nathan@...nel.org,
	ndesaulniers@...gle.com,
	morbo@...gle.com,
	justinstitt@...gle.com
Cc: Su Hui <suhui@...china.com>,
	benato.denis96@...il.com,
	Jonathan.Cameron@...wei.com,
	linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev,
	kernel-janitors@...r.kernel.org
Subject: [PATCH] iio: bmi323: mark bmi323_ext_reg_savestate as maybe unused

When running 'make CC=clang drivers/iio/imu/bmi323/bmi323_core.o', there
is a clang warning as follows:

drivers/iio/imu/bmi323/bmi323_core.c:133:27: error:
variable 'bmi323_ext_reg_savestate' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
  133 | static const unsigned int bmi323_ext_reg_savestate[] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Mark bmi323_ext_reg_savestate as __maybe_unused to silent this warning.

Fixes: 16531118ba63 ("iio: bmi323: peripheral in lowest power state on suspend")
Signed-off-by: Su Hui <suhui@...china.com>
---
 drivers/iio/imu/bmi323/bmi323_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
index beda8d2de53f..1167984809c5 100644
--- a/drivers/iio/imu/bmi323/bmi323_core.c
+++ b/drivers/iio/imu/bmi323/bmi323_core.c
@@ -130,7 +130,7 @@ static const unsigned int bmi323_reg_savestate[] = {
 	BMI323_FIFO_CONF_REG
 };
 
-static const unsigned int bmi323_ext_reg_savestate[] = {
+static const unsigned int bmi323_ext_reg_savestate[] __maybe_unused = {
 	BMI323_GEN_SET1_REG,
 	BMI323_TAP1_REG,
 	BMI323_TAP2_REG,
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ