From: Mark McLoughlin <markmc@redhat.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'Avi Kivity'" <avi@redhat.com>,
"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/4] kvm: change a loglevel in kvm_vm_ioctl_deassign_device
Date: Wed, 11 Feb 2009 18:59:07 +0000 [thread overview]
Message-ID: <1234378747.14052.224.camel@blaa> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C01959AF400@pdsmsx503.ccr.corp.intel.com>
On Tue, 2009-02-10 at 20:40 +0800, Han, Weidong wrote:
> change from KERN_INFO to KERN_WARNING to prompt users when
> deassign an unassigned device
>
> Signed-off-by: Weidong Han <weidong.han@intel.com>
> ---
> virt/kvm/kvm_main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index ef52622..03f9807 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -568,7 +568,7 @@ static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
> match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
> assigned_dev->assigned_dev_id);
> if (!match) {
> - printk(KERN_INFO "%s: device hasn't been assigned before, "
> + printk(KERN_WARNING "%s: device hasn't been assigned before, "
> "so cannot be deassigned\n", __func__);
Personally, I'd drop the printk() - the calling program has passed an
invalid device ID and we've returned -EINVAL, I think we should be
silent in such cases and let the app do the error handling.
Cheers,
Mark.
next prev parent reply other threads:[~2009-02-11 18:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 12:40 [PATCH 2/4] kvm: change a loglevel in kvm_vm_ioctl_deassign_device Han, Weidong
2009-02-11 18:59 ` Mark McLoughlin [this message]
2009-02-13 2:24 ` Han, Weidong
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=1234378747.14052.224.camel@blaa \
--to=markmc@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=weidong.han@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox