Message ID | 715D42877B251141A38726ABF5CABF2C01959AF400@pdsmsx503.ccr.corp.intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
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. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark McLoughlin wrote: > 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. > Reasonable. Regards, Weidong > Cheers, > Mark. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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__); r = -EINVAL; goto out;
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(-)