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: <1598234713-8532-1-git-send-email-u0084500@gmail.com>
Date:   Mon, 24 Aug 2020 10:05:13 +0800
From:   cy_huang <u0084500@...il.com>
To:     lgirdwood@...il.com, broonie@...nel.org
Cc:     cy_huang@...htek.com, gene_chen@...htek.com,
        linux-kernel@...r.kernel.org
Subject: [PATCH] regulator: rt4801: Fix W=1 build warning when CONFIG_OF=n

From: ChiYuan Huang <cy_huang@...htek.com>

Fix below warning when CONFIG_OF=n:

drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable]
  206 | static const struct of_device_id rt4801_of_id[] = {
      |                                  ^~~~~~~~~~~~

Signed-off-by: ChiYuan Huang <cy_huang@...htek.com>
Reported-by: kernel test robot <lkp@...el.com>
---
 drivers/regulator/rt4801-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/rt4801-regulator.c b/drivers/regulator/rt4801-regulator.c
index 0ddc670..2055a9c 100644
--- a/drivers/regulator/rt4801-regulator.c
+++ b/drivers/regulator/rt4801-regulator.c
@@ -203,7 +203,7 @@ static int rt4801_probe(struct i2c_client *i2c)
 	return 0;
 }
 
-static const struct of_device_id rt4801_of_id[] = {
+static const struct of_device_id __maybe_unused rt4801_of_id[] = {
 	{ .compatible = "richtek,rt4801", },
 	{ },
 };
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ