OSDN Git Service

scsi: ufs: hisi: fix ufs_hba_variant_ops passing
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Mar 2019 19:39:11 +0000 (20:39 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Mar 2019 00:26:45 +0000 (19:26 -0500)
commit176eb927744201ba95ca9a85c2f9af457559374f
tree003bdb72e68d03270a77cc19af8ab970fc64d84b
parentdb0f166e9a37215b15d5d732c98fa15219adccf0
scsi: ufs: hisi: fix ufs_hba_variant_ops passing

Without CONFIG_OF, the of_match_node() helper does not evaluate its
argument, and the compiler warns about the unused variable:

drivers/scsi/ufs/ufs-hisi.c: In function 'ufs_hisi_probe':
drivers/scsi/ufs/ufs-hisi.c:673:17: error: unused variable 'dev' [-Werror=unused-variable]

Rework this code to pass the data directly, and while we're at it,
correctly handle the const pointers.

Fixes: 653fcb07d95e ("scsi: ufs: Add HI3670 SoC UFS driver support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-hisi.c
drivers/scsi/ufs/ufshcd-pltfrm.c
drivers/scsi/ufs/ufshcd-pltfrm.h
drivers/scsi/ufs/ufshcd.h