[linux-next:master 4607/5967] drivers//hwtracing/coresight/coresight-cti-sysfs.c:948:11: warning: address of array 'grp->sig_types' will always evaluate to 'true'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b56557c8e5210c25b008da636ef804b228967aa6
commit: 85b6684eab650dc03a8a1ff9fcddd196c223f139 [4607/5967] coresight: cti: Add connection information to sysfs
config: arm64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (git://gitmirror/llvm_project 211fb91f1067ecdf7c0b8a019bcf76554d813129)
reproduce:
        # FIXME the reproduce steps for clang is not ready yet

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

All warnings (new ones prefixed by >>):

>> drivers//hwtracing/coresight/coresight-cti-sysfs.c:948:11: warning: address of array 'grp->sig_types' will always evaluate to 'true' [-Wpointer-bool-conversion]
           if (grp->sig_types) {
           ~~  ~~~~~^~~~~~~~~
   1 warning generated.

vim +948 drivers//hwtracing/coresight/coresight-cti-sysfs.c

   940	
   941	/* convert a sig type id to a name */
   942	static const char *
   943	cti_sig_type_name(struct cti_trig_con *con, int used_count, bool in)
   944	{
   945		int idx = 0;
   946		struct cti_trig_grp *grp = in ? con->con_in : con->con_out;
   947	
 > 948		if (grp->sig_types) {
   949			if (used_count < grp->nr_sigs)
   950				idx = grp->sig_types[used_count];
   951		}
   952		return sig_type_names[idx];
   953	}
   954	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux