All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [jgunthorpe:iommu_pages 8/20] drivers/iommu/iommu-pages.h:30:47: error: incomplete definition of type 'struct iommu_pages_list'
Date: Thu, 30 Jan 2025 13:50:50 +0800	[thread overview]
Message-ID: <202501301330.2iIypjer-lkp@intel.com> (raw)

tree:   https://github.com/jgunthorpe/linux iommu_pages
head:   b21a333dd68ad1bca44a6a4ff61c91a9d43fba3a
commit: 68f020177fc5b024a95372c15ec6f8f6f192e410 [8/20] iommu/pages: Formalize the freelist API
config: um-defconfig (https://download.01.org/0day-ci/archive/20250130/202501301330.2iIypjer-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/202501301330.2iIypjer-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/202501301330.2iIypjer-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from drivers/iommu/iommu-pages.c:6:
>> drivers/iommu/iommu-pages.h:14:38: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      14 | void iommu_put_pages_list_new(struct iommu_pages_list *list);
         |                                      ^
   drivers/iommu/iommu-pages.h:27:48: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      27 | static inline void iommu_pages_list_add(struct iommu_pages_list *list,
         |                                                ^
>> drivers/iommu/iommu-pages.h:30:47: error: incomplete definition of type 'struct iommu_pages_list'
      30 |         list_add_tail(&virt_to_page(virt)->lru, &list->pages);
         |                                                  ~~~~^
   drivers/iommu/iommu-pages.h:27:48: note: forward declaration of 'struct iommu_pages_list'
      27 | static inline void iommu_pages_list_add(struct iommu_pages_list *list,
         |                                                ^
   drivers/iommu/iommu-pages.h:41:51: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      41 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:44:19: error: incomplete definition of type 'struct iommu_pages_list'
      44 |         list_splice(&from->pages, &to->pages);
         |                      ~~~~^
   drivers/iommu/iommu-pages.h:41:51: note: forward declaration of 'struct iommu_pages_list'
      41 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:44:31: error: incomplete definition of type 'struct iommu_pages_list'
      44 |         list_splice(&from->pages, &to->pages);
         |                                    ~~^
   drivers/iommu/iommu-pages.h:41:51: note: forward declaration of 'struct iommu_pages_list'
      41 | static inline void iommu_pages_list_splice(struct iommu_pages_list *from,
         |                                                   ^
   drivers/iommu/iommu-pages.h:51:50: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      51 | static inline bool iommu_pages_list_empty(struct iommu_pages_list *list)
         |                                                  ^
   drivers/iommu/iommu-pages.h:53:25: error: incomplete definition of type 'struct iommu_pages_list'
      53 |         return list_empty(&list->pages);
         |                            ~~~~^
   drivers/iommu/iommu-pages.h:51:50: note: forward declaration of 'struct iommu_pages_list'
      51 | static inline bool iommu_pages_list_empty(struct iommu_pages_list *list)
         |                                                  ^
>> drivers/iommu/iommu-pages.c:75:38: warning: declaration of 'struct iommu_pages_list' will not be visible outside of this function [-Wvisibility]
      75 | void iommu_put_pages_list_new(struct iommu_pages_list *list)
         |                                      ^
   drivers/iommu/iommu-pages.c:75:6: error: conflicting types for 'iommu_put_pages_list_new'
      75 | void iommu_put_pages_list_new(struct iommu_pages_list *list)
         |      ^
   drivers/iommu/iommu-pages.h:14:6: note: previous declaration is here
      14 | void iommu_put_pages_list_new(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:38: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list_new(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:38: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list_new(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:38: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list_new(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:38: note: forward declaration of 'struct iommu_pages_list'
      75 | void iommu_put_pages_list_new(struct iommu_pages_list *list)
         |                                      ^
   5 warnings and 9 errors generated.


vim +30 drivers/iommu/iommu-pages.h

    11	
    12	void *iommu_alloc_pages_node(int nid, gfp_t gfp, unsigned int order);
    13	void iommu_free_page(void *virt);
  > 14	void iommu_put_pages_list_new(struct iommu_pages_list *list);
    15	void iommu_put_pages_list_old(struct list_head *head);
    16	
    17	#define iommu_put_pages_list(head)                                   \
    18		_Generic(head,                                               \
    19			struct iommu_pages_list *: iommu_put_pages_list_new, \
    20			struct list_head *: iommu_put_pages_list_old)(head)
    21	
    22	/**
    23	 * iommu_pages_list_add - add the page to a iommu_pages_list
    24	 * @list: List to add the page to
    25	 * @virt: Address returned from iommu_alloc_pages_node()
    26	 */
    27	static inline void iommu_pages_list_add(struct iommu_pages_list *list,
    28						void *virt)
    29	{
  > 30		list_add_tail(&virt_to_page(virt)->lru, &list->pages);
    31	}
    32	

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

                 reply	other threads:[~2025-01-30  5:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202501301330.2iIypjer-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jgg@nvidia.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.