scsi: lpfc: Fix noderef and address space warnings
Running make C=1 M=drivers/scsi/lpfc triggers sparse warnings Correct the code generating the following errors: - Incompatible address space assignment without proper conversion. - Deference of usespace and per-cpu pointers. Link: https://lore.kernel.org/r/20200501214310.91713-8-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
88acb4d9ff
commit
a7fc071ab5
@@ -2436,7 +2436,8 @@ lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
|
||||
return 0;
|
||||
|
||||
if (dent == phba->debug_InjErrLBA) {
|
||||
if ((buf[0] == 'o') && (buf[1] == 'f') && (buf[2] == 'f'))
|
||||
if ((dstbuf[0] == 'o') && (dstbuf[1] == 'f') &&
|
||||
(dstbuf[2] == 'f'))
|
||||
tmp = (uint64_t)(-1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user