public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel test robot <lkp@intel.com>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>, <x86@kernel.org>
Subject: Re: arch/x86/include/asm/processor.h:698:16: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Sat, 2 Mar 2024 17:43:38 +0800	[thread overview]
Message-ID: <ZeL0yknB10isSkQF@rli9-mobl> (raw)
In-Reply-To: <87a5nhwpus.ffs@tglx>

On Fri, Mar 01, 2024 at 11:26:35PM +0100, Thomas Gleixner wrote:
> On Fri, Mar 01 2024 at 22:57, Thomas Gleixner wrote:
> 
> > On Sat, Mar 02 2024 at 04:12, kernel test robot wrote:
> >> FYI, the error/warning was bisected to this commit, please ignore it
> >> if it's irrelevant.
> >
> > I have no idea to which previous thread you are replying to because your
> > mail lacks any references.
> >
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >> head:   87adedeba51a822533649b143232418b9e26d08b
> >> commit: 6e29032340b60f7aa7475c8234b17273e4424007 x86/cpu: Move cpu_l[l2]c_id into topology info
> >> date:   5 months ago
> >> config: i386-randconfig-062-20240301 (https://download.01.org/0day-ci/archive/20240302/202403020457.RCJoQ3ts-lkp@intel.com/config)
> >> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> >> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240302/202403020457.RCJoQ3ts-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/202403020457.RCJoQ3ts-lkp@intel.com/
> >>
> >> sparse warnings: (new ones prefixed by >>)
> >>
> >> vim +698 arch/x86/include/asm/processor.h
> >>
> >>    695	
> >>    696	static inline u16 per_cpu_llc_id(unsigned int cpu)
> >>    697	{
> >>  > 698		return per_cpu(cpu_info.topo.llc_id, cpu);
> >>    699	}
> >>    700	
> >
> > This is bogus and I looked at another related bogosity today:
> >
> >   https://lore.kernel.org/all/202403010704.oGQZPu0P-lkp@intel.com
> >
> > which has similar complaints.

Really sorry about this Thomas, the empty sparse warning in the report is a regression
caused by latest bot change. The impacted sparse warning pattern is "incorrect type".

We will fix this ASAP, and reply to each bad report to paste the raw warnings. Sorry
for the trouble and time waste.

> >
> > So I went and downloaded the config and followed the reproduction
> > instructions except for one detail.
> >
> > The only difference is the sparse version:
> >
> >     1) I had the regular debian variant installed.
> >
> >        Version:  0.6.4 (Debian: 0.6.4-3)
> >
> >     2) I updated my sparse clone and rebuilt
> >
> >        Version:  v0.6.4-66-g0196afe16a50
> >
> > Neither one of them exposed the problem, but you are using:
> >
> >        sparse version: v0.6.4-66-g0196afe1-dirty
> >
> > which is obviously based on the latest upstream tree, but seems to have
> > some extra muck on top which I don't know what it is.

The extra change is mainly to make "incorrect type" kind warning more bisect
friendly to join multiple lines together to output, and the change effect is like

Turn raw output

        net/ipv4/tcp_cong.c:300:24: sparse: warning: incorrect type in initializer (different address spaces)
        net/ipv4/tcp_cong.c:300:24: sparse:    expected struct tcp_congestion_ops const [noderef] __rcu *__new
        net/ipv4/tcp_cong.c:300:24: sparse:    got struct tcp_congestion_ops *[assigned] ca

To below format

        net/ipv4/tcp_cong.c:300:24: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct tcp_congestion_ops const [noderef] __rcu *__new @@     got struct
tcp_congestion_ops *[assigned] ca @@
        net/ipv4/tcp_cong.c:300:24: sparse:     expected struct tcp_congestion_ops const [noderef] __rcu *__new
        net/ipv4/tcp_cong.c:300:24: sparse:     got struct tcp_congestion_ops *[assigned] ca

Sorry for the confusion here for -dirty version.

> >
> > Does this reproduce with an unpatched upstream sparse for you?
> >
> > If so then I'm really curious why it does not reproduce here.
> 
> Sorry, my fault. I can reproduce now but it still does not make any
> sense. The code is correct...
> 
> Let me put something together which the sparse folks can digest.
> 
> Thanks,
> 
>         tglx
> 

  reply	other threads:[~2024-03-02  9:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 20:12 arch/x86/include/asm/processor.h:698:16: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
2024-03-01 21:57 ` Thomas Gleixner
2024-03-01 22:26   ` Thomas Gleixner
2024-03-02  9:43     ` Philip Li [this message]
2024-03-02 11:37     ` Thomas Gleixner
2024-03-02 15:44       ` Thomas Gleixner
2024-03-02 22:00         ` Thomas Gleixner
2024-03-02 22:49           ` Linus Torvalds
2024-03-03 16:31             ` Thomas Gleixner
2024-03-03 19:03               ` Uros Bizjak
2024-03-03 20:10                 ` Thomas Gleixner
2024-03-03 20:21                   ` Uros Bizjak
2024-03-03 20:24                     ` Uros Bizjak
2024-03-03 21:19                       ` Uros Bizjak
2024-03-03 23:49                       ` Thomas Gleixner
2024-03-04  5:42                         ` Uros Bizjak
2024-03-04  7:07                           ` Thomas Gleixner
2024-04-02 11:43                             ` Uros Bizjak
2024-04-03 17:57                               ` Nathan Chancellor
2024-04-04  6:56                                 ` Uros Bizjak
2024-04-29 21:30                         ` [RFC PATCH] Use x86 named address spaces to catch "sparse: incorrect type in initializer (different address spaces)" __percpu errors Uros Bizjak
2024-03-02 12:53 ` arch/x86/include/asm/processor.h:698:16: sparse: sparse: incorrect type in initializer (different address spaces) Yujie Liu
  -- strict thread matches above, loose matches on Subject: below --
2024-01-09 20:00 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=ZeL0yknB10isSkQF@rli9-mobl \
    --to=philip.li@intel.com \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox