lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ