From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] serial: stm32: fix a type issue Date: Wed, 12 Oct 2016 09:21:03 +0300 Message-ID: <20161012062103.GS12841@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Greg Kroah-Hartman , Alexandre TORGUE Cc: linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-serial@vger.kernel.org, Maxime Coquelin , Jiri Slaby List-Id: linux-serial@vger.kernel.org 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 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 = {