[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230113221813.35ebfb6a@kernel.org>
Date: Fri, 13 Jan 2023 22:18:13 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Dan Carpenter <error27@...il.com>
Cc: Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next] devlink: remove some unnecessary code
On Fri, 13 Jan 2023 10:35:43 +0300 Dan Carpenter wrote:
> This code checks if (attrs[DEVLINK_ATTR_TRAP_POLICER_ID]) twice. Once
> at the start of the function and then a couple lines later. Delete the
> second check since that one must be true.
>
> Because the second condition is always true, it means the:
>
> policer_item = group_item->policer_item;
>
> assignment is immediately over-written. Delete that as well.
>
> Signed-off-by: Dan Carpenter <error27@...il.com>
Acked-by: Jakub Kicinski <kuba@...nel.org>
Powered by blists - more mailing lists