linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] serial: stm32: fix a type issue
@ 2016-10-12  6:21 Dan Carpenter
  2016-10-12  7:40 ` Gerald Baeza
  2016-10-12  8:52 ` Russell King - ARM Linux
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-10-12  6:21 UTC (permalink / raw)
  To: linux-arm-kernel

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 = {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch] serial: stm32: fix a type issue
  2016-10-12  6:21 [patch] serial: stm32: fix a type issue Dan Carpenter
@ 2016-10-12  7:40 ` Gerald Baeza
  2016-10-12  8:52 ` Russell King - ARM Linux
  1 sibling, 0 replies; 4+ messages in thread
From: Gerald Baeza @ 2016-10-12  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dan and thanks for the patch

On 10/12/2016 08:21 AM, Dan Carpenter wrote:
> 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 = {
>

Reviewed-by: Gerald Baeza <gerald.baeza@st.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch] serial: stm32: fix a type issue
  2016-10-12  6:21 [patch] serial: stm32: fix a type issue Dan Carpenter
  2016-10-12  7:40 ` Gerald Baeza
@ 2016-10-12  8:52 ` Russell King - ARM Linux
  2016-10-12  9:11   ` Dan Carpenter
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2016-10-12  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 12, 2016 at 09:21:03AM +0300, Dan Carpenter wrote:
> 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')

Correct form is:

Fixes: 12-digit-hash ("summary line")

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch] serial: stm32: fix a type issue
  2016-10-12  8:52 ` Russell King - ARM Linux
@ 2016-10-12  9:11   ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-10-12  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 12, 2016 at 09:52:39AM +0100, Russell King - ARM Linux wrote:
> On Wed, Oct 12, 2016 at 09:21:03AM +0300, Dan Carpenter wrote:
> > 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')
> 
> Correct form is:
> 
> Fixes: 12-digit-hash ("summary line")

When I originally created the Fixes tag format, I used single quotes.
I don't remember why though and I can change with the times.  :)

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-12  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12  6:21 [patch] serial: stm32: fix a type issue Dan Carpenter
2016-10-12  7:40 ` Gerald Baeza
2016-10-12  8:52 ` Russell King - ARM Linux
2016-10-12  9:11   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).