Thread (4 messages) 4 messages, 3 authors, 2016-10-12
STALE3545d REVIEWED: 1 (0M)

[patch] serial: stm32: fix a type issue

From: Gerald Baeza <hidden>
Date: 2016-10-12 07:40:05
Also in: kernel-janitors, linux-serial

Hi Dan and thanks for the patch

On 10/12/2016 08:21 AM, Dan Carpenter wrote:
quoted hunk ↗ jump to hunk
We store UNDEF_REG in a u8.  It causes a problem in functions like
stm32_tx_dma_complete() where we check "if (ofs->icr == UNDEF_REG)".

Fixes: 3489187204eb ('serial: stm32: adding dma support')
Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index 41d9749..f9887cc 100644
--- a/drivers/tty/serial/stm32-usart.h
+++ b/drivers/tty/serial/stm32-usart.h
@@ -31,7 +31,7 @@ struct stm32_usart_info {
 	struct stm32_usart_config cfg;
 };

-#define UNDEF_REG ~0
+#define UNDEF_REG 0xFF

 /* Register offsets */
 struct stm32_usart_info stm32f4_info = {
Reviewed-by: Gerald Baeza <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help