Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2325144imm; Thu, 20 Sep 2018 11:13:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYEBdA/0DcTWpfsil24ckiAeygdHx76XE4VZXFQmbRC73EbPl2T1jZ2u8ob5xn5NIiInbuP X-Received: by 2002:aa7:8591:: with SMTP id w17-v6mr42602639pfn.77.1537467219029; Thu, 20 Sep 2018 11:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537467219; cv=none; d=google.com; s=arc-20160816; b=wbL1ylT93K2O61tTtm4I+xSjMgnZWFC23aK2HqhRfGJnq7k5/07UbSq3So0+cwltPF bt8khEjnRDngQ+Z/kIdRuP9SEqwx1SqorhLYLxY27dsXuJzPUNGEJbshGzJQPgAUoE4V onWH4OqYPMZZuMtjTTtlIDpQwXqI9FbJuM0dc64udo1lgWaOFYl2DqXSpSw5sI1XpS8g OI/e0w0X6pbz72dEMD97Bc0EzqXlDb7jXhcMf5ZKAwnzucMRfNoG4i3effpyZD3j4BRk XpVF6264SdsKALxC8/h0Gq3zwnG5X1LCC98xnxq0qevcQW/1Ke963EQt1M1o2ps17waV Mowg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vWvJ1QZi3se/QefXMjCzCIvWR1+8u5LY+UwTnG7VS78=; b=mwACfyBdAIYiOmeFedGiSI6Apw3E55ZoH/e6bvuzQ1k44cvE5p3VVNyEzsRuSVmig+ Nr0S7iivJ8DSh9smUBdBkanZ9naC5Gg/KaK6fVzpLYxVUgUZfNsbnI0NQx+EC562KK2i wHYyIlAXzuqx2f9wgAd5zxmOQLK/NSpdfOm1c0P2i3AGoZB5GJxej9Rx785T/c3T45lv aRR+8zwRG7gkOXn1LDv0iExRqWJFvkowML0u3kEkc/XknGKzrZB8rvjPXi73ao45g72W Qy3hCtm9HV89VnmZiLq9+KNUEsWMIjaCu2zbk0/znC8fR8N0UeI2vtr4Ls3BNnYngsyO rECQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Kx5AME7z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a31-v6si23522779pgm.114.2018.09.20.11.13.17; Thu, 20 Sep 2018 11:13:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Kx5AME7z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387424AbeITX4b (ORCPT + 99 others); Thu, 20 Sep 2018 19:56:31 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46628 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbeITX4b (ORCPT ); Thu, 20 Sep 2018 19:56:31 -0400 Received: by mail-pl1-f196.google.com with SMTP id t20-v6so1280689ply.13 for ; Thu, 20 Sep 2018 11:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vWvJ1QZi3se/QefXMjCzCIvWR1+8u5LY+UwTnG7VS78=; b=Kx5AME7zDVDRp84ZqXVX5cviwxUuzqLvG68puoIlnTfZnm6Osm0eOTB2oQFAnhOq5T kEaSXxiAHVGe+THFWKeXX6XmFg46mdzqzuVLocNj25KuikqSeF9V29d6HHR/WL1IJt72 RPQpbV7YAYGMKpmEYc4C9+BoXvoQO6ikD+1RiQgeveipR6HFpX8DOTB+H1EmUhCm7yTs S555dKFL3HQuHUyH9mtLV5HNhqFNxnIJMdHtY1Wxd4xEi8jfSPLrSrmXJlRXGvN4NJVr TEI0WB5hwNx3ul1L6VSeTLntFHIuQ5B7jvF8yV6mb4dv1Z8hF/R1IlYKtkWTSzH+PTY0 fN7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vWvJ1QZi3se/QefXMjCzCIvWR1+8u5LY+UwTnG7VS78=; b=ps874yOHPm8A7n3eHkZjO9jQ6WrzHbEI1y2xKFBJqj+lo8G28WlEFZLUMDByWNr0gn I/4/zYP/DoU8zaUfmWrvliCPRQeGvbCGml+DxX5Xquj0Kn6JaKfyjfNfqLKDYpcNOKfS cQtSEq4DjZoYanrSCWg6ohbC+/RTwgR35C9LDe6OVrdv8VYfourk5dq8/ciMq4b3pWfK O8dzezPud4vYcJ/2ctodYqTCfzCBw0PY47mhQ8ElFuYHhMwe0xfMdmu1km5H3fxD0DMk 8o9TGkW0PY2xogLrni7Yl4Fo//TIp5+wZ2SiKHGa71zSVgfZbJT7PAcGs25veuHsdeR7 yZ4w== X-Gm-Message-State: APzg51Dj2DmBwBWGuRswQXaWDEt7P5qTwc6nGkLoPq5Fr7QTGqr4I26G 04DJfspAkujdMX1eF64Yvxy0mbeZP0Z0iVVGJgSIPg== X-Received: by 2002:a17:902:561:: with SMTP id 88-v6mr40327096plf.320.1537467107987; Thu, 20 Sep 2018 11:11:47 -0700 (PDT) MIME-Version: 1.0 References: <20180920172301.21868-1-miguel.ojeda.sandonis@gmail.com> <20180920172301.21868-15-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180920172301.21868-15-miguel.ojeda.sandonis@gmail.com> From: Nick Desaulniers Date: Thu, 20 Sep 2018 11:11:36 -0700 Message-ID: Subject: Re: [PATCH v5 14/15] Compiler Attributes: auxdisplay: panel: use __nonstring To: Miguel Ojeda Cc: Greg KH , LKML , adilger.kernel@dilger.ca, Masahiro Yamada , Michal Marek , rostedt@goodmis.org, mchehab+samsung@kernel.org, olof@lxom.net, konstantin@linuxfoundation.org, "David S. Miller" , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , sandipan@linux.vnet.ibm.com, Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , paul.burton@mips.com, David Rientjes , w@1wt.eu, msebor@gmail.com, sparse@chrisli.org, Jonathan Corbet , tytso@mit.edu, Geert Uytterhoeven , Rasmus Villemoes , joe@perches.com, Arnd Bergmann , asmadeus@codewreck.org, Stefan Agner , Luc Van Oostenryck , Andrew Morton , Linus Torvalds , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 20, 2018 at 10:23 AM Miguel Ojeda 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 > --- > 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 -- Thanks, ~Nick Desaulniers