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]
Date:   Wed,  2 Aug 2023 11:26:47 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     linux-clk@...r.kernel.org
Cc:     tsbogend@...ha.franken.de, sboyd@...nel.org,
        mturquette@...libre.com, linux-kernel@...r.kernel.org,
        ndesaulniers@...gle.com, kernel test robot <lkp@...el.com>
Subject: [PATCH] clk: ralink: mtmips: quiet unused variable warning

When CONFIG_OF is disabled then the matching table is not referenced and
the following warning appears:

drivers/clk/ralink/clk-mtmips.c:821:34: warning: unused variable 'mtmips_of_match' [-Wunused-const-variable]
821 |   static const struct of_device_id mtmips_of_match[] = {
    |                          ^

Silence it declaring 'mtmips_of_match' with '__maybe_unused'.

Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs")
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307242310.CdOnd2py-lkp@intel.com/
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
---
 drivers/clk/ralink/clk-mtmips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 1e7991439527..6716394b28a3 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -820,7 +820,7 @@ static const struct mtmips_clk_data mt76x8_clk_data = {
 	.num_clk_periph = ARRAY_SIZE(mt76x8_pherip_clks),
 };
 
-static const struct of_device_id mtmips_of_match[] = {
+static const __maybe_unused struct of_device_id mtmips_of_match[] = {
 	{
 		.compatible = "ralink,rt2880-sysc",
 		.data = &rt2880_clk_data,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ