Re: [PATCH] [PATCH] rust: macros: add authors

Daniel Sedlak
2024-12-09T12:29:51Z

On 12/9/24 12:47 PM, Miguel Ojeda wrote:
> On Sat, Dec 7, 2024 at 11:15 AM Daniel Sedlak <daniel@sedlak.dev> wrote:
>>
>> I think we could fight with the code formatting, because when it comes
>> to the rust macros, rustfmt is often very confused and we could end up
>> with variations like:
>>
>> authors: ["author1", "author2",
>> "author3"]
>>
>> or
>>
>> authors: [
>> "author1",
>> "author2",
>> ]
>>
>> and rustfmt would be totally ok with both of them.
>
> Yeah, that is a good point. There are hundreds of drivers with 2+
> authors, so this could indeed be an issue eventually.
>
> Having said that, we already have e.g. the `alias` and `firmware` keys
> that take a list, so I think we already have the potential issue, thus
> being consistent in our use of lists sounds simpler (unless we are
> discussing migrating those away too).

Ops, it did not occur to me, that we already have lists. I would propose
to migrate them too, however it may be controversial.
>
> We could also try to mitigate the formatting issue via e.g.
> `checkpatch.pl` if needed.

That is true, it could be part of `checkpatch.pl`, however I would argue
that if we can overcame the formatting problems by repeating the field,
instead of modifying `checkpatch.pl`, then none code is better than some
code (regarding modifying `checkpatch.pl`).

Thank you for feedback

Daniel