[dinguyen:socfpga-5.14_v1 10/121] drivers/fpga/fpga-mgr-debugfs.c:171:6: warning: no previous prototype for 'fpga_mgr_debugfs_add'

From: kernel test robot
Date: Fri Nov 05 2021 - 08:44:24 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git socfpga-5.14_v1
head: cc7ba8d9b34b85acfbeefb77fa57c116c733c2c4
commit: 0f594e3dee07f3a29f4f5f1ac7e71887cf2f0f57 [10/121] FogBugz #398879-2: fpga mgr debugfs
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git/commit/?id=0f594e3dee07f3a29f4f5f1ac7e71887cf2f0f57
git remote add dinguyen https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git
git fetch --no-tags dinguyen socfpga-5.14_v1
git checkout 0f594e3dee07f3a29f4f5f1ac7e71887cf2f0f57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/fpga/fpga-mgr-debugfs.c:171:6: warning: no previous prototype for 'fpga_mgr_debugfs_add' [-Wmissing-prototypes]
171 | void fpga_mgr_debugfs_add(struct fpga_manager *mgr)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/fpga/fpga-mgr-debugfs.c:204:6: warning: no previous prototype for 'fpga_mgr_debugfs_remove' [-Wmissing-prototypes]
204 | void fpga_mgr_debugfs_remove(struct fpga_manager *mgr)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/fpga/fpga-mgr-debugfs.c:219:6: warning: no previous prototype for 'fpga_mgr_debugfs_init' [-Wmissing-prototypes]
219 | void fpga_mgr_debugfs_init(void)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/fpga/fpga-mgr-debugfs.c:226:6: warning: no previous prototype for 'fpga_mgr_debugfs_uninit' [-Wmissing-prototypes]
226 | void fpga_mgr_debugfs_uninit(void)
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/fpga_mgr_debugfs_add +171 drivers/fpga/fpga-mgr-debugfs.c

170
> 171 void fpga_mgr_debugfs_add(struct fpga_manager *mgr)
172 {
173 struct fpga_mgr_debugfs *debugfs;
174 struct fpga_image_info *info;
175
176 if (!fpga_mgr_debugfs_root)
177 return;
178
179 debugfs = kzalloc(sizeof(*debugfs), GFP_KERNEL);
180 if (!debugfs)
181 return;
182
183 info = fpga_image_info_alloc(&mgr->dev);
184 if (!info) {
185 kfree(debugfs);
186 return;
187 }
188 debugfs->info = info;
189
190 debugfs->debugfs_dir = debugfs_create_dir(dev_name(&mgr->dev),
191 fpga_mgr_debugfs_root);
192
193 debugfs_create_file("firmware_name", 0600, debugfs->debugfs_dir, mgr,
194 &fpga_mgr_firmware_fops);
195
196 debugfs_create_file("image", 0200, debugfs->debugfs_dir, mgr,
197 &fpga_mgr_image_fops);
198
199 debugfs_create_u32("flags", 0600, debugfs->debugfs_dir, &info->flags);
200
201 mgr->debugfs = debugfs;
202 }
203
> 204 void fpga_mgr_debugfs_remove(struct fpga_manager *mgr)
205 {
206 struct fpga_mgr_debugfs *debugfs = mgr->debugfs;
207
208 if (!fpga_mgr_debugfs_root)
209 return;
210
211 debugfs_remove_recursive(debugfs->debugfs_dir);
212
213 /* this function also frees debugfs->info->firmware_name */
214 fpga_image_info_free(debugfs->info);
215
216 kfree(debugfs);
217 }
218
> 219 void fpga_mgr_debugfs_init(void)
220 {
221 fpga_mgr_debugfs_root = debugfs_create_dir("fpga_manager", NULL);
222 if (!fpga_mgr_debugfs_root)
223 pr_warn("fpga_mgr: Failed to create debugfs root\n");
224 }
225
> 226 void fpga_mgr_debugfs_uninit(void)
227 {
228 debugfs_remove_recursive(fpga_mgr_debugfs_root);
229 }
230

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip