Open selltc opened 7 years ago
I was a little perplexed to find out that 95% of the debugfs_create_dir() and debugfs_create_file() calls in the kernel are doing the exact same error-checking I am. So I need to do some more homework to actually convince myself that what Greg says is even true.
DAG... I was accidentally logged in as Mike again. Above comment was mine.
Tim/MikeD :)
I would trust what Greg says even if 95% do it differently. He wrote it ;)
David
Can you make sure you have a Suggested-by: or Reported-by: with Greg's name on it for this patch?
KanBoard-27433
Greg's comment on 11/7 indicated: Minor review comments, you can fix these up in future patches.
The comments were in response to a patch David submitted on 11/3, which has since been committed to Greg's tree in commit 8217becc1b416e348d1bc8fcb54c09967e0f4987:
Greg's comments below.
No need to keep the dentry for the bus info, right?
Yup, removing the directory will remove the file, so no need to keep it around.
There's never any need to check the return value of a debugfs call, unless you really want to for some really odd reason. It shouldn't keep your main logic from doing anything different, as you should not be relying on it in any way.
So just drop the check here.
Same here. Also, no need to keep the dentry at all.
And here, no need to check.