Re: [PATCH] qspinlock: no need to check return value of debugfs_create functions

From: Will Deacon
Date: Wed Jan 23 2019 - 04:10:29 EST


On Tue, Jan 22, 2019 at 04:21:43PM +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.
>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Will Deacon <will.deacon@xxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
> kernel/locking/qspinlock_stat.h | 18 ++++--------------
> 1 file changed, 4 insertions(+), 14 deletions(-)

Curious, but are you planning to make these functions return void after
you've modified all of the callers?

Will