scsi: pm8001: Fix command initialization in pm80XX_send_read_log()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sun, 20 Feb 2022 03:17:43 +0000 (12:17 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 23 Feb 2022 02:31:17 +0000 (21:31 -0500)
commit1a37b6738b58d86f6b144b3fc754ace0f2e0166d
tree090192038bb60f2ba1e64c7d733633a2f27ac34d
parentc58e935e809a9337bb34c5d6f62cf0a6d0496b31
scsi: pm8001: Fix command initialization in pm80XX_send_read_log()

Since the sata_cmd struct is zeroed out before its fields are initialized,
there is no need for using "|=" to initialize the ncqtag_atap_dir_m
field. Using a standard assignment removes the sparse warning:

warning: invalid assignment: |=

Also, since the ncqtag_atap_dir_m field has type __le32, use cpu_to_le32()
to generate the assigned value.

Link: https://lore.kernel.org/r/20220220031810.738362-5-damien.lemoal@opensource.wdc.com
Fixes: c6b9ef5779c3 ("[SCSI] pm80xx: NCQ error handling changes")
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm80xx_hwi.c