FPGA Manager address unused variable warnings
Subsystems (2)
Moritz Fischer
maintainercover FPGA Manager address unused variable warnings
This patchset addresses a handful of warnings as result of_match_ids being not properly wrapped in #ifdef CONFIG_OF.
Moritz Fischer (4):
fpga: altera-freeze-bridge: Address warning about unused variable
fpga: xiilnx-spi: Address warning about unused variable
fpga: xilinx-pr-decoupler: Address warning about unused variable
fpga: zynqmp-fpga: Address warning about unused variable
drivers/fpga/altera-freeze-bridge.c | 2 ++ drivers/fpga/xilinx-pr-decoupler.c | 2 ++ drivers/fpga/xilinx-spi.c | 2 ++ drivers/fpga/zynqmp-fpga.c | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
2.32.0
Moritz Fischer
maintainerPATCH 1/4 fpga: altera-freeze-bridge: Address warning about unused variable
warning: unused variable 'altera_freeze_br_of_match'
[-Wunused-const-variable]
static const struct of_device_id altera_freeze_br_of_match[] = {
--- drivers/fpga/altera-freeze-bridge.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/fpga/altera-freeze-bridge.c +2 -0
@@ -198,11 +198,13 @@ static const struct fpga_bridge_ops altera_freeze_br_br_ops = { .enable_show = altera_freeze_br_enable_show, }; +#ifdef CONFIG_OF static const struct of_device_id altera_freeze_br_of_match[] = { { .compatible ="altr,freeze-bridge-controller" , }, {}, };MODULE_DEVICE_TABLE (of, altera_freeze_br_of_match); +#endif static int altera_freeze_br_probe (struct platform_device *pdev) {
Signature · 1 line
2.32.0
Moritz Fischer
maintainerPATCH 2/4 fpga: xiilnx-spi: Address warning about unused variable
In reply to Moritz Fischerwarning: ‘xlnx_spi_of_match’ defined but not used
[-Wunused-const-variable]
static const struct of_device_id xlnx_spi_of_match[] = {
--- drivers/fpga/xilinx-spi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/fpga/xilinx-spi.c +2 -0
@@ -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 = {
Signature · 1 line
2.32.0
Moritz Fischer
maintainerPATCH 3/4 fpga: xilinx-pr-decoupler: Address warning about unused variable
In reply to Moritz Fischerwarning: ‘xlnx_pr_decoupler_of_match’ defined but not used
[-Wunused-const-variable=]
static const struct of_device_id xlnx_pr_decoupler_of_match[] = {
--- drivers/fpga/xilinx-pr-decoupler.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/fpga/xilinx-pr-decoupler.c +2 -0
@@ -81,6 +81,7 @@ static const struct fpga_bridge_ops xlnx_pr_decoupler_br_ops = { .enable_show = xlnx_pr_decoupler_enable_show, }; +#ifdef CONFIG_OF static const struct xlnx_config_data decoupler_config = { .name ="Xilinx PR Decoupler" , };
@@ -99,6 +100,7 @@ static const struct of_device_id xlnx_pr_decoupler_of_match[] = { {}, };MODULE_DEVICE_TABLE (of, xlnx_pr_decoupler_of_match); +#endif static int xlnx_pr_decoupler_probe (struct platform_device *pdev) {
Signature · 1 line
2.32.0
Moritz Fischer
maintainerPATCH 4/4 fpga: zynqmp-fpga: Address warning about unused variable
In reply to Moritz Fischerwarning: ‘zynqmp_fpga_of_match’ defined but not used
[-Wunused-const-variable=]
static const struct of_device_id zynqmp_fpga_of_match[] = {
Xilinx zynqmp")
--- drivers/fpga/zynqmp-fpga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/fpga/zynqmp-fpga.c +2 -1
@@ -110,12 +110,13 @@ static int zynqmp_fpga_probe(struct platform_device *pdev)return devm_fpga_mgr_register (dev, mgr); } +#ifdef CONFIG_OF static const struct of_device_id zynqmp_fpga_of_match[] = { { .compatible ="xlnx,zynqmp-pcap-fpga" , }, {}, }; -MODULE_DEVICE_TABLE (of, zynqmp_fpga_of_match); +#endif static struct platform_driver zynqmp_fpga_driver = { .probe = zynqmp_fpga_probe,
Signature · 1 line
2.32.0
Tom Rix
reviewerQuoted 9 lines · Moritz Fischer
This patchset addresses a handful of warnings as result
of_match_idsbeing not properly wrapped in #ifdefCONFIG_OF.Moritz Fischer (4):
fpga: altera-freeze-bridge: Address warning about unused variable
fpga: xiilnx-spi: Address warning about unused variable
fpga: xilinx-pr-decoupler: Address warning about unused variable
fpga: zynqmp-fpga: Address warning about unused variable
Quoted 5 lines
drivers/fpga/altera-freeze-bridge.c | 2 ++ drivers/fpga/xilinx-pr-decoupler.c | 2 ++ drivers/fpga/xilinx-spi.c | 2 ++ drivers/fpga/zynqmp-fpga.c | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-)
I am not seeing these warnings, but it is still worth doing.
I think a few more files need this change.
altera-ps-spi.c, dfl-n3000-nios.c, altera-hps2fpga.c, stratix10-soc.c, socfpga-a10.c, altera-fpga2sdram.c
Not needed for
altera-pr-ip-core-plat.c and ice40-spi.c
These have depends on OF in Kconfig.
Tom
Xu Yilun
maintainerQuoted 17 lines · Tom Rix
Quoted 9 lines · Moritz Fischer
This patchset addresses a handful of warnings as result
of_match_idsbeing not properly wrapped in #ifdefCONFIG_OF.Moritz Fischer (4):
fpga: altera-freeze-bridge: Address warning about unused variable
fpga: xiilnx-spi: Address warning about unused variable
fpga: xilinx-pr-decoupler: Address warning about unused variable
fpga: zynqmp-fpga: Address warning about unused variableQuoted 5 lines
drivers/fpga/altera-freeze-bridge.c | 2 ++ drivers/fpga/xilinx-pr-decoupler.c | 2 ++ drivers/fpga/xilinx-spi.c | 2 ++ drivers/fpga/zynqmp-fpga.c | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-)
Quoted 6 lines
I am not seeing these warnings, but it is still worth doing.
I think a few more files need this change.
altera-ps-spi.c,dfl-n3000-nios.c,altera-hps2fpga.c,stratix10-soc.c,socfpga-a10.c,altera-fpga2sdram.c
dfl-n3000-nios is not using of_device_id, and doesn't need the change.
Thanks,
Yilun
Quoted 8 lines
Not needed for
altera-pr-ip-core-plat.candice40-spi.cThese have depends on OF in
Kconfig.Tom
Quoted 22 lines · Xu Yilun
Quoted 21 lines · Tom Rix
Quoted 9 lines · Moritz Fischer
This patchset addresses a handful of warnings as result
of_match_idsbeing not properly wrapped in #ifdefCONFIG_OF.Moritz Fischer (4):
fpga: altera-freeze-bridge: Address warning about unused variable
fpga: xiilnx-spi: Address warning about unused variable
fpga: xilinx-pr-decoupler: Address warning about unused variable
fpga: zynqmp-fpga: Address warning about unused variableQuoted 5 lines
drivers/fpga/altera-freeze-bridge.c | 2 ++ drivers/fpga/xilinx-pr-decoupler.c | 2 ++ drivers/fpga/xilinx-spi.c | 2 ++ drivers/fpga/zynqmp-fpga.c | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-)I am not seeing these warnings, but it is still worth doing.
I think a few more files need this change.
Quoted 16 lines
Quoted 2 lines
altera-ps-spi.c,dfl-n3000-nios.c,altera-hps2fpga.c,stratix10-soc.c,socfpga-a10.c,altera-fpga2sdram.cdfl-n3000-nios is not using
of_device_id, and doesn't need the change.Thanks,
YilunQuoted 8 lines
Not needed for
altera-pr-ip-core-plat.candice40-spi.cThese have depends on OF in
Kconfig.Tom
Applied to for-next,
Moritz