summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-04-25 23:19:52 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2025-04-28 21:30:26 -0400
commit386e014202f8380bc034678f157140db2d4dc25a (patch)
tree21708e1fa12f394fe2097d6d559aacf4c77afd09
parentedf147e215c6952a9300388372febe24213c83d0 (diff)
scsi: qla2xxx: Remove duplicate struct crb_addr_pair
In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct crb_addr_pair *" and the returned type will be a _different_ "struct crb_addr_pair *", causing a warning. This really stumped me for a bit. :) Drop the redundant declaration. Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20250426061951.work.272-kees@kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 78725bda3714..0cd3db8ed4ef 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1099,11 +1099,6 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
unsigned offset, n;
struct qla_hw_data *ha = vha->hw;
- struct crb_addr_pair {
- long addr;
- long data;
- };
-
/* Halt all the individual PEGs and other blocks of the ISP */
qla82xx_rom_lock(ha);