ch_ktls: fix enum-conversion warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Mar 2021 21:52:50 +0000 (22:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 19:35:39 +0000 (12:35 -0700)
gcc points out an incorrect enum assignment:

drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c: In function 'chcr_ktls_cpl_set_tcb_rpl':
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:684:22: warning: implicit conversion from 'enum <anonymous>' to 'enum ch_ktls_open_state' [-Wenum-conversion]

This appears harmless, and should apparently use 'CH_KTLS_OPEN_SUCCESS'
instead of 'false', with the same value '0'.

Fixes: efca3878a5fb ("ch_ktls: Issue if connection offload fails")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c

index 169e10c913780659bcd6e3128815a996a3896e3f..1115b8f9ea4e393180f6379b108917030e70dce2 100644 (file)
@@ -722,7 +722,7 @@ static int chcr_ktls_cpl_set_tcb_rpl(struct adapter *adap, unsigned char *input)
                kvfree(tx_info);
                return 0;
        }
-       tx_info->open_state = false;
+       tx_info->open_state = CH_KTLS_OPEN_SUCCESS;
        spin_unlock(&tx_info->lock);
 
        complete(&tx_info->completion);