linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Gonda <pgonda@google.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	LKML <linux-kernel@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	David Rientjes <rientjes@google.com>
Subject: Re: arch/x86/kvm/svm/sev.c:1605:30: warning: parameter 'role' set but not used
Date: Mon, 13 Jun 2022 09:34:15 -0600	[thread overview]
Message-ID: <CAMkAt6oxQqRCMt54ZRsx_TGd2banbwAy4Hq+A6GHokpMsoo-AA@mail.gmail.com> (raw)
In-Reply-To: <202206131853.x4KJwC5Q-lkp@intel.com>

On Mon, Jun 13, 2022 at 5:03 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Peter,
>
> FYI, the error/warning still remains.
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
> commit: 0c2c7c069285374fc8feacddc0498f8ab7627117 KVM: SEV: Mark nested locking of vcpu->lock
> date:   5 weeks ago
> config: x86_64-buildonly-randconfig-r005-20220613 (https://download.01.org/0day-ci/archive/20220613/202206131853.x4KJwC5Q-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d378268ead93c85803c270277f0243737b536ae7)
> 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
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c2c7c069285374fc8feacddc0498f8ab7627117
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 0c2c7c069285374fc8feacddc0498f8ab7627117
>         # 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=x86_64 SHELL=/bin/bash arch/x86/kvm/ drivers/media/platform/qcom/camss/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> arch/x86/kvm/svm/sev.c:1605:30: warning: parameter 'role' set but not used [-Wunused-but-set-parameter]
>                                            enum sev_migration_role role)
>                                                                    ^
>    1 warning generated.
>
>
> vim +/role +1605 arch/x86/kvm/svm/sev.c
>
>   1603
>   1604  static int sev_lock_vcpus_for_migration(struct kvm *kvm,
> > 1605                                          enum sev_migration_role role)
>   1606  {
>   1607          struct kvm_vcpu *vcpu;
>   1608          unsigned long i, j;
>   1609          bool first = true;
>   1610
>   1611          kvm_for_each_vcpu(i, vcpu, kvm) {
>   1612                  if (mutex_lock_killable_nested(&vcpu->mutex, role))
>   1613                          goto out_unlock;
>   1614
>

I am confused about this warning. |role| is used on this line above.
Is this because CONFIG_DEBUG_LOCK_ALLOC the subclass argument is
dropped in the macro?

  reply	other threads:[~2022-06-13 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 11:03 arch/x86/kvm/svm/sev.c:1605:30: warning: parameter 'role' set but not used kernel test robot
2022-06-13 15:34 ` Peter Gonda [this message]
2022-06-13 15:53   ` Sean Christopherson
  -- strict thread matches above, loose matches on Subject: below --
2022-05-10 10:17 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=CAMkAt6oxQqRCMt54ZRsx_TGd2banbwAy4Hq+A6GHokpMsoo-AA@mail.gmail.com \
    --to=pgonda@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=rientjes@google.com \
    --cc=seanjc@google.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 NNTP newsgroup(s).