* [PATCH v2] hsi: controllers: Remove error checking for debugfs_create_dir()
@ 2023-07-26 12:30 Wang Ming
2023-07-31 21:01 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Wang Ming @ 2023-07-26 12:30 UTC (permalink / raw)
To: Sebastian Reichel, Wang Ming, Stephen Rothwell, linux-kernel
Cc: opensource.kernel
It is expected that most callers should _ignore_ the errors
return by debugfs_create_dir() in bond_debug_reregister().
Signed-off-by: Wang Ming <machel@vivo.com>
---
drivers/hsi/controllers/omap_ssi_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
index 84ba8b875..57c63053f 100644
--- a/drivers/hsi/controllers/omap_ssi_core.c
+++ b/drivers/hsi/controllers/omap_ssi_core.c
@@ -115,8 +115,6 @@ static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
/* SSI controller */
omap_ssi->dir = debugfs_create_dir(dev_name(&ssi->device), NULL);
- if (!omap_ssi->dir)
- return -ENOMEM;
debugfs_create_file("regs", S_IRUGO, omap_ssi->dir, ssi,
&ssi_regs_fops);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] hsi: controllers: Remove error checking for debugfs_create_dir()
2023-07-26 12:30 [PATCH v2] hsi: controllers: Remove error checking for debugfs_create_dir() Wang Ming
@ 2023-07-31 21:01 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2023-07-31 21:01 UTC (permalink / raw)
To: Wang Ming; +Cc: Stephen Rothwell, linux-kernel, opensource.kernel
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
Hi,
On Wed, Jul 26, 2023 at 08:30:46PM +0800, Wang Ming wrote:
> It is expected that most callers should _ignore_ the errors
> return by debugfs_create_dir() in bond_debug_reregister().
bond_debug_reregister()?
> Signed-off-by: Wang Ming <machel@vivo.com>
> ---
> drivers/hsi/controllers/omap_ssi_core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
> index 84ba8b875..57c63053f 100644
> --- a/drivers/hsi/controllers/omap_ssi_core.c
> +++ b/drivers/hsi/controllers/omap_ssi_core.c
> @@ -115,8 +115,6 @@ static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
function can become void, if errors are ignored.
>
> /* SSI controller */
> omap_ssi->dir = debugfs_create_dir(dev_name(&ssi->device), NULL);
> - if (!omap_ssi->dir)
> - return -ENOMEM;
What about the second debugfs_create_dir() call in the same function?
>
> debugfs_create_file("regs", S_IRUGO, omap_ssi->dir, ssi,
> &ssi_regs_fops);
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-31 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 12:30 [PATCH v2] hsi: controllers: Remove error checking for debugfs_create_dir() Wang Ming
2023-07-31 21:01 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).