All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: mvebu-uart: drop incorrect memset
@ 2017-11-02 11:34 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2017-11-02 11:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Arnd Bergmann, Miquel Raynal, Gregory CLEMENT, Allen Yan,
	linux-serial, linux-kernel

gcc points out that the length passed into memset here is wrong:

drivers/tty/serial/mvebu-uart.c: In function 'mvebu_uart_probe':
arch/x86/include/asm/string_32.h:324:29: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]

Moreover, the structure was allocated with kzalloc a few lines earlier,
so that memset is also unnecessary. Let's drop it to shut up the
compiler warning.

Fixes: 95f787685a22 ("serial: mvebu-uart: dissociate RX and TX interrupts")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/serial/mvebu-uart.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index 16b0a5aa14e2..85eb5c86d177 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -817,7 +817,6 @@ static int mvebu_uart_probe(struct platform_device *pdev)
 	}
 
 	/* Manage interrupts */
-	memset(mvuart->irq, 0, UART_IRQ_COUNT);
 	if (platform_irq_count(pdev) == 1) {
 		/* Old bindings: no name on the single unamed UART0 IRQ */
 		irq = platform_get_irq(pdev, 0);
-- 
2.9.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-02 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 11:34 [PATCH] serial: mvebu-uart: drop incorrect memset Arnd Bergmann

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.