[PATCH 3/3] nvmet: add helpers to set the result field for connect commands

Hannes Reinecke hare at suse.de
Tue Sep 20 23:14:08 PDT 2022


On 9/20/22 19:19, Christoph Hellwig wrote:
> The code to set the result field for the admin and I/O connect commands
> is not only verbose and duplicated, but also violates the aliasing
> rules as it accesses both the u16 and u32 members in the union.
> 
> Add a little helper to sort all that out.
> 
>   Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication")
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
>   drivers/nvme/target/fabrics-cmd.c | 18 ++++++++----------
>   1 file changed, 8 insertions(+), 10 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare at suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer



More information about the Linux-nvme mailing list