Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [jgunthorpe:iommu_pages 12/20] drivers/iommu/iommu-pages.c:75:6: error: conflicting types for 'iommu_put_pages_list'
@ 2025-01-30  7:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-30  7:06 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/jgunthorpe/linux iommu_pages
head:   b21a333dd68ad1bca44a6a4ff61c91a9d43fba3a
commit: 828ed1aedcab6ea687a2a6c81e5fb2b6f01328da [12/20] iommu/pages: Remove iommu_put_pages_list_old and the _Generic
config: um-defconfig (https://download.01.org/0day-ci/archive/20250130/202501301544.LclxCLKY-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250130/202501301544.LclxCLKY-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/202501301544.LclxCLKY-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/iommu/iommu-pages.c:6:
   drivers/iommu/iommu-pages.h:14:34: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      14 | void iommu_put_pages_list(struct iommu_pages_list *list);
         |                                  ^
   drivers/iommu/iommu-pages.h:21:48: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      21 | static inline void iommu_pages_list_add(struct iommu_pages_list *list,
         |                                                ^
   drivers/iommu/iommu-pages.h:24:47: error: incomplete definition of type 'struct iommu_pages_list'
      24 |         list_add_tail(&virt_to_page(virt)->lru, &list->pages);
         |                                                  ~~~~^
   drivers/iommu/iommu-pages.h:21:48: note: forward declaration of 'struct iommu_pages_list'
      21 | static inline void iommu_pages_list_add(struct iommu_pages_list *list,
         |                                                ^
   drivers/iommu/iommu-pages.h:35:51: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      35 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:38:19: error: incomplete definition of type 'struct iommu_pages_list'
      38 |         list_splice(&from->pages, &to->pages);
         |                      ~~~~^
   drivers/iommu/iommu-pages.h:35:51: note: forward declaration of 'struct iommu_pages_list'
      35 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:38:31: error: incomplete definition of type 'struct iommu_pages_list'
      38 |         list_splice(&from->pages, &to->pages);
         |                                    ~~^
   drivers/iommu/iommu-pages.h:35:51: note: forward declaration of 'struct iommu_pages_list'
      35 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:45:50: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      45 | static inline bool iommu_pages_list_empty(struct iommu_pages_list *list)
         |                                                  ^
   drivers/iommu/iommu-pages.h:47:25: error: incomplete definition of type 'struct iommu_pages_list'
      47 |         return list_empty(&list->pages);
         |                            ~~~~^
   drivers/iommu/iommu-pages.h:45:50: note: forward declaration of 'struct iommu_pages_list'
      45 | static inline bool iommu_pages_list_empty(struct iommu_pages_list *list)
         |                                                  ^
   drivers/iommu/iommu-pages.c:75:34: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |                                  ^
>> drivers/iommu/iommu-pages.c:75:6: error: conflicting types for 'iommu_put_pages_list'
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |      ^
   drivers/iommu/iommu-pages.h:14:6: note: previous declaration is here
      14 | void iommu_put_pages_list(struct iommu_pages_list *list);
         |      ^
   drivers/iommu/iommu-pages.c:79:40: error: incomplete definition of type 'struct iommu_pages_list'
      79 |         list_for_each_entry_safe(p, tmp, &list->pages, lru)
         |                                           ~~~~^
   include/linux/list.h:857:30: note: expanded from macro 'list_for_each_entry_safe'
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |                                     ^~~~
   include/linux/list.h:612:14: note: expanded from macro 'list_first_entry'
     612 |         list_entry((ptr)->next, type, member)
         |                     ^~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^~~
   include/linux/container_of.h:19:26: note: expanded from macro 'container_of'
      19 |         void *__mptr = (void *)(ptr);                                   \
         |                                 ^~~
   drivers/iommu/iommu-pages.c:75:34: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |                                  ^
   drivers/iommu/iommu-pages.c:79:40: error: incomplete definition of type 'struct iommu_pages_list'
      79 |         list_for_each_entry_safe(p, tmp, &list->pages, lru)
         |                                           ~~~~^
   include/linux/list.h:857:30: note: expanded from macro 'list_for_each_entry_safe'
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |                                     ^~~~
   include/linux/list.h:612:14: note: expanded from macro 'list_first_entry'
     612 |         list_entry((ptr)->next, type, member)
         |                     ^~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:483:63: note: expanded from macro '__same_type'
     483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   drivers/iommu/iommu-pages.c:75:34: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |                                  ^
   drivers/iommu/iommu-pages.c:79:40: error: incomplete definition of type 'struct iommu_pages_list'
      79 |         list_for_each_entry_safe(p, tmp, &list->pages, lru)
         |                                           ~~~~^
   include/linux/list.h:857:30: note: expanded from macro 'list_for_each_entry_safe'
     857 |         for (pos = list_first_entry(head, typeof(*pos), member),        \
         |                                     ^~~~
   include/linux/list.h:612:14: note: expanded from macro 'list_first_entry'
     612 |         list_entry((ptr)->next, type, member)
         |                     ^~~
   include/linux/list.h:601:15: note: expanded from macro 'list_entry'
     601 |         container_of(ptr, type, member)
         |                      ^~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:483:63: note: expanded from macro '__same_type'
     483 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                                                               ^
   include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                                  ^~~~
   include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   drivers/iommu/iommu-pages.c:75:34: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |                                  ^
   drivers/iommu/iommu-pages.c:79:40: error: incomplete definition of type 'struct iommu_pages_list'
      79 |         list_for_each_entry_safe(p, tmp, &list->pages, lru)
         |                                           ~~~~^
   include/linux/list.h:859:32: note: expanded from macro 'list_for_each_entry_safe'
     859 |              !list_entry_is_head(pos, head, member);                    \
         |                                       ^~~~
   include/linux/list.h:761:30: note: expanded from macro 'list_entry_is_head'
     761 |         list_is_head(&pos->member, (head))
         |                                     ^~~~
   drivers/iommu/iommu-pages.c:75:34: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list(struct iommu_pages_list *list)
         |                                  ^
   5 warnings and 9 errors generated.


vim +/iommu_put_pages_list +75 drivers/iommu/iommu-pages.c

    68	
    69	/**
    70	 * iommu_put_pages_list - free a list of pages.
    71	 * @list: The list of pages to be freed
    72	 *
    73	 * Frees a list of pages allocated by iommu_alloc_pages_node().
    74	 */
  > 75	void iommu_put_pages_list(struct iommu_pages_list *list)

-- 
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-01-30  7:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30  7:06 [jgunthorpe:iommu_pages 12/20] drivers/iommu/iommu-pages.c:75:6: error: conflicting types for 'iommu_put_pages_list' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox