Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-24 16:27:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-27 14:51:49 +0300
commit3550f8979a7bb2f28940aa26aab77314ec8840bd (patch)
tree880e5c412f330b37254f887f969a0501d4d73e13 /drivers/tty/serial
parentc89511f61c34aa8e52055fc704cee09c8e459dee (diff)
tty: serial: qcom_geni_serial: Clean up an ARRAY_SIZE() vs sizeof()
The ARRAY_SIZE() is the number of elements but we want the number of bytes so sizeof() is more appropriate. Fortunately, it's the same thing here because this is an array of u8 so this doesn't change runtime. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200624132744.GD9972@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/qcom_geni_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 457c0bf8cbf8..1ed3d354e16d 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -718,7 +718,7 @@ static void qcom_geni_serial_handle_tx(struct uart_port *uport, bool done,
u8 buf[sizeof(u32)];
int c;
- memset(buf, 0, ARRAY_SIZE(buf));
+ memset(buf, 0, sizeof(buf));
tx_bytes = min_t(size_t, remaining, port->tx_bytes_pw);
for (c = 0; c < tx_bytes ; c++) {