public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [linux-stable-rc:linux-5.10.y 499/9671] arch/powerpc/kernel/smp.c:1380:7: error: variable 'ret' set but not used
Date: Wed, 30 Nov 2022 13:12:38 +1100	[thread overview]
Message-ID: <87h6yhb36x.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20221124071317.GA4026779@linux.vnet.ibm.com>

Srikar Dronamraju <srikar@linux.vnet.ibm.com> writes:
> * kernel test robot <lkp@intel.com> [2022-11-24 07:11:15]:
>
>> Hi Srikar,
>> 
>> FYI, the error/warning still remains.
>> 
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
>> head:   38866e257e18dbc209f4c355fe57123b0c2e0e4a
>> commit: e91077cf1780108dc586cedf1d19f65b44fa3870 [499/9671] powerpc/smp: Update cpu_core_map on all PowerPc systems
>> config: powerpc-randconfig-r002-20221121
>> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project af8c49dc1ec44339d915d988ffe0f38da68ca0e7)
>> reproduce (this is a W=1 build):
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         # install powerpc cross compiling tool for clang build
>>         # apt-get install binutils-powerpc-linux-gnu
>>         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e91077cf1780108dc586cedf1d19f65b44fa3870
>>         git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
>>         git fetch --no-tags linux-stable-rc linux-5.10.y
>>         git checkout e91077cf1780108dc586cedf1d19f65b44fa3870
>>         # save the config file
>>         mkdir build_dir && cp config build_dir/.config
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/
>> 
>> If you fix the issue, kindly add following tag where applicable
>> | Reported-by: kernel test robot <lkp@intel.com>
>> 
>
> Thanks for your report.
>
> 1st Commit c47f892d7aa6 ("powerpc/smp: Reintroduce cpu_core_mask") 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=c47f892d7aa6
> in upstream which is Commit bf6476152a0a ("powerpc/smp: Reintroduce
> cpu_core_mask") in stable tree as is.
>
> 2nd Commit c1e53367dab1 ("powerpc/smp: Cache CPU to chip lookup") 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=c1e53367dab1
>
> 3rd Commit c47f892d7aa6 ("powerpc/smp: Reintroduce cpu_core_mask") 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=c47f892d7aa6
> is Commit e91077cf1780("powerpc/smp: Reintroduce cpu_core_mask")  in stable
> tree with some minor modifications.

I think you mean:

b8b928030332 ("powerpc/smp: Update cpu_core_map on all PowerPc systems")

which in stable is:

e91077cf1780 ("powerpc/smp: Update cpu_core_map on all PowerPc systems")

> However when the 3rd commit was picked, it mangled with the changes
> introduced in the 2nd commit. (Since 2nd commit is not present in Stable
> tree). 
>
> Relevant hunk from commit 2 (c1e53367dab1)
> @@ -1492,7 +1506,10 @@ static void add_cpu_to_masks(int cpu)
>         if (has_coregroup_support())
>                 update_coregroup_mask(cpu, &mask);
>  
> -       if (chip_id == -1 || !ret) {
> +       if (chip_id_lookup_table && ret)
> +               chip_id = cpu_to_chip_id(cpu);
> +
> +       if (chip_id == -1) {
>                 cpumask_copy(per_cpu(cpu_core_map, cpu), cpu_cpu_mask(cpu));
>                 goto out;
>         }
>
> Relevant hunks from commit 3 (c47f892d7aa6)
> @@ -1544,11 +1545,6 @@ static void add_cpu_to_masks(int cpu)
>         if (chip_id_lookup_table && ret)
>                 chip_id = cpu_to_chip_id(cpu);
>  
> -       if (chip_id == -1) {
> -               cpumask_copy(per_cpu(cpu_core_map, cpu), cpu_cpu_mask(cpu));
> -               goto out;
> -       }
> -
>         if (shared_caches)
>                 submask_fn = cpu_l2_cache_mask;
>
>
> The way it was applied in Stable tree combining hunks in Commit 2 and Commit 3.
>
> @@ -1399,11 +1400,6 @@ static void add_cpu_to_masks(int cpu)
>  	if (has_coregroup_support())
>  		update_coregroup_mask(cpu, &mask);
>  
> -	if (chip_id == -1 || !ret) {
> -		cpumask_copy(per_cpu(cpu_core_map, cpu), cpu_cpu_mask(cpu));
> -		goto out;
> -	}
> -
>  	if (shared_caches)
>  		submask_fn = cpu_l2_cache_mask;
>  
>
> Because of the above, we end up with this warning.
>
> Please let me know, how do we proceed on the same.

Can you send a fixup patch to the stable maintainers with the above
explanation.

cheers

      reply	other threads:[~2022-11-30  2:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 23:11 [linux-stable-rc:linux-5.10.y 499/9671] arch/powerpc/kernel/smp.c:1380:7: error: variable 'ret' set but not used kernel test robot
2022-11-24  7:13 ` Srikar Dronamraju
2022-11-30  2:12   ` Michael Ellerman [this message]

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=87h6yhb36x.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=gregkh@linuxfoundation.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=srikar@linux.vnet.ibm.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