From: Petr Machata <petrm@nvidia.com>
To: Simon Horman <horms@kernel.org>
Cc: Dennis Chen <dechen@redhat.com>, <netdev@vger.kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, <linux-kernel@vger.kernel.org>,
Petr Machata <petrm@nvidia.com>
Subject: Re: [PATCH] netdevsim: remove redundant branch
Date: Thu, 17 Jul 2025 15:21:11 +0200 [thread overview]
Message-ID: <87qzyfc5f0.fsf@nvidia.com> (raw)
In-Reply-To: <20250717115606.GA27043@horms.kernel.org>
Simon Horman <horms@kernel.org> writes:
> On Wed, Jul 16, 2025 at 12:57:50PM -0400, Dennis Chen wrote:
>> bool notify is referenced nowhere else in the function except to check
>> whether or not to call rtnl_offload_xstats_notify(). Remove it and move
>> the call to the previous branch.
>>
>> Signed-off-by: Dennis Chen <dechen@redhat.com>
>> ---
>> drivers/net/netdevsim/hwstats.c | 5 +----
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> Thanks Dennis,
>
> This looks like a nice clean-up to me.
>
> I guess this is an artefact of the development of this code as this pattern
> has been present since the code was added by Petr Machata (CCed) in
> commit 1a6d7ae7d63c ("netdevsim: Introduce support for L3 offload xstats").
>
> Reviewed-by: Simon Horman <horms@kernel.org>
Thanks for the CC!
There was some locking / cleanup business originally that necessitated
the variable. That went away during internal review, but this was left
behind. I agree it can be cleaned up.
Reviewed-by: Petr Machata <petrm@nvidia.com>
next prev parent reply other threads:[~2025-07-17 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 16:57 Dennis Chen
2025-07-17 11:56 ` Simon Horman
2025-07-17 13:21 ` Petr Machata [this message]
2025-07-18 1:20 ` 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=87qzyfc5f0.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dechen@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®