diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-08-18 18:54:52 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-08-22 00:13:57 +0300 |
commit | 19d7102a953900560811498018bb2de4e27ee9d9 (patch) | |
tree | e0e469b1d46efe40b555aaaac6d16b40eab0d53c /drivers/scsi/lpfc/lpfc.h | |
parent | 04aff456af1833c62345a9551958993269eb88b1 (diff) | |
download | linux-19d7102a953900560811498018bb2de4e27ee9d9.tar.xz |
scsi: lpfc: Do not abuse UUID APIs and LPFC_COMPRESS_VMID_SIZE
The lpfc_vmid_host_uuid is not defined as uuid_t and its usage is not the
same as for uuid_t operations (like exporting or importing). Hence replace
call to uuid_is_null() by respective memchr_inv() without abusing casting.
With that, replace LPFC_COMPRESS_VMID_SIZE with plain number and respective
sizeof() to make code robust to changes in the future, if any.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230818155452.875781-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index bc1c5f6df090..af15f7a22d25 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -309,7 +309,6 @@ struct lpfc_hba; #define LPFC_VMID_TIMER 300 /* timer interval in seconds */ #define LPFC_MAX_VMID_SIZE 256 -#define LPFC_COMPRESS_VMID_SIZE 16 union lpfc_vmid_io_tag { u32 app_id; /* App Id vmid */ @@ -667,7 +666,7 @@ struct lpfc_vport { uint32_t cfg_first_burst_size; uint32_t dev_loss_tmo_changed; /* VMID parameters */ - u8 lpfc_vmid_host_uuid[LPFC_COMPRESS_VMID_SIZE]; + u8 lpfc_vmid_host_uuid[16]; u32 max_vmid; /* maximum VMIDs allowed per port */ u32 cur_vmid_cnt; /* Current VMID count */ #define LPFC_MIN_VMID 4 |