From: Jiri Slaby <jirislaby@kernel.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] tty: Avoid the use of one-element arrays
Date: Fri, 17 Jul 2020 08:10:45 +0200 [thread overview]
Message-ID: <f8aa0762-4af2-54a2-c9e8-8023a4b7aed5@kernel.org> (raw)
In-Reply-To: <20200716180858.GA30115@embeddedor>
On 16. 07. 20, 20:08, Gustavo A. R. Silva wrote:
> One-element arrays are being deprecated[1]. Replace the one-element arrays
> with simple value types 'char reserved_char' and 'compat_int_t reserved'[2],
> once it seems these are just placeholders for alignment.
>
> Also, while there, use the preferred form for passing a size of a struct.
> The alternative form where struct name is spelled out hurts readability
> and introduces an opportunity for a bug when the variable type is changed
> but the corresponding sizeof that is passed as argument is not.
>
> Lastly, fix the checkpatch.pl warnings below:
>
> ERROR: code indent should use tabs where possible
> + char reserved_char;$
>
> WARNING: please, no spaces at the start of a line
> + char reserved_char;$
>
> ERROR: code indent should use tabs where possible
> + compat_int_t reserved;$
>
> WARNING: please, no spaces at the start of a line
> + compat_int_t reserved;$
May I ask you to send a follow-up patch to fix the whole structure's
indentation?
> [1] https://github.com/KSPP/linux/issues/79
> [2] https://github.com/KSPP/linux/issues/86
>
> Tested-by: kernel test robot <lkp@intel.com>
> Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tty-20200716.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Jiri Slaby <jirislaby@kernel.org>
thanks,
--
js
suse labs
next prev parent reply other threads:[~2020-07-17 6:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 18:08 [PATCH][next] tty: Avoid the use of one-element arrays Gustavo A. R. Silva
2020-07-17 6:10 ` Jiri Slaby [this message]
2020-07-22 18:24 ` Gustavo A. R. Silva
2020-07-23 6:30 ` Jiri Slaby
2020-07-23 8:32 ` Greg Kroah-Hartman
2020-07-23 13:47 ` Gustavo A. R. Silva
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=f8aa0762-4af2-54a2-c9e8-8023a4b7aed5@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.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).