Re: [PATCH v2 2/3] gpu: nova-core: fb: fix clippy::precedence warning in read_sysmem_flush_page_ga100()

From: Miguel Ojeda

Date: Sun Apr 05 2026 - 08:14:14 EST


On Sun, Apr 5, 2026 at 1:42 PM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
> I'm tempted to consider it anyway, because it is a readability
> improvement. Any objection?

None at all -- though I think there are conflicting opinions on the
matter. I think Gary preferred not to have the parentheses, supported
by the fact that Clippy had to roll it back (i.e. linting at that by
default) meant the parentheses may not be popular.

Back then I wrote:

Now, seeing quite a bunch of parenthesis for this in C files, from
kernel devs and crypto stuff and all over drivers and so on and so
forth, means others definitely do not find it obvious or prefer to be
explicit for extra clarity.

I have checked again a few `git grep` patterns, and it seems to me
there are substantially more files using parentheses than not in C
files, at least with some naive regexes. Can someone double-check?

If we go for wanting them, then I can just enable
`clippy::precedence_bits` to be consistent instead.

It is easier to disable the lint later than trying to enable it later
on, though (because we would need to add all the missing parentheses
everywhere).

Cheers,
Miguel