[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdnSNezyMQuj4bT3HeEM8hp+YSZbUKO_u_C+jd2C0sRJ3g@mail.gmail.com>
Date: Thu, 20 Sep 2018 11:11:36 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>, adilger.kernel@...ger.ca,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>, rostedt@...dmis.org,
mchehab+samsung@...nel.org, olof@...m.net,
konstantin@...uxfoundation.org,
"David S. Miller" <davem@...emloft.net>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Paul Lawrence <paullawrence@...gle.com>,
sandipan@...ux.vnet.ibm.com,
Andrey Konovalov <andreyknvl@...gle.com>,
David Woodhouse <dwmw2@...radead.org>,
Will Deacon <will.deacon@....com>,
Philippe Ombredanne <pombredanne@...b.com>,
paul.burton@...s.com, David Rientjes <rientjes@...gle.com>,
w@....eu, msebor@...il.com, sparse@...isli.org,
Jonathan Corbet <corbet@....net>, tytso@....edu,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>, joe@...ches.com,
Arnd Bergmann <arnd@...db.de>, asmadeus@...ewreck.org,
Stefan Agner <stefan@...er.ch>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-doc@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-sparse@...r.kernel.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH v5 14/15] Compiler Attributes: auxdisplay: panel: use __nonstring
On Thu, Sep 20, 2018 at 10:23 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> Let gcc know these arrays are not meant to be NUL-terminated
> by annotating them with the new __nonstring variable attribute;
> and remove the comment since it conveys the same information.
>
> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
> ---
> drivers/auxdisplay/panel.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
> index 3b25a643058c..21b9b2f2470a 100644
> --- a/drivers/auxdisplay/panel.c
> +++ b/drivers/auxdisplay/panel.c
> @@ -155,10 +155,9 @@ struct logical_input {
> int release_data;
> } std;
> struct { /* valid when type == INPUT_TYPE_KBD */
> - /* strings can be non null-terminated */
> - char press_str[sizeof(void *) + sizeof(int)];
> - char repeat_str[sizeof(void *) + sizeof(int)];
> - char release_str[sizeof(void *) + sizeof(int)];
> + char press_str[sizeof(void *) + sizeof(int)] __nonstring;
> + char repeat_str[sizeof(void *) + sizeof(int)] __nonstring;
> + char release_str[sizeof(void *) + sizeof(int)] __nonstring;
> } kbd;
> } u;
> };
> --
> 2.17.1
>
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists