lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] tty: Replace goldfish_tty_line_count with a #define
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

\
 
 \ /
  Last update: 2018-08-02 12:02    [W:2.050 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site