[04/10] tty: moxa: Make local var storing tty_port_initialized() bool

Message ID 20230104151531.73994-5-ilpo.jarvinen@linux.intel.com
State New
Headers
Series tty/serial: bool conversions and cleanups |

Commit Message

Ilpo Järvinen Jan. 4, 2023, 3:15 p.m. UTC
  Return type of tty_port_initialized() is bool, use matching type for
the local variable.

Also reorder the local vars to reverse-xmas-tree while at it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/tty/moxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jiri Slaby Jan. 5, 2023, 6:04 a.m. UTC | #1
On 04. 01. 23, 16:15, Ilpo Järvinen wrote:
> Return type of tty_port_initialized() is bool, use matching type for
> the local variable.
> 
> Also reorder the local vars to reverse-xmas-tree while at it.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   drivers/tty/moxa.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
> index bc474f3c3f8f..2d9635e14ded 100644
> --- a/drivers/tty/moxa.c
> +++ b/drivers/tty/moxa.c
> @@ -1664,8 +1664,8 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
>   		u16 __iomem *ip)
>   {
>   	struct tty_struct *tty = tty_port_tty_get(&p->port);
> +	bool inited = tty_port_initialized(&p->port);
>   	void __iomem *ofsAddr;
> -	unsigned int inited = tty_port_initialized(&p->port);
>   	u16 intr;
>   
>   	if (tty) {
  

Patch

diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index bc474f3c3f8f..2d9635e14ded 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -1664,8 +1664,8 @@  static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
 		u16 __iomem *ip)
 {
 	struct tty_struct *tty = tty_port_tty_get(&p->port);
+	bool inited = tty_port_initialized(&p->port);
 	void __iomem *ofsAddr;
-	unsigned int inited = tty_port_initialized(&p->port);
 	u16 intr;
 
 	if (tty) {