All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: oe-kbuild@lists.linux.dev, lkp@intel.com, oe-kbuild-all@lists.linux.dev
Subject: Re: [peterz-queue:x86/core 3/3] arch/x86/kernel/static_call.c:98 __static_call_transform() error: uninitialized symbol 'op'.
Date: Mon, 23 Jan 2023 18:46:56 +0300	[thread overview]
Message-ID: <Y86r8GaOYdvGlPq9@kadam> (raw)
In-Reply-To: <Y86maRy5ILlUBo/9@hirez.programming.kicks-ass.net>

On Mon, Jan 23, 2023 at 04:23:21PM +0100, Peter Zijlstra wrote:
> On Mon, Jan 23, 2023 at 03:02:54PM +0300, Dan Carpenter wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/core
> > head:   700f4c6d925823018a2d09f92de5405065d2ffec
> > commit: 700f4c6d925823018a2d09f92de5405065d2ffec [3/3] x86/static_call: Add support for Jcc tail-calls
> > config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20230121/202301211834.noGVyk06-lkp@intel.com/config)
> > compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <error27@gmail.com>
> > 
> > smatch warnings:
> > arch/x86/kernel/static_call.c:98 __static_call_transform() error: uninitialized symbol 'op'.
> > 
> > vim +/op +98 arch/x86/kernel/static_call.c
> > 
> > c27c753ea6fd12 Thomas Gleixner 2022-07-12   53  static void __ref __static_call_transform(void *insn, enum insn_type type,
> > c27c753ea6fd12 Thomas Gleixner 2022-07-12   54  					  void *func, bool modinit)
> > e6d6c071f22de2 Josh Poimboeuf  2020-08-18   55  {
> > 3f2a8fc4b15de1 Peter Zijlstra  2021-01-18   56  	const void *emulate = NULL;
> > 452cddbff74b6a Peter Zijlstra  2020-08-18   57  	int size = CALL_INSN_SIZE;
> > 452cddbff74b6a Peter Zijlstra  2020-08-18   58  	const void *code;
> > 700f4c6d925823 Peter Zijlstra  2023-01-20   59  	u8 op, buf[6];
> > 700f4c6d925823 Peter Zijlstra  2023-01-20   60  
> > 700f4c6d925823 Peter Zijlstra  2023-01-20   61  	if ((type == JMP || type == RET) && (op = __is_Jcc(insn)))
> > 700f4c6d925823 Peter Zijlstra  2023-01-20   62  		type = JCC;
> > 
> > Smatch is concerned that type can start as "JCC".
> 
> It can't. What's the normal way to shut this kind of warnings up?
> 
> Something like BUG_ON(type==JCC); should squash that value I suppose,
> but it does seems a bit crude.

We could just ignore it.  These are one time only emails.

This code hasn't hit linux-next yet, so I don't have it on my system.
It may be that using the cross function DB silences the warning.

regards,
dan carpenter


  reply	other threads:[~2023-01-23 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 12:02 [peterz-queue:x86/core 3/3] arch/x86/kernel/static_call.c:98 __static_call_transform() error: uninitialized symbol 'op' Dan Carpenter
2023-01-23 15:23 ` Peter Zijlstra
2023-01-23 15:46   ` Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-21 10:21 kernel test robot

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=Y86r8GaOYdvGlPq9@kadam \
    --to=error27@gmail.com \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=peterz@infradead.org \
    /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.