Re: [PATCH v2] nvmet: auth: validate dhchap id list lengths

From: yunje shin

Date: Tue Mar 17 2026 - 13:03:40 EST


On Tue, Mar 17, 2026 at 11:51 PM Christoph Hellwig <hch@xxxxxx> wrote:
> Overly lone lines. A local variable for data->auth_protocol[0].dhchap
> would really help with readability here.
...
> Tabs before the values. Bonus points for a reference to the relevant
> spec.

I will fix the tab alignment for the macros and add a spec reference
in v3.

Regarding the local variable — I understand the readability concern,
but data->auth_protocol[0].dhchap is currently used without a local
variable in 8 places in target/fabrics-cmd-auth.c (lines 42-44, 71,
75-76, 100-101) and 12 places in host/auth.c (lines 145-156).
Adding one only for the bounds check felt inconsistent, so I kept
the existing style. Happy to hear your thoughts on this.