From: Quanyang Wang <quanyang.w...@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.w...@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

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to