[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY1PR07MB2554A3689F2690F70366CA7180EA0@CY1PR07MB2554.namprd07.prod.outlook.com>
Date: Thu, 4 Oct 2018 16:46:31 +0000
From: "Tayar, Tomer" <Tomer.Tayar@...ium.com>
To: Nathan Chancellor <natechancellor@...il.com>,
"Elior, Ariel" <Ariel.Elior@...ium.com>,
"David S. Miller" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@...ium.com>
Subject: RE: [PATCH v2] qed: Avoid implicit enum conversion in
qed_ooo_submit_tx_buffers
From: Nathan Chancellor <natechancellor@...il.com>
Sent: Thursday, October 04, 2018 7:39 PM
> Clang warns when one enumerated type is implicitly converted to another.
>
> drivers/net/ethernet/qlogic/qed/qed_ll2.c:799:32: warning: implicit
> conversion from enumeration type 'enum core_tx_dest' to different
> enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion]
> tx_pkt.tx_dest = p_ll2_conn->tx_dest;
> ~ ~~~~~~~~~~~~^~~~~~~
> 1 warning generated.
>
> Fix this by using a switch statement to convert between the enumerated
> values since they are not 1 to 1, which matches how the rest of the
> driver handles this conversion.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/125
> Suggested-by: Tomer Tayar <Tomer.Tayar@...ium.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>
> v1 -> v2:
>
> * Use an explicit switch statement to convert between the enumerated
> types like the rest of the driver, as suggested by Tomer.
Thanks
Acked-by: Tomer Tayar <Tomer.Tayar@...ium.com>
Powered by blists - more mailing lists