[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK6rUAPUKNREyYL-d5Y23SOV__-zPY8KJL+MMzWX8ShOhDGWLA@mail.gmail.com>
Date: Tue, 30 May 2023 16:02:27 +0500
From: Osama Muhammad <osmtendev@...il.com>
To: Kalle Valo <kvalo@...nel.org>
Cc: nbd@....name, ryder.lee@...iatek.com, lorenzo@...nel.org,
shayne.chen@...iatek.com, davem@...emloft.net,
linux-wireless@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] debugfs.c: Fix error checking for debugfs_create_dir
Hi,
I will keep that in mind and send with the right subject while
submitting a revision of the patch.
Regarding the patch after researching more into it I have come to know
that the debugfs
API will not return null on error but an ERR_PTR. The modern wisdom
about it is to ignore the errors returned by the function as stated in
the comment above the function debugfs_create_file.
> * NOTE: it's expected that most callers should _ignore_ the errors returned
>* by this function. Other debugfs functions handle the fact that the "dentry"
>* passed to them could be an error and they don't crash in that case.
> * Drivers should generally work fine even if debugfs fails to init anyway.
Here is the link to comment :-
https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L451
Considering this, I will send the revision of the patch by removing
error checks. Please correct me if there are any concerns with this.
Thanks,
Osmten
On Tue, 30 May 2023 at 15:29, Kalle Valo <kvalo@...nel.org> wrote:
>
> Osama Muhammad <osmtendev@...il.com> writes:
>
> > This patch fixes the error checking in debugfs.c in
> > debugfs_create_dir. The correct way to check if an error occurred
> > is using 'IS_ERR' inline function.
> >
> > Signed-off-by: Osama Muhammad <osmtendev@...il.com>
>
> The title is wrong, please see the wiki page below how to create titles.
>
> Also no need to say "This patch fixes..", saying "Fix..." is enough.
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists