From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
Yuanhan Liu <yuanhan.liu@intel.com>,
kernel-janitors@vger.kernel.org,
Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load
Date: Thu, 27 Sep 2012 15:02:03 +0000 [thread overview]
Message-ID: <50646A6B.4040207@de.ibm.com> (raw)
In-Reply-To: <20120920052230.GA5721@redhat.com>
On 20/09/12 07:22, Michael S. Tsirkin wrote:
> On Thu, Sep 20, 2012 at 08:16:08AM +0800, Fengguang Wu wrote:
>> Hi Michael,
>>
>> FYI, there are new compile warnings show up in
>>
>> tree: git://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
>> head: 879238fecc051d95037ae76332916209a7770709
>> commit: 9fc77441e5e1bf80b794cc546d2243ee9f4afb75 [41/42] KVM: make processes waiting on vcpu mutex killable
>> config: s390-defconfig
>>
>> All error/warnings:
>>
>> arch/s390/kvm/interrupt.c: In function 'kvm_s390_handle_wait':
>> arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result [-Wunused-result]
>>
>> vim +428 arch/s390/kvm/interrupt.c
>> 418 add_wait_queue(&vcpu->arch.local_int.wq, &wait);
>> 419 while (list_empty(&vcpu->arch.local_int.list) &&
>> 420 list_empty(&vcpu->arch.local_int.float_int->list) &&
>> 421 (!vcpu->arch.local_int.timer_due) &&
>> 422 !signal_pending(current)) {
>> 423 set_current_state(TASK_INTERRUPTIBLE);
>> 424 spin_unlock_bh(&vcpu->arch.local_int.lock);
>> 425 spin_unlock(&vcpu->arch.local_int.float_int->lock);
>> 426 vcpu_put(vcpu);
>> 427 schedule();
>> > 428 vcpu_load(vcpu);
>> 429 spin_lock(&vcpu->arch.local_int.float_int->lock);
>> 430 spin_lock_bh(&vcpu->arch.local_int.lock);
IIRC schedule will do vcpu put/load anyway via the preempt notifiers. So the right fix
is probably to just remove the vcpu_put/load around that schedule.
Will double check and send a patch.
WARNING: multiple messages have this Message-ID (diff)
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
Yuanhan Liu <yuanhan.liu@intel.com>,
kernel-janitors@vger.kernel.org,
Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result
Date: Thu, 27 Sep 2012 17:02:03 +0200 [thread overview]
Message-ID: <50646A6B.4040207@de.ibm.com> (raw)
In-Reply-To: <20120920052230.GA5721@redhat.com>
On 20/09/12 07:22, Michael S. Tsirkin wrote:
> On Thu, Sep 20, 2012 at 08:16:08AM +0800, Fengguang Wu wrote:
>> Hi Michael,
>>
>> FYI, there are new compile warnings show up in
>>
>> tree: git://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
>> head: 879238fecc051d95037ae76332916209a7770709
>> commit: 9fc77441e5e1bf80b794cc546d2243ee9f4afb75 [41/42] KVM: make processes waiting on vcpu mutex killable
>> config: s390-defconfig
>>
>> All error/warnings:
>>
>> arch/s390/kvm/interrupt.c: In function 'kvm_s390_handle_wait':
>> arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result [-Wunused-result]
>>
>> vim +428 arch/s390/kvm/interrupt.c
>> 418 add_wait_queue(&vcpu->arch.local_int.wq, &wait);
>> 419 while (list_empty(&vcpu->arch.local_int.list) &&
>> 420 list_empty(&vcpu->arch.local_int.float_int->list) &&
>> 421 (!vcpu->arch.local_int.timer_due) &&
>> 422 !signal_pending(current)) {
>> 423 set_current_state(TASK_INTERRUPTIBLE);
>> 424 spin_unlock_bh(&vcpu->arch.local_int.lock);
>> 425 spin_unlock(&vcpu->arch.local_int.float_int->lock);
>> 426 vcpu_put(vcpu);
>> 427 schedule();
>> > 428 vcpu_load(vcpu);
>> 429 spin_lock(&vcpu->arch.local_int.float_int->lock);
>> 430 spin_lock_bh(&vcpu->arch.local_int.lock);
IIRC schedule will do vcpu put/load anyway via the preempt notifiers. So the right fix
is probably to just remove the vcpu_put/load around that schedule.
Will double check and send a patch.
next prev parent reply other threads:[~2012-09-27 15:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 0:16 [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', d Fengguang Wu
2012-09-20 0:16 ` [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result Fengguang Wu
2012-09-20 5:22 ` [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load Michael S. Tsirkin
2012-09-20 5:22 ` [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result Michael S. Tsirkin
2012-09-27 15:02 ` Christian Borntraeger [this message]
2012-09-27 15:02 ` Christian Borntraeger
2012-09-27 15:12 ` [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load Avi Kivity
2012-09-27 15:12 ` [kvm:queue 41/42] arch/s390/kvm/interrupt.c:428:12: warning: ignoring return value of 'vcpu_load', declared with attribute warn_unused_result Avi Kivity
2012-09-27 15:29 ` [PATCH] s390/kvm: Fix vcpu_load handling in interrupt code Christian Borntraeger
2012-09-27 15:29 ` Christian Borntraeger
2012-09-27 16:20 ` Avi Kivity
2012-09-27 16:20 ` Avi Kivity
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=50646A6B.4040207@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=avi@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=yuanhan.liu@intel.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 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.