From: Moritz Fischer <mdf@kernel.org>
To: linux-fpga@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Moritz Fischer <mdf@kernel.org>,
Tom Rix <trix@redhat.com>
Subject: [PATCH 2/4] fpga: xiilnx-spi: Address warning about unused variable
Date: Thu, 1 Jul 2021 20:54:02 -0700 [thread overview]
Message-ID: <20210702035404.397853-3-mdf@kernel.org> (raw)
In-Reply-To: <20210702035404.397853-1-mdf@kernel.org>
warning: ‘xlnx_spi_of_match’ defined but not used
[-Wunused-const-variable]
static const struct of_device_id xlnx_spi_of_match[] = {
Fixes: 061c97d13f1a ("fpga manager: Add Xilinx slave serial SPI driver")
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
---
drivers/fpga/xilinx-spi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c
index fee4d0abf6bf..b6bcf1d9233d 100644
--- a/drivers/fpga/xilinx-spi.c
+++ b/drivers/fpga/xilinx-spi.c
@@ -256,11 +256,13 @@ static int xilinx_spi_probe(struct spi_device *spi)
return devm_fpga_mgr_register(&spi->dev, mgr);
}
+#ifdef CONFIG_OF
static const struct of_device_id xlnx_spi_of_match[] = {
{ .compatible = "xlnx,fpga-slave-serial", },
{}
};
MODULE_DEVICE_TABLE(of, xlnx_spi_of_match);
+#endif
static struct spi_driver xilinx_slave_spi_driver = {
.driver = {
--
2.32.0
next prev parent reply other threads:[~2021-07-02 3:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 3:54 [PATCH 0/4] FPGA Manager address unused variable warnings Moritz Fischer
2021-07-02 3:54 ` [PATCH 1/4] fpga: altera-freeze-bridge: Address warning about unused variable Moritz Fischer
2021-07-02 3:54 ` Moritz Fischer [this message]
2021-07-02 3:54 ` [PATCH 3/4] fpga: xilinx-pr-decoupler: " Moritz Fischer
2021-07-02 3:54 ` [PATCH 4/4] fpga: zynqmp-fpga: " Moritz Fischer
2021-07-06 16:28 ` [PATCH 0/4] FPGA Manager address unused variable warnings Tom Rix
2021-07-07 2:03 ` Xu Yilun
2021-07-18 2:00 ` Moritz Fischer
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=20210702035404.397853-3-mdf@kernel.org \
--to=mdf@kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trix@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).