[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151005152451.GL2278@nanopsycho.orion>
Date: Mon, 5 Oct 2015 17:24:51 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: David Laight <David.Laight@...LAB.COM>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"sfeldma@...il.com" <sfeldma@...il.com>,
"idosch@...lanox.com" <idosch@...lanox.com>,
"eladr@...lanox.com" <eladr@...lanox.com>,
"tgraf@...g.ch" <tgraf@...g.ch>,
"ast@...mgrid.com" <ast@...mgrid.com>
Subject: Re: [patch net-next 10/14] rocker: pass "learning" value as a
parameter to rocker_port_set_learning
Mon, Oct 05, 2015 at 05:16:31PM CEST, David.Laight@...LAB.COM wrote:
>From: Jiri Pirko
>> Sent: 04 October 2015 22:26
>> Be consistent with the rest of the setting functions, and pass
>> "learning" as a bool function parameter.
>...
>> diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
>> index fb7e8c2..d9329a7 100644
>> --- a/drivers/net/ethernet/rocker/rocker_main.c
>> +++ b/drivers/net/ethernet/rocker/rocker_main.c
>> @@ -1634,6 +1634,7 @@ rocker_cmd_set_port_learning_prep(const struct rocker_port *rocker_port,
>> struct rocker_desc_info *desc_info,
>> void *priv)
>> {
>> + bool learning = *(int *)priv;
>...
>> static int rocker_port_set_learning(struct rocker_port *rocker_port,
>> - struct switchdev_trans *trans)
>> + struct switchdev_trans *trans,
>> + bool learning)
>> {
>> return rocker_cmd_exec(rocker_port, trans, 0,
>> rocker_cmd_set_port_learning_prep,
>> - NULL, NULL, NULL);
>> + &learning, NULL, NULL);
>
>This hit my 'casting between integer pointer types' bell.
>It is clearly wrong if 'sizeof (bool) != sizeof (int)'.
Oh, I c&p error - I'll fix "bool learning = *(int *)priv;" to:
"bool learning = *(bool *)priv;"
--
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