Thread (1 message) 1 message, 1 author, 2017-11-13

Re: linux-4.14/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1009]: (style) Expression is always false

From: Michael Chan <michael.chan@broadcom.com>
Date: 2017-11-13 12:27:49

On Mon, Nov 13, 2017 at 4:12 AM, David Binderman [off-list ref] wrote:
Hello there,

Source code is

    BNXT_FW_TO_ETHTOOL_SPDS(fw_speeds, 0, lk_ksettings, supported);

and

    if ((fw_pause) & BNXT_LINK_PAUSE_RX) {              \
        ethtool_link_ksettings_add_link_mode(lk_ksettings, name,\
                             Pause);        \
        if (!((fw_pause) & BNXT_LINK_PAUSE_TX))         \

I guess that if fw_pause is volatile, then this might be ok code.
Otherwise, I am somewhat suspicious.
I'm not sure if I understand the issue.  fw_pause is a bit map that
can have 0, 1, or 2 bits set.  So we are just testing which bits are
set in the macro.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help