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>] [day] [month] [year] [list]
Message-Id: <20210618224618.1487323-1-mdf@kernel.org>
Date:   Fri, 18 Jun 2021 15:46:18 -0700
From:   Moritz Fischer <mdf@...nel.org>
To:     linux-fpga@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Moritz Fischer <mdf@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Tom Rix <trix@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH] fpga: machxo2-spi: Address warning about unused variable

Address warning about unused variable in case CONFIG_OF is not set.

warning: unused variable 'of_match' [-Wunused-const-variable]
    static const struct of_device_id of_match[] = {

Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2
support")
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Tom Rix <trix@...hat.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Reported-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Moritz Fischer <mdf@...nel.org>
---
 drivers/fpga/machxo2-spi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c
index 114a64d2b7a4..1afb41aa20d7 100644
--- a/drivers/fpga/machxo2-spi.c
+++ b/drivers/fpga/machxo2-spi.c
@@ -374,11 +374,13 @@ static int machxo2_spi_probe(struct spi_device *spi)
 	return devm_fpga_mgr_register(dev, mgr);
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id of_match[] = {
 	{ .compatible = "lattice,machxo2-slave-spi", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, of_match);
+#endif
 
 static const struct spi_device_id lattice_ids[] = {
 	{ "machxo2-slave-spi", 0 },
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ