Skip to content

Commit

Permalink
scsi: libfc: Fix enum-conversion warning
Browse files Browse the repository at this point in the history
gcc -Wextra points out an assignment between two different enum types:

drivers/scsi/libfc/fc_exch.c: In function 'fc_exch_setup_hdr':
../drivers/scsi/libfc/fc_exch.c:275:26: warning: implicit conversion from 'enum fc_class' to 'enum fc_sof' [-Wenum-conversion]

This seems to be intentional, as the same numeric values are used here, so
shut up the warning by adding an explicit cast.

Link: https://lore.kernel.org/r/20201026214911.3892701-1-arnd@kernel.org
Fixes: 42e9a92 ("[SCSI] libfc: A modular Fibre Channel library")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Arnd Bergmann authored and Martin K. Petersen committed Oct 30, 2020
1 parent 8fd9efc commit 3fb5204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/libfc/fc_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void fc_exch_setup_hdr(struct fc_exch *ep, struct fc_frame *fp,

if (f_ctl & FC_FC_END_SEQ) {
fr_eof(fp) = FC_EOF_T;
if (fc_sof_needs_ack(ep->class))
if (fc_sof_needs_ack((enum fc_sof)ep->class))
fr_eof(fp) = FC_EOF_N;
/*
* From F_CTL.
Expand Down

0 comments on commit 3fb5204

Please sign in to comment.