diff options
author | James Smart <jsmart2021@gmail.com> | 2021-08-31 01:10:50 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-09-14 04:15:40 +0200 |
commit | 96fafe7c6523886308605d30ec92c7936abe7c2c (patch) | |
tree | 3390bd494c82d1cd15e157539a9e7694157cc9bd /drivers/android | |
parent | scsi: st: Add missing break in switch statement in st_ioctl() (diff) | |
download | linux-96fafe7c6523886308605d30ec92c7936abe7c2c.tar.xz linux-96fafe7c6523886308605d30ec92c7936abe7c2c.zip |
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: 202bfdffae27 ("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>
Diffstat (limited to 'drivers/android')
0 files changed, 0 insertions, 0 deletions