From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Wang Ming <machel@vivo.com>, Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Wang Ming <machel@vivo.com>
Subject: Re: [PATCH net-next v3] wifi: ath9k: Remove error checking for debugfs_create_dir()
Date: Tue, 08 Aug 2023 15:28:57 +0200 [thread overview]
Message-ID: <87sf8tbr3a.fsf@toke.dk> (raw)
In-Reply-To: <20230726110750.3925-1-machel@vivo.com>
Wang Ming <machel@vivo.com> writes:
> It is expected that most callers should _ignore_ the errors
> return by debugfs_create_dir() in ath9k_htc_init_debug().
>
> Signed-off-by: Wang Ming <machel@vivo.com>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> index b3ed65e5c4da..85ad45771b44 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> @@ -491,8 +491,6 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
>
> priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
> priv->hw->wiphy->debugfsdir);
> - if (!priv->debug.debugfs_phy)
> - return -ENOMEM;
Hmm, so it's true that all the debugfs_create* functions deal correctly
with the dir pointer being an error pointer, which means that it's
possible to just ignore the return value of debugfs_create_dir() without
anything breaking. However, it also seems kinda pointless to have all
those calls if we know they're going to fail, so I prefer v1 of this
patch that just fixed the IS_ERR check. No need to resend, we can just
apply v1 instead...
-Toke
next prev parent reply other threads:[~2023-08-08 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 11:07 [PATCH net-next v3] wifi: ath9k: Remove error checking for debugfs_create_dir() Wang Ming
2023-07-27 15:55 ` Kalle Valo
2023-08-08 13:28 ` Toke Høiland-Jørgensen [this message]
2023-08-21 12:39 ` Kalle Valo
2023-08-21 13:55 ` Toke Høiland-Jørgensen
2023-08-22 5:44 ` Kalle Valo
2023-08-22 8:01 ` Toke Høiland-Jørgensen
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=87sf8tbr3a.fsf@toke.dk \
--to=toke@toke.dk \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=machel@vivo.com \
--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;
as well as URLs for NNTP newsgroup(s).