mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu OTHACEHE <m.othacehe@gmail.com>
To: johan@kernel.org, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Mathieu OTHACEHE <m.othacehe@gmail.com>
Subject: [PATCH 04/14] USB: serial: iuu_phoenix: remove comparison of bool
Date: Sat, 30 Jan 2016 18:44:37 +0100	[thread overview]
Message-ID: <1454175887-16158-5-git-send-email-m.othacehe@gmail.com> (raw)
In-Reply-To: <1454175887-16158-1-git-send-email-m.othacehe@gmail.com>

This patch fixes the following coccinelle warning:

drivers/usb/serial/iuu_phoenix.c:383:5-9: WARNING: Comparison of bool to 0/1
drivers/usb/serial/iuu_phoenix.c:363:5-9: WARNING: Comparison of bool to 0/1

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
---
 drivers/usb/serial/iuu_phoenix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 5ad4a0f..344b4ee 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -360,7 +360,7 @@ static void iuu_led_activity_on(struct urb *urb)
 	int result;
 	char *buf_ptr = port->write_urb->transfer_buffer;
 	*buf_ptr++ = IUU_SET_LED;
-	if (xmas == 1) {
+	if (xmas) {
 		get_random_bytes(buf_ptr, 6);
 		*(buf_ptr+7) = 1;
 	} else {
@@ -380,7 +380,7 @@ static void iuu_led_activity_off(struct urb *urb)
 	struct usb_serial_port *port = urb->context;
 	int result;
 	char *buf_ptr = port->write_urb->transfer_buffer;
-	if (xmas == 1) {
+	if (xmas) {
 		iuu_rxcmd(urb);
 		return;
 	} else {
-- 
2.6.4

  parent reply	other threads:[~2016-01-30 17:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 17:44 [PATCH 00/14] USB: serial: Fix coccinelle warnings Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 01/14] USB: serial: safe_serial: fix assignment of bool to 0/1 Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 02/14] USB: serial: safe_serial: fix assignment of bool to non 0/1 constant Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 03/14] USB: serial: quatech2: remove comparison to bool Mathieu OTHACEHE
2016-01-30 17:44 ` Mathieu OTHACEHE [this message]
2016-01-30 17:44 ` [PATCH 05/14] USB: serial: mos7840: " Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 06/14] USB: serial: garmin_gps: move constants to right Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 07/14] USB: serial: ftdi_sio: " Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 08/14] USB: serial: keyspan: remove unused semicolon Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 09/14] USB: serial: cyberjack: remove unneeded variable Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 10/14] USB: serial: garmin_gps: " Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 11/14] USB: serial: mos7840: move constants to right Mathieu OTHACEHE
2016-01-31 21:33   ` Bjørn Mork
2016-02-01 11:57     ` Mathieu OTHACEHE
2016-02-01 12:37       ` Bjørn Mork
2016-02-28 12:46         ` Johan Hovold
2016-01-30 17:44 ` [PATCH 12/14] USB: serial: ch341: " Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 13/14] USB: serial: f81232: " Mathieu OTHACEHE
2016-01-30 17:44 ` [PATCH 14/14] USB: serial: kl5kusb105: remove unneeded semicolons Mathieu OTHACEHE
2016-01-31 20:10 ` [PATCH 00/14] USB: serial: Fix coccinelle warnings Johan Hovold

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=1454175887-16158-5-git-send-email-m.othacehe@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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

Powered by JetHome