From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] serial: stm32: fix a type issue
Date: Wed, 12 Oct 2016 06:21:03 +0000 [thread overview]
Message-ID: <20161012062103.GS12841@mwanda> (raw)
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 <dan.carpenter@oracle.com>
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 = {
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexandre TORGUE <alexandre.torgue@st.com>
Cc: linux-arm-kernel@lists.infradead.org,
kernel-janitors@vger.kernel.org, linux-serial@vger.kernel.org,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Jiri Slaby <jslaby@suse.com>
Subject: [patch] serial: stm32: fix a type issue
Date: Wed, 12 Oct 2016 09:21:03 +0300 [thread overview]
Message-ID: <20161012062103.GS12841@mwanda> (raw)
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 <dan.carpenter@oracle.com>
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 = {
WARNING: multiple messages have this Message-ID (diff)
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] serial: stm32: fix a type issue
Date: Wed, 12 Oct 2016 09:21:03 +0300 [thread overview]
Message-ID: <20161012062103.GS12841@mwanda> (raw)
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 <dan.carpenter@oracle.com>
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 = {
next reply other threads:[~2016-10-12 6:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 6:21 Dan Carpenter [this message]
2016-10-12 6:21 ` [patch] serial: stm32: fix a type issue Dan Carpenter
2016-10-12 6:21 ` Dan Carpenter
2016-10-12 7:40 ` Gerald Baeza
2016-10-12 7:40 ` Gerald Baeza
2016-10-12 7:40 ` Gerald Baeza
2016-10-12 8:52 ` Russell King - ARM Linux
2016-10-12 8:52 ` Russell King - ARM Linux
2016-10-12 8:52 ` Russell King - ARM Linux
2016-10-12 9:11 ` Dan Carpenter
2016-10-12 9:11 ` Dan Carpenter
2016-10-12 9:11 ` Dan Carpenter
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=20161012062103.GS12841@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-arm-kernel@lists.infradead.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 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.