[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8EPdjD3bXXp0M2Q@nanopsycho>
Date: Fri, 13 Jan 2023 08:59:50 +0100
From: Jiri Pirko <jiri@...nulli.us>
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>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next] devlink: remove some unnecessary code
Fri, Jan 13, 2023 at 08:35:43AM CET, error27@...il.com 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>
Reviewed-by: Jiri Pirko <jiri@...dia.com>
Powered by blists - more mailing lists