[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE4R7bCAfn_bjPoq_pFYDb4S7cR=3jtqS8XQQZc97CHab2561Q@mail.gmail.com>
Date: Thu, 27 Nov 2014 11:04:16 -1000
From: Scott Feldman <sfeldma@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
"nhorman@...driver.com" <nhorman@...driver.com>,
Andy Gospodarek <andy@...yhouse.net>,
Thomas Graf <tgraf@...g.ch>,
"dborkman@...hat.com" <dborkman@...hat.com>,
"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
"jesse@...ira.com" <jesse@...ira.com>,
"pshelar@...ira.com" <pshelar@...ira.com>,
"azhou@...ira.com" <azhou@...ira.com>,
"ben@...adent.org.uk" <ben@...adent.org.uk>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"vyasevic@...hat.com" <vyasevic@...hat.com>,
Cong Wang <xiyou.wangcong@...il.com>,
"Fastabend, John R" <john.r.fastabend@...el.com>,
Eric Dumazet <edumazet@...gle.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Florian Fainelli <f.fainelli@...il.com>,
Roopa Prabhu <roopa@...ulusnetworks.com>,
John Linville <linville@...driver.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>,
"ryazanov.s.a@...il.com" <ryazanov.s.a@...il.com>,
"buytenh@...tstofly.org" <buytenh@...tstofly.org>,
Aviad Raveh <aviadr@...lanox.com>,
"nbd@...nwrt.org" <nbd@...nwrt.org>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Neil Jerram <Neil.Jerram@...aswitch.com>,
"ronye@...lanox.com" <ronye@...lanox.com>,
"simon.horman@...ronome.com" <simon.horman@...ronome.com>,
"alexander.h.duyck@...hat.com" <alexander.h.duyck@...hat.com>,
"Ronciak, John" <john.ronciak@...el.com>,
"mleitner@...hat.com" <mleitner@...hat.com>,
Shrijeet Mukherjee <shrijeet@...il.com>,
Andy Gospodarek <gospo@...ulusnetworks.com>,
Benjamin LaHaise <bcrl@...ck.org>,
Hemal Shah <hemal@...adcom.com>
Subject: Re: [patch net-next v4 21/21] rocker: Use logical operators on booleans
Signed-off-by: Scott Feldman <sfeldma@...il.com>
On Thu, Nov 27, 2014 at 12:40 AM, Jiri Pirko <jiri@...nulli.us> wrote:
> From: Thomas Graf <tgraf@...g.ch>
>
> Silences various sparse warnings
>
> Signed-off-by: Thomas Graf <tgraf@...g.ch>
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---
> new in v4
> ---
> drivers/net/ethernet/rocker/rocker.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
> index 30687bf..fded127 100644
> --- a/drivers/net/ethernet/rocker/rocker.c
> +++ b/drivers/net/ethernet/rocker/rocker.c
> @@ -2404,17 +2404,17 @@ static int rocker_flow_tbl_bridge(struct rocker_port *rocker_port,
> }
>
> priority = ROCKER_PRIORITY_UNKNOWN;
> - if (vlan_bridging & dflt & wild)
> + if (vlan_bridging && dflt && wild)
> priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_WILD;
> - else if (vlan_bridging & dflt & !wild)
> + else if (vlan_bridging && dflt && !wild)
> priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_EXACT;
> - else if (vlan_bridging & !dflt)
> + else if (vlan_bridging && !dflt)
> priority = ROCKER_PRIORITY_BRIDGING_VLAN;
> - else if (!vlan_bridging & dflt & wild)
> + else if (!vlan_bridging && dflt && wild)
> priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_WILD;
> - else if (!vlan_bridging & dflt & !wild)
> + else if (!vlan_bridging && dflt && !wild)
> priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_EXACT;
> - else if (!vlan_bridging & !dflt)
> + else if (!vlan_bridging && !dflt)
> priority = ROCKER_PRIORITY_BRIDGING_TENANT;
>
> entry->key.priority = priority;
> @@ -3010,9 +3010,9 @@ static void rocker_port_fdb_learn_work(struct work_struct *work)
> bool removing = (lw->flags & ROCKER_OP_FLAG_REMOVE);
> bool learned = (lw->flags & ROCKER_OP_FLAG_LEARNED);
>
> - if (learned & removing)
> + if (learned && removing)
> br_fdb_external_learn_del(lw->dev, lw->addr, lw->vid);
> - else if (learned & !removing)
> + else if (learned && !removing)
> br_fdb_external_learn_add(lw->dev, lw->addr, lw->vid);
>
> kfree(work);
> --
> 1.9.3
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists