public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: no need to check return value of debugfs_create functions
Date: Thu, 7 Nov 2019 11:09:26 +0100	[thread overview]
Message-ID: <20191107110042.13acd6f5@xps13> (raw)
In-Reply-To: <20191107091518.GA1328892@kroah.com>

Hi Greg,

Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote on Thu, 7 Nov
2019 10:15:18 +0100:

> On Thu, Nov 07, 2019 at 10:09:44AM +0100, Miquel Raynal wrote:
> > Hi Greg,
> > 
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote on Thu, 7 Nov
> > 2019 09:51:11 +0100:
> >   
> > > 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.  
> > 
> > I didn't know about this. Is this something new or has it been the rule
> > since the beginning? In the  case, don't we need a Fixes tag here?  
> 
> It's been the way always, but as of a few kernel releases ago, debugfs
> is even more "fault-tolerant" of stuff like this.
> 
> And there's no need for a "Fixes:" as this is just work to clean up the
> debugfs api and usage (I have a lot more work to do after these types of
> changes.)

Ok, thanks for the clarification.

Cheers!
Miquèl

> 
> >   
> > > Cc: David Woodhouse <dwmw2@infradead.org>
> > > Cc: Brian Norris <computersforpeace@gmail.com>
> > > Cc: Marek Vasut <marek.vasut@gmail.com>
> > > Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> > > Cc: Richard Weinberger <richard@nod.at>
> > > Cc: Vignesh Raghavendra <vigneshr@ti.com>
> > > Cc: Artem Bityutskiy <dedekind1@gmail.com>
> > > Cc: linux-mtd@lists.infradead.org
> > > Cc: linux-kernel@vger.kernel.org
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>  
> > 
> > [...]
> >   
> > > +
> > > +	d->dfs_emulate_io_failures = debugfs_create_file("tst_emulate_io_failures",
> > > +							 S_IWUSR, d->dfs_dir,
> > > +							 (void *)ubi_num,
> > > +							 &dfs_fops);
> > > +
> > > +	d->dfs_emulate_power_cut = debugfs_create_file("tst_emulate_power_cut",
> > > +						       S_IWUSR, d->dfs_dir,
> > > +						       (void *)ubi_num,
> > > +						       &dfs_fops);  
> > 
> > Nitpick: I think we miss an empty line here. I can fix it when applying.  
> 
> Ah, oops, sorry about that.
> 
> thanks,
> 
> greg k-h


  reply	other threads:[~2019-11-07 10:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  8:51 [PATCH] mtd: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-11-07  9:09 ` Miquel Raynal
2019-11-07  9:15   ` Greg Kroah-Hartman
2019-11-07 10:09     ` Miquel Raynal [this message]
2019-11-12 14:19 ` Miquel Raynal

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=20191107110042.13acd6f5@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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