[PATCH v2] nvmet-auth: update sc_c in target host hash calculation
Christoph Hellwig
hch at lst.de
Thu Nov 6 05:09:24 PST 2025
On Thu, Nov 06, 2025 at 06:35:48PM +0530, Martin George wrote:
> > req->sq->dhchap_tid = le16_to_cpu(data->t_id);
> > + req->sq->sc_c = le16_to_cpu(data->sc_c);
>
> Given sc_c is an unsigned 8bit int, is there really a need to make this
> endian safe by calling le16_to_cpu()?
... calling le16_to_cpu on a u8 actually messed up the endianess (on
big endian systems anyway). Everyone please run sparse on your
submissions to catch this.
More information about the Linux-nvme
mailing list