From: zhengbin <zhengbin13@huawei.com>
To: <gregkh@linuxfoundation.org>, <jslaby@suse.com>,
<linux-kernel@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH 3/4] tty/serial: atmel: use true,false for bool variable
Date: Tue, 24 Dec 2019 17:38:04 +0800 [thread overview]
Message-ID: <1577180285-24904-4-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1577180285-24904-1-git-send-email-zhengbin13@huawei.com>
Fixes coccicheck warning:
drivers/tty/serial/atmel_serial.c:1062:1-23: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/atmel_serial.c:1261:1-23: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/atmel_serial.c:1688:3-25: WARNING: Assignment of 0/1 to bool variable
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/tty/serial/atmel_serial.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index fa19eb3..181da0c 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1059,7 +1059,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
chan_err:
dev_err(port->dev, "TX channel not available, switch to pio\n");
- atmel_port->use_dma_tx = 0;
+ atmel_port->use_dma_tx = false;
if (atmel_port->chan_tx)
atmel_release_tx_dma(port);
return -EINVAL;
@@ -1258,7 +1258,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
chan_err:
dev_err(port->dev, "RX channel not available, switch to pio\n");
- atmel_port->use_dma_rx = 0;
+ atmel_port->use_dma_rx = false;
if (atmel_port->chan_rx)
atmel_release_rx_dma(port);
return -EINVAL;
@@ -1685,7 +1685,7 @@ static int atmel_prepare_rx_pdc(struct uart_port *port)
DMA_FROM_DEVICE);
kfree(atmel_port->pdc_rx[0].buf);
}
- atmel_port->use_pdc_rx = 0;
+ atmel_port->use_pdc_rx = false;
return -ENOMEM;
}
pdc->dma_addr = dma_map_single(port->dev,
--
2.7.4
next prev parent reply other threads:[~2019-12-24 9:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-24 9:38 [PATCH 0/4] tty: " zhengbin
2019-12-24 9:38 ` [PATCH 1/4] tty: synclink_gt: " zhengbin
2019-12-24 9:38 ` [PATCH 2/4] tty/serial: kgdb_nmi: " zhengbin
2019-12-24 9:38 ` zhengbin [this message]
2019-12-24 9:38 ` [PATCH 4/4] tty/serial: 8250_exar: " zhengbin
2020-01-11 19:47 ` [PATCH 0/4] tty: " Greg KH
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=1577180285-24904-4-git-send-email-zhengbin13@huawei.com \
--to=zhengbin13@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®