diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-28 01:56:52 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-17 03:45:12 +0200 |
commit | 761c830ec7b3d0674b3ad89cefd77a692634e305 (patch) | |
tree | 3c92902bf0014d76c650fece1581d8f497af4bbd /drivers/firewire | |
parent | scsi: isci: Change sci_controller_start_task's return type to sci_status (diff) | |
download | linux-761c830ec7b3d0674b3ad89cefd77a692634e305.tar.xz linux-761c830ec7b3d0674b3ad89cefd77a692634e305.zip |
scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_event
Clang warns when one enumerated type is implicitly converted to another.
drivers/scsi/bfa/bfa_fcs_lport.c:379:26: warning: implicit conversion
from enumeration type 'enum bfa_lport_aen_event' to different
enumeration type 'enum bfa_ioc_aen_event' [-Wenum-conversion]
BFA_AEN_CAT_LPORT, event);
^~~~~
The root cause of these warnings is the bfad_im_post_vendor_event
function, which expects a value from enum bfa_ioc_aen_event but there
are multiple instances of values from enums bfa_port_aen_event,
bfa_audit_aen_event, and bfa_lport_aen_event being used in this
function.
Given that this doesn't appear to be a problem since cat helps with
differentiating the events, just change evt's type to int so that no
conversion needs to happen and Clang won't warn. Update aen_type's type
in bfa_aen_entry_s as members that hold enumerated types should be int.
Link: https://github.com/ClangBuiltLinux/linux/issues/147
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/firewire')
0 files changed, 0 insertions, 0 deletions