[linux-yocto] [PATCH 3/3] fpga: zynqmp-fpga: fix compile warning in fpga_mgr_register
quanyang.wang at windriver.com
quanyang.wang at windriver.com
Tue Oct 29 00:56:33 PDT 2019
From: Quanyang Wang <quanyang.wang at windriver.com>
This fixes the compile warning as below:
drivers/fpga/fpga-mgr.c:911:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
911 | struct dentry *d, *parent;
^~~~~~
Signed-off-by: Quanyang Wang <quanyang.wang at windriver.com>
---
drivers/fpga/fpga-mgr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index 0511fde09138..83c02c0b4a20 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -895,6 +895,9 @@ EXPORT_SYMBOL_GPL(devm_fpga_mgr_create);
int fpga_mgr_register(struct fpga_manager *mgr)
{
int ret;
+#ifdef CONFIG_FPGA_MGR_DEBUG_FS
+ struct dentry *d, *parent;
+#endif
/*
* Initialize framework state by requesting low level driver read state
@@ -908,8 +911,6 @@ int fpga_mgr_register(struct fpga_manager *mgr)
goto error_device;
#ifdef CONFIG_FPGA_MGR_DEBUG_FS
- struct dentry *d, *parent;
-
mgr->dir = debugfs_create_dir("fpga", NULL);
if (!mgr->dir)
goto error_device;
--
2.17.1
More information about the linux-yocto
mailing list