lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dynamic_debug: allow to work if debugfs is disabled
Hi Greg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.5-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Greg-Kroah-Hartman/dynamic_debug-allow-to-work-if-debugfs-is-disabled/20200124-140304
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1522d9da40bdfe502c91163e6d769332897201fa
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

lib/dynamic_debug.c: In function 'dynamic_debug_init_debugfs':
>> lib/dynamic_debug.c:1003:6: warning: the address of 'debugfs_initialized' will always evaluate as 'true' [-Waddress]
if (debugfs_initialized) {
^~~~~~~~~~~~~~~~~~~

vim +1003 lib/dynamic_debug.c

993
994 static int __init dynamic_debug_init_debugfs(void)
995 {
996 struct dentry *debugfs_dir;
997 struct proc_dir_entry *procfs_dir;
998
999 if (!ddebug_init_success)
1000 return -ENODEV;
1001
1002 /* Create the control file in debugfs if it is enabled */
> 1003 if (debugfs_initialized) {
1004 debugfs_dir = debugfs_create_dir("dynamic_debug", NULL);
1005 debugfs_create_file("control", 0644, debugfs_dir, NULL,
1006 &ddebug_proc_fops);
1007 return 0;
1008 }
1009
1010 /* No debugfs so put it in procfs instead */
1011 procfs_dir = proc_mkdir("dynamic_debug", NULL);
1012 if (procfs_dir)
1013 proc_create("control", 0x644, procfs_dir, &ddebug_proc_fops);
1014
1015 return 0;
1016 }
1017

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-01-25 01:05    [W:0.106 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site