From 3d030e2feb8a3545959d80362dd91fb769868c54 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 25 Apr 2025 23:20:11 -0700 Subject: [PATCH] scsi: qla4xxx: 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 Link: https://lore.kernel.org/r/20250426062010.work.878-kees@kernel.org Signed-off-by: Martin K. Petersen --- drivers/scsi/qla4xxx/ql4_nx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 47adff9f0506..da2fc66ffedd 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -973,11 +973,6 @@ qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose) unsigned long off; unsigned offset, n; - struct crb_addr_pair { - long addr; - long data; - }; - /* Halt all the indiviual PEGs and other blocks of the ISP */ qla4_82xx_rom_lock(ha); -- 2.50.1