[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CACKFLi=qaUXho-CJFYiaSx4DSAtP-2b+F9eObStdmtOpGHJxjw@mail.gmail.com>
Date: Mon, 13 Nov 2017 04:27:48 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: David Binderman <dcb314@...mail.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: linux-4.14/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1009]:
(style) Expression is always false
On Mon, Nov 13, 2017 at 4:12 AM, David Binderman <dcb314@...mail.com> 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.
Powered by blists - more mailing lists