Re: [PATCH 1/1] staging: gdm724x: Replace macro GDM_TTY_READY with static inline function

From: Greg KH
Date: Thu Nov 17 2022 - 13:50:36 EST


On Wed, Nov 16, 2022 at 02:24:13PM -0500, Brent Pappas wrote:
> Replace the macro GDM_TTY_READY with a static inline function
> to follow the Linux kernel coding style.
>
> Signed-off-by: Brent Pappas <bpappas@xxxxxxxxxxxxxxx>
> ---
> drivers/staging/gdm724x/gdm_tty.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
> index cc6d80554c98..93d50d42a367 100644
> --- a/drivers/staging/gdm724x/gdm_tty.c
> +++ b/drivers/staging/gdm724x/gdm_tty.c
> @@ -21,7 +21,10 @@
>
> #define MUX_TX_MAX_SIZE 2048
>
> -#define GDM_TTY_READY(gdm) (gdm && gdm->tty_dev && gdm->port.count)
> +static inline int gdm_tty_ready(struct gdm *gdm)

Why is this "int" and not "bool"?

thanks,

greg k-h