The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: rkir@google.com
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] tty: Replace goldfish_tty_line_count with a #define
Date: Thu, 2 Aug 2018 11:02:10 +0100	[thread overview]
Message-ID: <20180802110210.65392224@alans-desktop> (raw)
In-Reply-To: <20180725005133.107823-3-rkir@google.com>

On Tue, 24 Jul 2018 17:51:33 -0700
rkir@google.com wrote:

> From: Roman Kiryanov <rkir@google.com>
> 
> The driver never mutates this variable - no benefits of
> keeping it mutable.
> 
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
> Changes in v2:
>  - Replaced "const u32" with "#define".

v1 was IMHO definitely better. And you are correct that gcc will not
allocate memory for a static const object unless you do things like take
its address. It will (unlike a define) however properly typecheck
everything.

Alan

  parent reply	other threads:[~2018-08-02 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  0:51 [PATCH v2 1/3] tty: Address checkpatch warnings in goldfish.c rkir
2018-07-25  0:51 ` [PATCH v2 2/3] tty: Make constants to be enums instead of #define " rkir
2018-07-28 14:51   ` Greg KH
2018-07-25  0:51 ` [PATCH v2 3/3] tty: Replace goldfish_tty_line_count with a #define rkir
2018-08-02  8:11   ` Greg KH
2018-08-02 10:02   ` Alan Cox [this message]
2018-07-28 14:51 ` [PATCH v2 1/3] tty: Address checkpatch warnings in goldfish.c Greg KH

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=20180802110210.65392224@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkir@google.com \
    /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