linux-ia64.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tony Luck <tony.luck@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-ia64@vger.kernel.org
Subject: [aegl:resctrl2_v64 2/3] arch/x86/include/asm/resctrl.h:114:45: error: invalid use of undefined type 'struct resctrl_group'
Date: Mon, 3 Jul 2023 12:08:57 +0800	[thread overview]
Message-ID: <202307031209.IWXDQGr5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git resctrl2_v64
head:   afb7cdd4d64023650b5cc6e003b1aa3d2ab80af1
commit: eda3e6a0e3b6c896d9ced0e8488c06cd373abd2e [2/3] resctrl2: Arch x86 modules for most of the legacy control/monitor functions
config: i386-randconfig-i062-20230703 (https://download.01.org/0day-ci/archive/20230703/202307031209.IWXDQGr5-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230703/202307031209.IWXDQGr5-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/202307031209.IWXDQGr5-lkp@intel.com/

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

   In file included from arch/x86/kernel/process_32.c:55:
>> arch/x86/include/asm/resctrl.h:101:36: warning: 'struct resctrl_group' declared inside parameter list will not be visible outside of this definition or declaration
     101 | bool arch_alloc_resctrl_ids(struct resctrl_group *rg);
         |                                    ^~~~~~~~~~~~~
   arch/x86/include/asm/resctrl.h:102:35: warning: 'struct resctrl_group' declared inside parameter list will not be visible outside of this definition or declaration
     102 | void arch_free_resctrl_ids(struct resctrl_group *rg);
         |                                   ^~~~~~~~~~~~~
   arch/x86/include/asm/resctrl.h:112:66: warning: 'struct resctrl_group' declared inside parameter list will not be visible outside of this definition or declaration
     112 | static inline bool is_closid_match(struct task_struct *t, struct resctrl_group *rg)
         |                                                                  ^~~~~~~~~~~~~
   arch/x86/include/asm/resctrl.h: In function 'is_closid_match':
>> arch/x86/include/asm/resctrl.h:114:45: error: invalid use of undefined type 'struct resctrl_group'
     114 |         return (t->resctrl_ids >> 32) == (rg->resctrl_ids >> 32);
         |                                             ^~
   arch/x86/include/asm/resctrl.h: At top level:
   arch/x86/include/asm/resctrl.h:117:75: warning: 'struct resctrl_group' declared inside parameter list will not be visible outside of this definition or declaration
     117 | static inline bool arch_is_resctrl_id_match(struct task_struct *t, struct resctrl_group *rg)
         |                                                                           ^~~~~~~~~~~~~
   arch/x86/include/asm/resctrl.h: In function 'arch_is_resctrl_id_match':
   arch/x86/include/asm/resctrl.h:119:15: error: invalid use of undefined type 'struct resctrl_group'
     119 |         if (rg->type == DIR_MON)
         |               ^~
>> arch/x86/include/asm/resctrl.h:119:25: error: 'DIR_MON' undeclared (first use in this function)
     119 |         if (rg->type == DIR_MON)
         |                         ^~~~~~~
   arch/x86/include/asm/resctrl.h:119:25: note: each undeclared identifier is reported only once for each function it appears in
   arch/x86/include/asm/resctrl.h:120:44: error: invalid use of undefined type 'struct resctrl_group'
     120 |                 return t->resctrl_ids == rg->resctrl_ids;
         |                                            ^~
>> arch/x86/include/asm/resctrl.h:121:35: error: passing argument 2 of 'is_closid_match' from incompatible pointer type [-Werror=incompatible-pointer-types]
     121 |         return is_closid_match(t, rg);
         |                                   ^~
         |                                   |
         |                                   struct resctrl_group *
   arch/x86/include/asm/resctrl.h:112:81: note: expected 'struct resctrl_group *' but argument is of type 'struct resctrl_group *'
     112 | static inline bool is_closid_match(struct task_struct *t, struct resctrl_group *rg)
         |                                                           ~~~~~~~~~~~~~~~~~~~~~~^~
   arch/x86/include/asm/resctrl.h: At top level:
   arch/x86/include/asm/resctrl.h:124:68: warning: 'struct resctrl_group' declared inside parameter list will not be visible outside of this definition or declaration
     124 | static inline bool arch_set_task_ids(struct task_struct *t, struct resctrl_group *rg)
         |                                                                    ^~~~~~~~~~~~~
   arch/x86/include/asm/resctrl.h: In function 'arch_set_task_ids':
   arch/x86/include/asm/resctrl.h:126:15: error: invalid use of undefined type 'struct resctrl_group'
     126 |         if (rg->type == DIR_MON) {
         |               ^~
   arch/x86/include/asm/resctrl.h:126:25: error: 'DIR_MON' undeclared (first use in this function)
     126 |         if (rg->type == DIR_MON) {
         |                         ^~~~~~~
   arch/x86/include/asm/resctrl.h:127:41: error: passing argument 2 of 'is_closid_match' from incompatible pointer type [-Werror=incompatible-pointer-types]
     127 |                 if (!is_closid_match(t, rg)) {
         |                                         ^~
         |                                         |
         |                                         struct resctrl_group *
   arch/x86/include/asm/resctrl.h:112:81: note: expected 'struct resctrl_group *' but argument is of type 'struct resctrl_group *'
     112 | static inline bool is_closid_match(struct task_struct *t, struct resctrl_group *rg)
         |                                                           ~~~~~~~~~~~~~~~~~~~~~~^~
   In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:246,
                    from include/linux/dev_printk.h:14,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/x86/kernel/process_32.c:12:
   arch/x86/include/asm/resctrl.h:133:38: error: invalid use of undefined type 'struct resctrl_group'
     133 |         WRITE_ONCE(t->resctrl_ids, rg->resctrl_ids);
         |                                      ^~
   include/asm-generic/rwonce.h:55:40: note: in definition of macro '__WRITE_ONCE'
      55 |         *(volatile typeof(x) *)&(x) = (val);                            \
         |                                        ^~~
   arch/x86/include/asm/resctrl.h:133:9: note: in expansion of macro 'WRITE_ONCE'
     133 |         WRITE_ONCE(t->resctrl_ids, rg->resctrl_ids);
         |         ^~~~~~~~~~
   cc1: some warnings being treated as errors
--
>> fs/resctrl2/arch/x86/alloc.c:55:6: warning: no previous prototype for 'closid_free' [-Wmissing-prototypes]
      55 | void closid_free(int closid)
         |      ^~~~~~~~~~~
--
   fs/resctrl2/arch/x86/rdt_monitor.c: In function 'rdt_rmid_read':
>> fs/resctrl2/arch/x86/rdt_monitor.c:304:26: warning: variable 'm' set but not used [-Wunused-but-set-variable]
     304 |         struct mydomain *m;
         |                          ^


vim +114 arch/x86/include/asm/resctrl.h

   100	
 > 101	bool arch_alloc_resctrl_ids(struct resctrl_group *rg);
   102	void arch_free_resctrl_ids(struct resctrl_group *rg);
   103	bool arch_init_alloc_ids(struct resctrl_resource *r);
   104	int rmid_alloc(int prmid);
   105	void rmid_free(int rmid);
   106	void arch_add_monitor(int mon_event);
   107	void arch_del_monitor(int mon_event);
   108	u64 rdt_rmid_read(int domain_id, int rmid, int event);
   109	void rdt_mbm_apply_quirk(int num_rmids);
   110	u64 get_corrected_mbm_count(u32 rmid, unsigned long val);
   111	
   112	static inline bool is_closid_match(struct task_struct *t, struct resctrl_group *rg)
   113	{
 > 114		return (t->resctrl_ids >> 32) == (rg->resctrl_ids >> 32);
   115	}
   116	
   117	static inline bool arch_is_resctrl_id_match(struct task_struct *t, struct resctrl_group *rg)
   118	{
 > 119		if (rg->type == DIR_MON)
   120			return t->resctrl_ids == rg->resctrl_ids;
 > 121		return is_closid_match(t, rg);
   122	}
   123	

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

                 reply	other threads:[~2023-07-03  4:09 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=202307031209.IWXDQGr5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tony.luck@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).