From: Simon Horman <simon.horman@corigine.com>
To: Yingsha Xu <ysxu@hust.edu.cn>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mac80211: remove return value check of debugfs_create_dir()
Date: Thu, 20 Apr 2023 16:55:39 +0200 [thread overview]
Message-ID: <ZEFSa0jzZa6QMAsw@corigine.com> (raw)
In-Reply-To: <20230419104548.30124-1-ysxu@hust.edu.cn>
On Wed, Apr 19, 2023 at 06:45:47PM +0800, Yingsha Xu wrote:
> Smatch complains that:
> debugfs_hw_add() warn: 'statsd' is an error pointer or valid
>
> Debugfs checks are generally not supposed to be checked for errors
> and it is not necessary here.
>
> Just delete the dead code.
Perhaps:
As per it's documentation, it's expected that most callers
should ignore errors returned by debugfs_create_dir().
So just delete the unnecessary check.
> Signed-off-by: Yingsha Xu <ysxu@hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
In any case, the change looks good to me.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
prev parent reply other threads:[~2023-04-20 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 10:45 [PATCH] mac80211: remove return value check of debugfs_create_dir() Yingsha Xu
2023-04-20 14:55 ` Simon Horman [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=ZEFSa0jzZa6QMAsw@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ysxu@hust.edu.cn \
/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).