[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211230231.1zUBMn6g-lkp@intel.com>
Date: Wed, 23 Nov 2022 02:13:07 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jakob Koschel <jakobkoschel@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
Kevin Cernekee <cernekee@...il.com>,
Jani Nikula <jani.nikula@...el.com>,
Hans de Goede <hdegoede@...hat.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>
Subject: Re: [PATCH v3 1/4] i915: Move list_count() to list.h for broader use
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.1-rc6 next-20221122]
[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/Andy-Shevchenko/i915-Move-list_count-to-list-h-for-broader-use/20221122-233657
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20221122153516.52577-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v3 1/4] i915: Move list_count() to list.h for broader use
config: um-i386_defconfig
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/3d217ef769536f160f5c20224aeb0f9070bdfdcf
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/i915-Move-list_count-to-list-h-for-broader-use/20221122-233657
git checkout 3d217ef769536f160f5c20224aeb0f9070bdfdcf
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
ld: fs/isofs/inode.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
ld: fs/isofs/dir.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
ld: fs/isofs/util.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
ld: fs/isofs/rock.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
ld: fs/isofs/export.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
ld: fs/isofs/joliet.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/isofs/namei.o:include/linux/list.h:663: first defined here
--
ld: fs/autofs/inode.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
ld: fs/autofs/root.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
ld: fs/autofs/symlink.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
ld: fs/autofs/waitq.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
ld: fs/autofs/expire.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
ld: fs/autofs/dev-ioctl.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; fs/autofs/init.o:include/linux/list.h:663: first defined here
--
ld: block/bfq-wf2q.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; block/bfq-iosched.o:include/linux/list.h:663: first defined here
ld: block/bfq-cgroup.o: in function `list_count':
>> include/linux/list.h:663: multiple definition of `list_count'; block/bfq-iosched.o:include/linux/list.h:663: first defined here
vim +663 include/linux/list.h
557
558 /**
559 * list_next_entry - get the next element in list
560 * @pos: the type * to cursor
561 * @member: the name of the list_head within the struct.
562 */
563 #define list_next_entry(pos, member) \
564 list_entry((pos)->member.next, typeof(*(pos)), member)
565
566 /**
567 * list_next_entry_circular - get the next element in list
568 * @pos: the type * to cursor.
569 * @head: the list head to take the element from.
570 * @member: the name of the list_head within the struct.
571 *
572 * Wraparound if pos is the last element (return the first element).
573 * Note, that list is expected to be not empty.
574 */
575 #define list_next_entry_circular(pos, head, member) \
576 (list_is_last(&(pos)->member, head) ? \
577 list_first_entry(head, typeof(*(pos)), member) : list_next_entry(pos, member))
578
579 /**
580 * list_prev_entry - get the prev element in list
581 * @pos: the type * to cursor
582 * @member: the name of the list_head within the struct.
583 */
584 #define list_prev_entry(pos, member) \
585 list_entry((pos)->member.prev, typeof(*(pos)), member)
586
587 /**
588 * list_prev_entry_circular - get the prev element in list
589 * @pos: the type * to cursor.
590 * @head: the list head to take the element from.
591 * @member: the name of the list_head within the struct.
592 *
593 * Wraparound if pos is the first element (return the last element).
594 * Note, that list is expected to be not empty.
595 */
596 #define list_prev_entry_circular(pos, head, member) \
597 (list_is_first(&(pos)->member, head) ? \
598 list_last_entry(head, typeof(*(pos)), member) : list_prev_entry(pos, member))
599
600 /**
601 * list_for_each - iterate over a list
602 * @pos: the &struct list_head to use as a loop cursor.
603 * @head: the head for your list.
604 */
605 #define list_for_each(pos, head) \
606 for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
607
608 /**
609 * list_for_each_rcu - Iterate over a list in an RCU-safe fashion
610 * @pos: the &struct list_head to use as a loop cursor.
611 * @head: the head for your list.
612 */
613 #define list_for_each_rcu(pos, head) \
614 for (pos = rcu_dereference((head)->next); \
615 !list_is_head(pos, (head)); \
616 pos = rcu_dereference(pos->next))
617
618 /**
619 * list_for_each_continue - continue iteration over a list
620 * @pos: the &struct list_head to use as a loop cursor.
621 * @head: the head for your list.
622 *
623 * Continue to iterate over a list, continuing after the current position.
624 */
625 #define list_for_each_continue(pos, head) \
626 for (pos = pos->next; !list_is_head(pos, (head)); pos = pos->next)
627
628 /**
629 * list_for_each_prev - iterate over a list backwards
630 * @pos: the &struct list_head to use as a loop cursor.
631 * @head: the head for your list.
632 */
633 #define list_for_each_prev(pos, head) \
634 for (pos = (head)->prev; !list_is_head(pos, (head)); pos = pos->prev)
635
636 /**
637 * list_for_each_safe - iterate over a list safe against removal of list entry
638 * @pos: the &struct list_head to use as a loop cursor.
639 * @n: another &struct list_head to use as temporary storage
640 * @head: the head for your list.
641 */
642 #define list_for_each_safe(pos, n, head) \
643 for (pos = (head)->next, n = pos->next; \
644 !list_is_head(pos, (head)); \
645 pos = n, n = pos->next)
646
647 /**
648 * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
649 * @pos: the &struct list_head to use as a loop cursor.
650 * @n: another &struct list_head to use as temporary storage
651 * @head: the head for your list.
652 */
653 #define list_for_each_prev_safe(pos, n, head) \
654 for (pos = (head)->prev, n = pos->prev; \
655 !list_is_head(pos, (head)); \
656 pos = n, n = pos->prev)
657
658 /**
659 * list_count - count nodes in the list
660 * @head: the head for your list.
661 */
662 size_t list_count(struct list_head *head)
> 663 {
664 struct list_head *pos;
665 size_t count = 0;
666
667 list_for_each(pos, head)
668 count++;
669
670 return count;
671 }
672
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (42327 bytes)
Powered by blists - more mailing lists