diff options
author | James Smart <[email protected]> | 2021-08-30 16:10:50 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2021-09-13 22:15:40 -0400 |
commit | 96fafe7c6523886308605d30ec92c7936abe7c2c (patch) | |
tree | 3390bd494c82d1cd15e157539a9e7694157cc9bd /scripts/gdb/linux/utils.py | |
parent | 6a2ea0d34af1ca807d5ba6a8350a037ff3cd35cc (diff) |
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/[email protected]
Fixes: 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling")
Reported-by: kernel test robot <[email protected]>
Co-developed-by: Ram Vegesna <[email protected]>
Signed-off-by: Ram Vegesna <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions