From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Tom Mounet <tommounet@gmail.com>, Marc Dietrich <marvin24@gmx.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
ac100@lists.launchpad.net, linux-tegra@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
outreachy@lists.linux.dev
Subject: Re: [PATCH v3] staging: nvec: Use x instead of x != NULL to improve readability.
Date: Mon, 1 Jul 2024 21:31:15 +0200 [thread overview]
Message-ID: <cbd7ead7-bfe9-40d1-ae9d-053388384356@gmail.com> (raw)
In-Reply-To: <66804898.5d0a0220.6df0f.4f0a@mx.google.com>
On 6/29/24 19:47, Tom Mounet wrote:
> Use x instead of x != NULL to improve readability.
> Issue identified by checkpatch.
>
> Signed-off-by: Tom Mounet <tommounet@gmail.com>
> ---
> v3: Add change history and proper description
> v2: Make commit title clearer
>
> drivers/staging/nvec/nvec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index e5ca78e57..814eb121c 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -300,7 +300,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
> {
> mutex_lock(&nvec->sync_write_mutex);
>
> - if (msg != NULL)
> + if (msg)
> *msg = NULL;
>
> nvec->sync_write_pending = (data[1] << 8) + data[0];
> @@ -322,7 +322,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
>
> dev_dbg(nvec->dev, "nvec_sync_write: pong!\n");
>
> - if (msg != NULL)
> + if (msg)
> *msg = nvec->last_sync_msg;
> else
> nvec_msg_free(nvec, nvec->last_sync_msg);
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
prev parent reply other threads:[~2024-07-01 19:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 17:47 [PATCH v3] staging: nvec: Use x instead of x != NULL to improve readability Tom Mounet
2024-07-01 19:31 ` Philipp Hortmann [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=cbd7ead7-bfe9-40d1-ae9d-053388384356@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=ac100@lists.launchpad.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=marvin24@gmx.de \
--cc=outreachy@lists.linux.dev \
--cc=tommounet@gmail.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