* [anolis-intel-cloud:devel-5.10 13/13] include/linux/list.h:70:20: warning: storing the address of local variable 'list' in '*&ascb_list_9(D)->list.prev'
@ 2025-05-28 3:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-28 3:52 UTC (permalink / raw)
To: aubrey.li; +Cc: oe-kbuild-all
Hi Mark,
FYI, the error/warning still remains.
tree: https://gitee.com/anolis/intel-cloud-kernel.git devel-5.10
head: e95cc0ad46897957309e1dc44abe311daab7d881
commit: 3bd4786c7657e7f2d1f4a106994bcd19eaed51f9 [13/13] Compiler attributes: GCC cold function alignment workarounds
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250528/202505281100.xKHeBmEr-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505281100.xKHeBmEr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505281100.xKHeBmEr-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/pci.h:33,
from drivers/scsi/aic94xx/aic94xx_hwi.c:9:
In function '__list_add',
inlined from 'asd_ascb_free_list' at drivers/scsi/aic94xx/aic94xx_hwi.h:348:2:
>> include/linux/list.h:70:20: warning: storing the address of local variable 'list' in '*&ascb_list_9(D)->list.prev' [-Wdangling-pointer=]
70 | next->prev = new;
| ~~~~~~~~~~~^~~~~
drivers/scsi/aic94xx/aic94xx_hwi.h: In function 'asd_ascb_free_list':
drivers/scsi/aic94xx/aic94xx_hwi.h:345:19: note: 'list' declared here
345 | LIST_HEAD(list);
| ^~~~
include/linux/list.h:24:26: note: in definition of macro 'LIST_HEAD'
24 | struct list_head name = LIST_HEAD_INIT(name)
| ^~~~
drivers/scsi/aic94xx/aic94xx_hwi.h:345:19: note: 'ascb_list' declared here
345 | LIST_HEAD(list);
| ^~~~
include/linux/list.h:24:26: note: in definition of macro 'LIST_HEAD'
24 | struct list_head name = LIST_HEAD_INIT(name)
| ^~~~
vim +70 include/linux/list.h
d7c816733d501b5 Kees Cook 2016-08-17 56
^1da177e4c3f415 Linus Torvalds 2005-04-16 57 /*
^1da177e4c3f415 Linus Torvalds 2005-04-16 58 * Insert a new entry between two known consecutive entries.
^1da177e4c3f415 Linus Torvalds 2005-04-16 59 *
^1da177e4c3f415 Linus Torvalds 2005-04-16 60 * This is only for internal list manipulation where we know
^1da177e4c3f415 Linus Torvalds 2005-04-16 61 * the prev/next entries already!
^1da177e4c3f415 Linus Torvalds 2005-04-16 62 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 63 static inline void __list_add(struct list_head *new,
^1da177e4c3f415 Linus Torvalds 2005-04-16 64 struct list_head *prev,
^1da177e4c3f415 Linus Torvalds 2005-04-16 65 struct list_head *next)
^1da177e4c3f415 Linus Torvalds 2005-04-16 66 {
d7c816733d501b5 Kees Cook 2016-08-17 67 if (!__list_add_valid(new, prev, next))
d7c816733d501b5 Kees Cook 2016-08-17 68 return;
d7c816733d501b5 Kees Cook 2016-08-17 69
^1da177e4c3f415 Linus Torvalds 2005-04-16 @70 next->prev = new;
^1da177e4c3f415 Linus Torvalds 2005-04-16 71 new->next = next;
^1da177e4c3f415 Linus Torvalds 2005-04-16 72 new->prev = prev;
1c97be677f72b3c Paul E. McKenney 2015-09-20 73 WRITE_ONCE(prev->next, new);
^1da177e4c3f415 Linus Torvalds 2005-04-16 74 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 75
:::::: The code at line 70 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-28 3:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 3:52 [anolis-intel-cloud:devel-5.10 13/13] include/linux/list.h:70:20: warning: storing the address of local variable 'list' in '*&ascb_list_9(D)->list.prev' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.