From: Dominique van den Broeck <domdevlin@free.fr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Hurley <peter@hurleysoftware.com>,
Shraddha Barke <shraddha.6596@gmail.com>,
Radek Dostal <rd@radekdostal.com>
Cc: linux-kernel@vger.kernel.org,
Dominique van den Broeck <domdevlin@free.fr>
Subject: [PATCH 2/3] staging: fwserial: (coding style) removing "!= NULL" to comply with checkpatch.pl
Date: Tue, 29 Mar 2016 19:14:21 +0200 [thread overview]
Message-ID: <1459271662-14990-2-git-send-email-domdevlin@free.fr> (raw)
In-Reply-To: <1459271662-14990-1-git-send-email-domdevlin@free.fr>
Removing two "!= NULL" from fwserial.c as suggested by checkpatch.pl.
Note that the associated expression "port->port.console" is a 1-bit-field
that is already assumed as an implicit boolean (that is: without comparison)
Signed-off-by: Dominique van den Broeck <domdevlin@free.fr>
---
drivers/staging/fwserial/fwserial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 66e54e7..4dd5304 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -1701,7 +1701,7 @@ static void fwserial_virt_plug_complete(struct fwtty_peer *peer,
dma_fifo_change_tx_limit(&port->tx_fifo, port->max_payload);
spin_unlock_bh(&peer->port->lock);
- if (port->port.console && port->fwcon_ops->notify != NULL)
+ if (port->port.console && port->fwcon_ops->notify)
(*port->fwcon_ops->notify)(FWCON_NOTIFY_ATTACH, port->con_data);
fwtty_info(&peer->unit, "peer (guid:%016llx) connected on %s\n",
@@ -1808,7 +1808,7 @@ static void fwserial_release_port(struct fwtty_port *port, bool reset)
RCU_INIT_POINTER(port->peer, NULL);
spin_unlock_bh(&port->lock);
- if (port->port.console && port->fwcon_ops->notify != NULL)
+ if (port->port.console && port->fwcon_ops->notify)
(*port->fwcon_ops->notify)(FWCON_NOTIFY_DETACH, port->con_data);
}
--
2.4.3
next prev parent reply other threads:[~2016-03-29 17:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 17:14 [PATCH 1/3] staging: fwserial: (coding style) Turning every "unsigned" into "unsigned int" Dominique van den Broeck
2016-03-29 17:14 ` Dominique van den Broeck [this message]
2016-04-01 16:25 ` [PATCH 2/3] staging: fwserial: (coding style) removing "!= NULL" to comply with checkpatch.pl Peter Hurley
2016-03-29 17:14 ` [PATCH 3/3] staging: fwserial: (coding style) Rewriting a call to a long function Dominique van den Broeck
2016-03-29 17:38 ` Joe Perches
2016-03-29 17:50 ` Dominique van den Broeck
2016-04-01 16:38 ` Peter Hurley
2016-04-01 23:20 ` Dominique van den Broeck
2016-04-01 23:29 ` Peter Hurley
2016-04-01 16:22 ` [PATCH 1/3] staging: fwserial: (coding style) Turning every "unsigned" into "unsigned int" Peter Hurley
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=1459271662-14990-2-git-send-email-domdevlin@free.fr \
--to=domdevlin@free.fr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=rd@radekdostal.com \
--cc=shraddha.6596@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
all inboxes | Powered by JetHome®