From: Jiri Pirko <jiri@resnulli.us>
To: Dan Carpenter <error27@gmail.com>
Cc: Ido Schimmel <idosch@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net-next] devlink: remove some unnecessary code
Date: Fri, 13 Jan 2023 08:59:50 +0100 [thread overview]
Message-ID: <Y8EPdjD3bXXp0M2Q@nanopsycho> (raw)
In-Reply-To: <Y8EJz8oxpMhfiPUb@kili>
Fri, Jan 13, 2023 at 08:35:43AM CET, error27@gmail.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@gmail.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
next prev parent reply other threads:[~2023-01-13 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 7:35 [PATCH net-next] devlink: remove some unnecessary code Dan Carpenter
2023-01-13 7:59 ` Jiri Pirko [this message]
2023-01-14 6:18 ` Jakub Kicinski
2023-01-14 15:32 ` Ido Schimmel
2023-01-17 9:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y8EPdjD3bXXp0M2Q@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).