From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Joe Perches <joe@perches.com>, Daniel Drake <dsd@gentoo.org>,
Ulrich Kunitz <kune@deine-taler.de>,
"David S. Miller" <davem@davemloft.net>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Jes.Sorensen@gmail.com
Subject: Re: [PATCH][next] zd1211rw/zd_usb.h: Replace zero-length array with flexible-array member
Date: Tue, 10 Mar 2020 16:52:55 -0500 [thread overview]
Message-ID: <48ff1333-0a14-36d8-9565-a7f13a06c974@embeddedor.com> (raw)
In-Reply-To: <87r1y0nwip.fsf@kamboji.qca.qualcomm.com>
On 3/10/20 8:56 AM, Kalle Valo wrote:
> + jes
>
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>
>> Hi,
>>
>> On 3/5/20 10:10, Kalle Valo wrote:
>>> Joe Perches <joe@perches.com> writes:
>>>
>>>> On Thu, 2020-03-05 at 16:50 +0200, Kalle Valo wrote:
>>>>> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>>>> []
>>>>>> drivers/net/wireless/zydas/zd1211rw/zd_usb.h | 8 ++++----
>>>>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>>>
>>>>> "zd1211rw: " is enough, no need to have the filename in the title.
>>>
>>>>> But I asked this already in an earlier patch, who prefers this format?
>>>>> It already got opposition so I'm not sure what to do.
>>>>
>>>> I think it doesn't matter.
>>>>
>>>> Trivial inconsistencies in patch subject and word choice
>>>> don't have much overall impact.
>>>
>>> I wrote in a confusing way, my question above was about the actual patch
>>> and not the the title. For example, Jes didn't like this style change:
>>>
>>> https://patchwork.kernel.org/patch/11402315/
>>>
>>
>> It doesn't seem that that comment adds a lot to the conversation. The only
>> thing that it says is literally "fix the compiler". By the way, more than
>> a hundred patches have already been applied to linux-next[1] and he seems
>> to be the only person that has commented such a thing.
>
> But I also asked who prefers this format in that thread, you should not
> ignore questions from two maintainers (me and Jes).
>
I'm sorry. I thought the changelog text had already the proper information.
In the changelog text I'm quoting the GCC documentation below:
"The preferred mechanism to declare variable-length types like struct line
above is the ISO C99 flexible array member..." [1]
I'm also including a link to the following KSPP open issue:
https://github.com/KSPP/linux/issues/21
The issue above mentions the following:
"Both cases (0-byte and 1-byte arrays) pose confusion for things like sizeof(),
CONFIG_FORTIFY_SOURCE."
sizeof(flexible-array-member) triggers a warning because flexible array members have
incomplete type[1]. There are some instances of code in which the sizeof operator
is being incorrectly/erroneously applied to zero-length arrays and the result is zero.
Such instances may be hiding some bugs. So, the idea is also to get completely rid
of those sorts of issues.
Should I update the changelog in some way so it is a bit more informative?
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Thanks
--
Gustavo
>> Qemu guys are adopting this format, too[2][3].
>>
>> On the other hand, the changelog text explains the reasons why we are
>> implementing this change all across the kernel tree. :)
>>
>> [1]
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?qt=grep&q=flexible-array
>> [2] https://lists.nongnu.org/archive/html/qemu-s390x/2020-03/msg00019.html
>> [3] https://lists.nongnu.org/archive/html/qemu-s390x/2020-03/msg00020.html
>
> TBH I was leaning more on Jes side on this, but I guess these patches
> are ok if they are so widely accepted. Unless anyone objects?
>
next prev parent reply other threads:[~2020-03-10 21:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 11:12 Gustavo A. R. Silva
2020-03-05 14:50 ` Kalle Valo
2020-03-05 15:20 ` Joe Perches
2020-03-05 16:10 ` Kalle Valo
2020-03-05 18:28 ` Gustavo A. R. Silva
2020-03-10 13:56 ` Kalle Valo
2020-03-10 21:52 ` Gustavo A. R. Silva [this message]
2020-03-10 22:07 ` Jes Sorensen
2020-03-10 22:13 ` Gustavo A. R. Silva
2020-03-10 22:15 ` Joe Perches
2020-03-10 22:21 ` Gustavo A. R. Silva
2020-03-10 22:28 ` Joe Perches
2020-03-10 22:33 ` Jes Sorensen
2020-03-10 22:41 ` Joe Perches
2020-03-10 22:46 ` Gustavo A. R. Silva
2020-03-10 22:33 ` Gustavo A. R. Silva
2020-03-10 22:20 ` Jes Sorensen
2020-03-10 22:31 ` Gustavo A. R. Silva
2020-03-10 22:34 ` Jes Sorensen
2020-03-10 22:36 ` Gustavo A. R. Silva
2020-03-23 16:46 ` Kalle Valo
2020-03-23 17:14 ` [PATCH][next] zd1211rw: " Kalle Valo
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=48ff1333-0a14-36d8-9565-a7f13a06c974@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=Jes.Sorensen@gmail.com \
--cc=davem@davemloft.net \
--cc=dsd@gentoo.org \
--cc=joe@perches.com \
--cc=kune@deine-taler.de \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®