[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd7fae76-d8bb-560d-c7e8-a77822d11d8a@embeddedor.com>
Date: Thu, 23 Jul 2020 08:47:34 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] tty: Avoid the use of one-element arrays
On 7/23/20 03:32, Greg Kroah-Hartman wrote:
> On Thu, Jul 23, 2020 at 08:30:47AM +0200, Jiri Slaby wrote:
>> On 22. 07. 20, 20:24, Gustavo A. R. Silva wrote:
>>>
>>>
>>> On 7/17/20 01:10, Jiri Slaby wrote:
>>>> 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?
>>>>
>>>
>>> Hi Jiri,
>>>
>>> Sure thing. I'll fix that up and send v2, shortly.
>>
>> Hi,
>>
>> by a follow-up patch I meant a separate patch. Looking at it once again,
>> I would do 3 patches:
>> 1) remove [1] arrays
>> 2) change sizeofs
>> 3) fix white space
>
> I agree, that would be the ideal series.
>
OK. No problem. I'll turn this into a patch series then. :)
Thanks
--
Gustavo
Powered by blists - more mailing lists