public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [tglx-devel:timers/posix 56/61] fs/proc/base.c:2504:17: error: member reference type 'struct sigqueue' is not a pointer; did you mean to use '.'?
Date: Tue, 6 Jun 2023 11:26:50 +0800	[thread overview]
Message-ID: <202306061124.o4M9klgi-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/posix
head:   16a20adb1e0ae19ad42041a7d1b5583e4705ca0c
commit: 21477ceed1e544982c3c00a574c125a88f2c69ff [56/61] posix-timers: Embed sigqueue in struct k_itimer
config: riscv-randconfig-r036-20230605 (https://download.01.org/0day-ci/archive/20230606/202306061124.o4M9klgi-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id=21477ceed1e544982c3c00a574c125a88f2c69ff
        git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
        git fetch --no-tags tglx-devel timers/posix
        git checkout 21477ceed1e544982c3c00a574c125a88f2c69ff
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/proc/ kernel/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306061124.o4M9klgi-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/proc/base.c:2464:24: error: incompatible pointer types passing 'struct hlist_head *' to parameter of type 'struct list_head *' [-Werror,-Wincompatible-pointer-types]
    2464 |         return seq_list_start(&tp->task->signal->posix_timers, *pos);
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/seq_file.h:273:59: note: passing argument to parameter 'head' here
     273 | extern struct list_head *seq_list_start(struct list_head *head,
         |                                                           ^
   fs/proc/base.c:2470:26: error: incompatible pointer types passing 'struct hlist_head *' to parameter of type 'struct list_head *' [-Werror,-Wincompatible-pointer-types]
    2470 |         return seq_list_next(v, &tp->task->signal->posix_timers, pos);
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/seq_file.h:277:67: note: passing argument to parameter 'head' here
     277 | extern struct list_head *seq_list_next(void *v, struct list_head *head,
         |                                                                   ^
   fs/proc/base.c:2499:10: error: static assertion failed due to requirement '__builtin_types_compatible_p(struct list_head, struct hlist_node) || __builtin_types_compatible_p(struct list_head, void)': pointer type mismatch in container_of()
    2499 |         timer = list_entry((struct list_head *)v, struct k_itimer, list);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:520:2: note: expanded from macro 'list_entry'
     520 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:20:16: note: expanded from macro 'container_of'
      20 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      21 |                       __same_type(*(ptr), void),                        \
         |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      22 |                       "pointer type mismatch in container_of()");       \
         |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:338:27: note: expanded from macro '__same_type'
     338 | #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)
         |                                                        ^~~~
>> fs/proc/base.c:2504:17: error: member reference type 'struct sigqueue' is not a pointer; did you mean to use '.'?
    2504 |                    timer->sigq->info.si_signo,
         |                    ~~~~~~~~~~~^~
         |                               .
   fs/proc/base.c:2505:17: error: member reference type 'struct sigqueue' is not a pointer; did you mean to use '.'?
    2505 |                    timer->sigq->info.si_value.sival_ptr);
         |                    ~~~~~~~~~~~^~
         |                               .
   5 errors generated.


vim +2504 fs/proc/base.c

48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2487  
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2488  static int show_timer(struct seq_file *m, void *v)
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2489  {
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2490  	struct k_itimer *timer;
57b8015e07a703 Pavel Emelyanov  2013-03-11  2491  	struct timers_private *tp = m->private;
57b8015e07a703 Pavel Emelyanov  2013-03-11  2492  	int notify;
cedbccab8bb104 Alexey Dobriyan  2014-08-08  2493  	static const char * const nstr[] = {
57b8015e07a703 Pavel Emelyanov  2013-03-11  2494  		[SIGEV_SIGNAL] = "signal",
57b8015e07a703 Pavel Emelyanov  2013-03-11  2495  		[SIGEV_NONE] = "none",
57b8015e07a703 Pavel Emelyanov  2013-03-11  2496  		[SIGEV_THREAD] = "thread",
57b8015e07a703 Pavel Emelyanov  2013-03-11  2497  	};
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2498  
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2499  	timer = list_entry((struct list_head *)v, struct k_itimer, list);
57b8015e07a703 Pavel Emelyanov  2013-03-11  2500  	notify = timer->it_sigev_notify;
57b8015e07a703 Pavel Emelyanov  2013-03-11  2501  
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2502  	seq_printf(m, "ID: %d\n", timer->it_id);
ba3edf1f770ebc Linus Torvalds   2017-12-06  2503  	seq_printf(m, "signal: %d/%px\n",
25ce319167b517 Joe Perches      2015-04-15 @2504  		   timer->sigq->info.si_signo,
57b8015e07a703 Pavel Emelyanov  2013-03-11  2505  		   timer->sigq->info.si_value.sival_ptr);
57b8015e07a703 Pavel Emelyanov  2013-03-11  2506  	seq_printf(m, "notify: %s/%s.%d\n",
57b8015e07a703 Pavel Emelyanov  2013-03-11  2507  		   nstr[notify & ~SIGEV_THREAD_ID],
57b8015e07a703 Pavel Emelyanov  2013-03-11  2508  		   (notify & SIGEV_THREAD_ID) ? "tid" : "pid",
57b8015e07a703 Pavel Emelyanov  2013-03-11  2509  		   pid_nr_ns(timer->it_pid, tp->ns));
15ef0298deb392 Pavel Tikhomirov 2013-05-17  2510  	seq_printf(m, "ClockID: %d\n", timer->it_clock);
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2511  
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2512  	return 0;
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2513  }
48f6a7a511ef88 Pavel Emelyanov  2013-03-11  2514  

:::::: The code at line 2504 was first introduced by commit
:::::: 25ce319167b517a913a2ba9fc80da8330dbc3249 proc: remove use of seq_printf return value

:::::: TO: Joe Perches <joe@perches.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

                 reply	other threads:[~2023-06-06  3:27 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=202306061124.o4M9klgi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    /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