From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-kernel@vger.kernel.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: no need to check return value of debugfs_create functions
Date: Tue, 22 Jan 2019 19:40:15 +0100 [thread overview]
Message-ID: <20190122184015.GC31777@kroah.com> (raw)
In-Reply-To: <20190122172907.GF28513@linux.intel.com>
On Tue, Jan 22, 2019 at 09:29:07AM -0800, Sean Christopherson wrote:
> On Tue, Jan 22, 2019 at 09:21:02AM -0800, Sean Christopherson wrote:
> > On Tue, Jan 22, 2019 at 04:21:50PM +0100, Greg Kroah-Hartman wrote:
> > > When calling debugfs functions, there is no need to ever check the
> > > return value. The function can work or not, but the code logic should
> > > never do something different based on this.
> >
> > What about wanting to make the debugfs all-or-nothing? That seems like
> > a legitimate usage of checking the return value.
> >
> > E.g. KVM removes the debugfs if kvm_arch_create_vcpu_debugfs() fails, and
> > the arch/x86/kvm/debugfs.c implementation of kvm_arch_create_vcpu_debugfs()
> > returns an error if any of its debugfs_create_file() calls fail.
> >
> > If you're adamant about removing all debugfs create return value checks,
> > the aforementioned debugfs_create_file() calls should also be removed.
> > And at that point kvm_create_vcpu_debugfs() should have a 'void' return
> > value.
>
> Belatedly saw the other series. It'll require a bit more coordination,
> but folding this into the x86 series would allow for converting the KVM
> call stack to have 'void' returns.
Oh, nice, want me to tack this onto the end of there, or just do some
follow-on patches after this gets merged?
thanks,
greg k-h
next prev parent reply other threads:[~2019-01-22 18:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 15:21 [PATCH] kvm: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-01-22 17:21 ` Sean Christopherson
2019-01-22 17:29 ` Sean Christopherson
2019-01-22 18:40 ` Greg Kroah-Hartman [this message]
2019-01-22 20:39 ` Christian Borntraeger
2019-01-22 20:48 ` Greg Kroah-Hartman
2019-01-22 23:11 ` Paolo Bonzini
2019-01-23 8:28 ` Christian Borntraeger
-- strict thread matches above, loose matches on Subject: below --
2018-05-29 16:22 Greg Kroah-Hartman
2018-05-29 16:22 ` Greg Kroah-Hartman
2018-05-29 16:22 ` Greg Kroah-Hartman
2018-05-29 17:06 ` Paolo Bonzini
2018-05-29 17:06 ` Paolo Bonzini
2018-05-29 17:06 ` Paolo Bonzini
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=20190122184015.GC31777@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@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.