[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7a1a2f554c567577a63d5658e8f48d5b4b103df8.camel@perches.com>
Date: Wed, 02 Sep 2020 00:01:55 -0700
From: Joe Perches <joe@...ches.com>
To: Antoni Przybylik <antoni.przybylik@...pl>,
gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gdm724x: gdm_tty: replaced macro with a
function
On Tue, 2020-09-01 at 22:16 +0200, Antoni Przybylik wrote:
> This approach is more elegant and prevents some problems related to
> macros such as operator precedence in expanded expression.
[]
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
[]
> @@ -36,6 +34,11 @@ static DEFINE_MUTEX(gdm_table_lock);
> static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"};
> static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
>
> +static int gdm_tty_ready(struct gdm *gdm)
> +{
> + return (gdm && gdm->tty_dev && gdm->port.count);
> +}
static bool gdm_tty_ready might be better.
Powered by blists - more mailing lists