From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Cabiddu, Giovanni" <giovanni.cabiddu@intel.com>
Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
lucas.segarra.fernandez@intel.com, damian.muszynski@intel.com,
Li Zetao <lizetao1@huawei.com>,
davem@davemloft.net
Subject: Re: [PATCH] crypto: qat - remove check after debugfs_create_dir()
Date: Sat, 5 Oct 2024 13:32:13 +0800 [thread overview]
Message-ID: <ZwDPXY8RX8DVMx0k@gondor.apana.org.au> (raw)
In-Reply-To: <Zuf9m8HgYbXp3yIJ@gcabiddu-mobl.ger.corp.intel.com>
On Mon, Sep 16, 2024 at 10:42:51AM +0100, Cabiddu, Giovanni wrote:
> The debugfs functions are guaranteed to return a valid error code
> instead of NULL upon failure. Consequently, the driver can directly
> propagate any error returned without additional checks.
>
> Remove the unnecessary `if` statement after debugfs_create_dir(). If
> this function fails, the error code is stored in accel_dev->debugfs_dir
> and utilized in subsequent debugfs calls.
>
> Additionally, since accel_dev->debugfs_dir is assured to be non-NULL,
> remove the superfluous NULL pointer checks within the adf_dbgfs_add()
> and adf_dbgfs_rm().
>
> Fixes: 9260db6640a6 ("crypto: qat - move dbgfs init to separate file")
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---
> drivers/crypto/intel/qat/qat_common/adf_dbgfs.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-10-05 5:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 14:42 [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init() Li Zetao
2024-09-13 10:19 ` Herbert Xu
2024-09-13 14:52 ` Cabiddu, Giovanni
2024-09-14 8:40 ` Herbert Xu
2024-09-14 8:50 ` Greg Kroah-Hartman
2024-09-14 11:40 ` Herbert Xu
2024-09-14 13:58 ` Greg Kroah-Hartman
2024-09-16 9:42 ` [PATCH] crypto: qat - remove check after debugfs_create_dir() Cabiddu, Giovanni
2024-10-05 5:32 ` Herbert Xu [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=ZwDPXY8RX8DVMx0k@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=damian.muszynski@intel.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=lizetao1@huawei.com \
--cc=lucas.segarra.fernandez@intel.com \
--cc=qat-linux@intel.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