From: Johan Hovold <johan@kernel.org>
To: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Cc: elder@kernel.org, johan@kernel.org, gregkh@linuxfoundation.org,
outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging: greybus: Change NULL comparison to Boolean Negation
Date: Tue, 19 Mar 2019 10:31:19 +0100 [thread overview]
Message-ID: <20190319093119.GG6124@localhost> (raw)
In-Reply-To: <20190304174315.30222-1-nishka.dasgupta@yahoo.com>
On Mon, Mar 04, 2019 at 11:13:15PM +0530, Nishka Dasgupta wrote:
> Change NULL comparison to boolean negation. Issue found by Checkpatch.
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> ---
> drivers/staging/greybus/bundle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
> index e97b2b87ba47..376ca53f0d83 100644
> --- a/drivers/staging/greybus/bundle.c
> +++ b/drivers/staging/greybus/bundle.c
> @@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
> {
> struct gb_bundle *bundle = to_gb_bundle(dev);
>
> - if (bundle->state == NULL)
> + if (!(bundle->state))
I noticed Greg already picked this one up, but there's no need for
parenthesis around bundle->state here (cf. state_store()).
> return sprintf(buf, "\n");
>
> return sprintf(buf, "%s\n", bundle->state);
Johan
next prev parent reply other threads:[~2019-03-19 9:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 17:43 [PATCH] staging: greybus: Change NULL comparison to Boolean Negation Nishka Dasgupta
2019-03-19 9:31 ` Johan Hovold [this message]
2019-03-19 18:25 ` NIshka Dasgupta
2019-03-19 19:51 ` [Outreachy kernel] " Julia Lawall
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=20190319093119.GG6124@localhost \
--to=johan@kernel.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=nishka.dasgupta@yahoo.com \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.