Thread (1 message) 1 message, 1 author, 2019-08-13

Re: [PATCH 4/6] dma: pxa_dma: no need to check return value of debugfs_create functions

From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: 2019-08-13 21:21:11
Also in: linux-arm-kernel, lkml

Possibly related (same subject, not in this thread)

Greg Kroah-Hartman [off-list ref] writes:
On Sat, Aug 10, 2019 at 09:27:26PM +0200, Robert Jarzmik wrote:
quoted
Greg Kroah-Hartman [off-list ref] writes:

This is not strictly equivalent.
Imagine that the debugfs_create_dir() fails and returns NULL :
How can that happen?
Well in v5.0-rc1 that could happen ... unfortunately that's also the code I
checked ...
quoted
 - in the former case, neither "state", "descriptors" nor "requesters" would be
   created
 - in the new code, "state", "descriptors" nor "requesters" will be created in
   the debugfs root directory
I agree, but debugfs_create_dir() does not return a NULL on an error
since many kernel releases.  Neither can debugfs_create_file() so really
this test is not working at all as-is :)
Ah yes, you're right, I wasn't aware of the debugfs changes ...

But checking a bit further, your original mail is 2 monthes old, and this patch
was already merged in v5.2. I probably fell in a time-space anomaly, as I
received this mail only a couple of days ago.

Have a nice day.

-- 
Robert
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help