From: Damien Le Moal <dlemoal@kernel.org>
To: Yang Ruibin <11162571@vivo.com>,
linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v5] pktcdvd:Remove unnecessary debugfs_create_dir() error check in pkt_debugfs_dev_new()
Date: Mon, 26 Aug 2024 13:44:16 +0900 [thread overview]
Message-ID: <0df17bc3-5411-47de-abc1-479be5d9f822@kernel.org> (raw)
In-Reply-To: <20240826042835.1911916-1-11162571@vivo.com>
On 8/26/24 1:28 PM, Yang Ruibin wrote:
> This patch removes the debugfs_create_dir() error checking in
> pkt_debugfs_dev_new(). Because the debugfs_create_dir() is developed
> in a way that the caller can safely handle the errors that
> occur during the creation of DebugFS nodes.
Missing sapce after the prefix in the patch title: "pktcdvd: Remove..."
And the commit message explanation makes no sense. You likely wanted to say
that *debugfs_create_file()* accepts a parent dentry that is an error pointer
and returns an error in such case, right ?
Also, there is no need for phrasing like "This patch removes...". We know it is
a patch, we are looking at it :) So simply be assertive: "Remove ..."
>
> Signed-off-by: Yang Ruibin <11162571@vivo.com>
> ---
> Changes v5:
> -Changed the subject line
> -Fixes information has been deleted
> ---
> drivers/block/pktcdvd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
> index 7cece5884b9c..3edb37a41312 100644
> --- a/drivers/block/pktcdvd.c
> +++ b/drivers/block/pktcdvd.c
> @@ -498,8 +498,6 @@ static void pkt_debugfs_dev_new(struct pktcdvd_device *pd)
> if (!pkt_debugfs_root)
> return;
> pd->dfs_d_root = debugfs_create_dir(pd->disk->disk_name, pkt_debugfs_root);
> - if (!pd->dfs_d_root)
> - return;
>
> pd->dfs_f_info = debugfs_create_file("info", 0444, pd->dfs_d_root,
> pd, &pkt_seq_fops);
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2024-08-26 4:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 4:28 Yang Ruibin
2024-08-26 4:44 ` Damien Le Moal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0df17bc3-5411-47de-abc1-479be5d9f822@kernel.org \
--to=dlemoal@kernel.org \
--cc=11162571@vivo.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®