Re: [PATCH 8/8] coresight: Fix CTI module refcount leak by making it a helper device

From: kernel test robot
Date: Thu Mar 09 2023 - 03:42:01 EST


Hi James,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc1 next-20230309]
[cannot apply to atorgue-stm32/stm32-next soc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/James-Clark/coresight-Use-enum-type-for-cs_mode-wherever-possible/20230309-014226
patch link: https://lore.kernel.org/r/20230308173904.3449231-9-james.clark%40arm.com
patch subject: [PATCH 8/8] coresight: Fix CTI module refcount leak by making it a helper device
config: arm-randconfig-r005-20230309 (https://download.01.org/0day-ci/archive/20230309/202303091610.lmXasuRR-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/f9e928551717a3c3c97e8264ed48a11a27d1667d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review James-Clark/coresight-Use-enum-type-for-cs_mode-wherever-possible/20230309-014226
git checkout f9e928551717a3c3c97e8264ed48a11a27d1667d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/hwtracing/coresight/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303091610.lmXasuRR-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hwtracing/coresight/coresight-cti-core.c:586:26: warning: no previous prototype for 'cti__get_cti_device' [-Wmissing-prototypes]
586 | struct coresight_device *cti__get_cti_device(struct coresight_device *csdev)
| ^~~~~~~~~~~~~~~~~~~


vim +/cti__get_cti_device +586 drivers/hwtracing/coresight/coresight-cti-core.c

585
> 586 struct coresight_device *cti__get_cti_device(struct coresight_device *csdev)
587 {
588 int i;
589 struct coresight_device *tmp;
590
591 for (i = 0; i < csdev->pdata->nr_outconns; i++) {
592 tmp = csdev->pdata->out_conns[i].child_dev;
593
594 if (tmp && tmp->type == CORESIGHT_DEV_TYPE_HELPER &&
595 tmp->subtype.helper_subtype ==
596 CORESIGHT_DEV_SUBTYPE_HELPER_ECT_CTI)
597 return tmp;
598 }
599 return NULL;
600 }
601

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests