[PATCH] omapdrm: no need to check return value of debugfs_create functions
gregkh at linuxfoundation.org
Fri Aug 9 07:47:33 UTC 2019
On Fri, Aug 09, 2019 at 09:59:56AM +0300, Tomi Valkeinen wrote:
> On 08/08/2019 15:50, Laurent Pinchart wrote:
> > Hi Greg,
> > Thank you for the patch.
> > On Thu, Jun 13, 2019 at 01:57:49PM +0200, 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.
> > >
> > > Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> > > Cc: David Airlie <airlied at linux.ie>
> > > Cc: Daniel Vetter <daniel at ffwll.ch>
> > > Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > > Cc: Sebastian Reichel <sebastian.reichel at collabora.com>
> > > Cc: Jyri Sarha <jsarha at ti.com>
> > > Cc: Tony Lindgren <tony at atomide.com>
> > > Cc: zhong jiang <zhongjiang at huawei.com>
> > > Cc: dri-devel at lists.freedesktop.org
> > > Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> > This makes sense.
> > Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > Tomi, will you take this patch in your tree ?
> Yes, I'll pick this up. I presume debugfs_create_file() will give a warning
> print if it fails to create the file, instead of being silent.
Yes it does, please see 43e23b6c0b01 ("debugfs: log errors when
something goes wrong") and c33d442328f5 ("debugfs: make error message a
bit more verbose") for the details if you are curious.
Those warnings have already found at least one user of debugfs that was
doing things wrong and no one had noticed before.
More information about the dri-devel