[PATCH v2 1/5] gpu: nova-core: use checked arithmetic in FWSEC firmware parsing

Joel Fernandes joelagnelf at nvidia.com
Wed Feb 4 13:08:52 PST 2026



> On Feb 4, 2026, at 1:54 PM, Miguel Ojeda <miguel.ojeda.sandonis at gmail.com> wrote:
> 
> On Tue, Feb 3, 2026 at 11:25 PM Alexandre Courbot <acourbot at nvidia.com> wrote:
>> 
>> Thus for anything non-trivial, I'd like to keep a `// CALC: ` header
>> describing the intended operation. I also noticed that LLMs check that
>> the code is in accordance with comments, which provides an additional
>> layer of checking.
> 
> Yeah, it is the same reason why documentation as well as other tagged
> comments like `// SAFETY:` comments enable to catch mistakes even if
> they may be redundant in a certain sense.
> 
> I wouldn't mind having those tagged comments after a certain
> complexity -- perhaps it could be possible to define a heuristic for a
> threshold where such a comment is required, and get Clippy to warn
> about it (we are trying to get other tagged comments implemented, so
> it is a good opportunity).
> 
> I guess a fancy IDE could perhaps render the math expression on hover as well.

All of these suggestions sound good to me!

Thanks,

Joel Fernandes


> 
> Cheers,
> Miguel


More information about the linux-riscv mailing list