linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Antoni Przybylik <antoni.przybylik@wp.pl>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gdm724x: gdm_tty: replaced macro with a function
Date: Wed, 02 Sep 2020 00:01:55 -0700	[thread overview]
Message-ID: <7a1a2f554c567577a63d5658e8f48d5b4b103df8.camel@perches.com> (raw)
In-Reply-To: <20200901201626.75405-1-antoni.przybylik@wp.pl>

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.



  parent reply	other threads:[~2020-09-02  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 20:16 [PATCH] staging: gdm724x: gdm_tty: replaced macro with a function Antoni Przybylik
2020-09-02  6:23 ` Greg KH
2020-09-02  7:01 ` Joe Perches [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-02 13:24 Antoni Przybylik
2020-09-02 14:10 ` Greg KH
2020-09-01 16:18 Antoni Przybylik
2020-09-01 17:50 ` Greg KH
2020-09-01 20:31   ` antoni.przybylik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a1a2f554c567577a63d5658e8f48d5b4b103df8.camel@perches.com \
    --to=joe@perches.com \
    --cc=antoni.przybylik@wp.pl \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).