1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/scsi/elx/libefc
James Smart 96fafe7c65 scsi: elx: efct: Fix void-pointer-to-enum-cast warning for efc_nport_topology
The kernel test robot flagged an warning for ".../efc_device.c:932:6:
warning: cast to smaller integer type 'enum efc_nport_topology' from 'void
*'"

For the topology events, the "arg" field is generically defined as a void *
and is used to pass different arguments. Most of the arguments are pointers
to data structures. But for the EFC_EVT_NPORT_TOPOLOGY_NOTIFY event, the
argument is an enum value, and the code is typecasting the void * to an
enum generating the warning.

Fix by converting the EFC_EVT_NPORT_TOPOLOGY_NOTIFY event to pass a pointer
to the enum, thus it's a straight-forward pointer dereference in the event
handler.

Link: https://lore.kernel.org/r/20210830231050.5951-1-jsmart2021@gmail.com
Fixes: 202bfdffae ("scsi: elx: libefc: FC node ELS and state handling")
Reported-by: kernel test robot <lkp@intel.com>
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com>
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-09-13 22:15:40 -04:00
..
efc.h scsi: elx: libefc: Emulex FC discovery library APIs and definitions 2021-06-15 23:39:29 -04:00
efc_cmds.c scsi: elx: libefc: Register discovery objects with hardware 2021-06-15 23:39:30 -04:00
efc_cmds.h scsi: elx: libefc: Register discovery objects with hardware 2021-06-15 23:39:30 -04:00
efc_device.c scsi: elx: efct: Fix void-pointer-to-enum-cast warning for efc_nport_topology 2021-09-13 22:15:40 -04:00
efc_device.h scsi: elx: libefc: FC node ELS and state handling 2021-06-15 23:39:30 -04:00
efc_domain.c scsi: elx: libefc: Fix IRQ restore in efc_domain_dispatch_frame() 2021-06-18 23:01:04 -04:00
efc_domain.h scsi: elx: libefc: FC Domain state machine interfaces 2021-06-15 23:39:30 -04:00
efc_els.c scsi: elx: libefc: Extended link Service I/O handling 2021-06-15 23:39:30 -04:00
efc_els.h scsi: elx: libefc: Extended link Service I/O handling 2021-06-15 23:39:30 -04:00
efc_fabric.c scsi: elx: efct: Fix void-pointer-to-enum-cast warning for efc_nport_topology 2021-09-13 22:15:40 -04:00
efc_fabric.h scsi: elx: libefc: Fabric node state machine interfaces 2021-06-15 23:39:30 -04:00
efc_node.c scsi: elx: libefc: Remote node state machine interfaces 2021-06-15 23:39:30 -04:00
efc_node.h scsi: elx: libefc: Remote node state machine interfaces 2021-06-15 23:39:30 -04:00
efc_nport.c scsi: elx: libefc: SLI and FC PORT state machine interfaces 2021-06-15 23:39:30 -04:00
efc_nport.h scsi: elx: libefc: SLI and FC PORT state machine interfaces 2021-06-15 23:39:30 -04:00
efc_sm.c
efc_sm.h
efclib.c scsi: elx: libefc: Emulex FC discovery library APIs and definitions 2021-06-15 23:39:29 -04:00
efclib.h scsi: elx: libefc: Emulex FC discovery library APIs and definitions 2021-06-15 23:39:29 -04:00