Message ID | 20200702144625.2533530-25-lee.jones@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Fix a bunch of W=1 issues in USB | expand |
Hi Lee, I love your patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on balbi-usb/testing/next char-misc/char-misc-testing v5.8-rc3 next-20200702] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Lee-Jones/Fix-a-bunch-of-W-1-issues-in-USB/20200702-225210 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: x86_64-allyesconfig (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 003a086ffc0d1affbb8300b36225fb8150a2d40a) 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 # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): In file included from drivers/usb/mtu3/mtu3_trace.c:11: >> drivers/usb/mtu3/mtu3_debug.h:29:36: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:30:35: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:31:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:32:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); ^ In file included from drivers/usb/mtu3/mtu3_trace.c:12: In file included from drivers/usb/mtu3/mtu3_trace.h:279: include/trace/define_trace.h:95:10: fatal error: './mtu3_trace.h' file not found #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/trace/define_trace.h:90:32: note: expanded from macro 'TRACE_INCLUDE' # define TRACE_INCLUDE(system) __TRACE_INCLUDE(system) ^~~~~~~~~~~~~~~~~~~~~~~ include/trace/define_trace.h:87:34: note: expanded from macro '__TRACE_INCLUDE' # define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/stringify.h:10:27: note: expanded from macro '__stringify' #define __stringify(x...) __stringify_1(x) ^~~~~~~~~~~~~~~~ include/linux/stringify.h:9:29: note: expanded from macro '__stringify_1' #define __stringify_1(x...) #x ^~ <scratch space>:48:1: note: expanded from here "./mtu3_trace.h" ^~~~~~~~~~~~~~~~ 4 warnings and 1 error generated. -- In file included from drivers/usb/mtu3/mtu3_trace.c:11: >> drivers/usb/mtu3/mtu3_debug.h:29:36: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:30:35: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:31:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); ^ drivers/usb/mtu3/mtu3_debug.h:32:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility] void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); ^ 4 warnings generated. vim +29 drivers/usb/mtu3/mtu3_debug.h ae07809255d3e3 Chunfeng Yun 2019-03-21 27 ae07809255d3e3 Chunfeng Yun 2019-03-21 28 #if IS_ENABLED(CONFIG_DEBUG_FS) ae07809255d3e3 Chunfeng Yun 2019-03-21 @29 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); 4aab6ad24a101b Chunfeng Yun 2019-03-21 30 void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb); ae07809255d3e3 Chunfeng Yun 2019-03-21 31 void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); ae07809255d3e3 Chunfeng Yun 2019-03-21 32 void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); ae07809255d3e3 Chunfeng Yun 2019-03-21 33 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/usb/mtu3/mtu3_trace.c b/drivers/usb/mtu3/mtu3_trace.c index 155eae126e5e2..d17ddb87cdcf2 100644 --- a/drivers/usb/mtu3/mtu3_trace.c +++ b/drivers/usb/mtu3/mtu3_trace.c @@ -8,6 +8,7 @@ */ #define CREATE_TRACE_POINTS +#include "mtu3_debug.h" #include "mtu3_trace.h" void mtu3_dbg_trace(struct device *dev, const char *fmt, ...)
If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/usb/mtu3/mtu3_trace.c:13:6: warning: no previous prototype for ‘mtu3_dbg_trace’ [-Wmissing-prototypes] 13 | void mtu3_dbg_trace(struct device *dev, const char *fmt, ...) | ^~~~~~~~~~~~~~ Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/usb/mtu3/mtu3_trace.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1