* [PATCH v4] drivers:block:Cancel debugfs_create_dir() check
@ 2024-08-23 11:22 Yang Ruibin
2024-08-23 13:02 ` Greg Kroah-Hartman
2024-08-23 13:23 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Yang Ruibin @ 2024-08-23 11:22 UTC (permalink / raw)
To: linux-block, Jens Axboe, Greg Kroah-Hartman, linux-kernel
Cc: opensource.kernel, Yang Ruibin
No need to check debugfs_create_dir() return value.
It's safe to pass in errors that debugfs_create_dir() gives you.
Fixes: f40eb99897af ("pktcdvd: remove driver.")
Signed-off-by: Yang Ruibin <11162571@vivo.com>
---
Changes V4:
- Remove the check for the return value of debugfs_create_dir()
---
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);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4] drivers:block:Cancel debugfs_create_dir() check
2024-08-23 11:22 [PATCH v4] drivers:block:Cancel debugfs_create_dir() check Yang Ruibin
@ 2024-08-23 13:02 ` Greg Kroah-Hartman
2024-08-23 13:23 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-08-23 13:02 UTC (permalink / raw)
To: Yang Ruibin; +Cc: linux-block, Jens Axboe, linux-kernel, opensource.kernel
On Fri, Aug 23, 2024 at 07:22:45PM +0800, Yang Ruibin wrote:
> No need to check debugfs_create_dir() return value.
> It's safe to pass in errors that debugfs_create_dir() gives you.
>
> Fixes: f40eb99897af ("pktcdvd: remove driver.")
It's not a "fix", it's just a cleanup. The current code just never
actually triggers so it's not like there is any functional change here
at all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] drivers:block:Cancel debugfs_create_dir() check
2024-08-23 11:22 [PATCH v4] drivers:block:Cancel debugfs_create_dir() check Yang Ruibin
2024-08-23 13:02 ` Greg Kroah-Hartman
@ 2024-08-23 13:23 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-08-23 13:23 UTC (permalink / raw)
To: Yang Ruibin, linux-block, Greg Kroah-Hartman, linux-kernel
Cc: opensource.kernel
On 8/23/24 5:22 AM, Yang Ruibin wrote:
> No need to check debugfs_create_dir() return value.
> It's safe to pass in errors that debugfs_create_dir() gives you.
Subject line is still wrong, as has been mentioned before for your
posting. If in doubt, just run git log on a file and see what the
customary title prefix is for a given file.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-23 13:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 11:22 [PATCH v4] drivers:block:Cancel debugfs_create_dir() check Yang Ruibin
2024-08-23 13:02 ` Greg Kroah-Hartman
2024-08-23 13:23 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox