From: Jacob Keller <jacob.e.keller@intel.com>
To: Thinh Tran <thinhtr@linux.vnet.ibm.com>, <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<manishc@marvell.com>, <pabeni@redhat.com>,
<skalluru@marvell.com>, <simon.horman@corigine.com>,
<edumazet@google.com>, <VENKATA.SAI.DUGGI@ibm.com>,
<drc@linux.vnet.ibm.com>, <abdhalee@in.ibm.com>
Subject: Re: [PATCH v10 2/2] net/bnx2x: refactor common code to bnx2x_stop_nic()
Date: Wed, 14 Feb 2024 12:50:47 -0800 [thread overview]
Message-ID: <680bd25a-8bf1-4af6-b2bb-e5a11daf287d@intel.com> (raw)
In-Reply-To: <14a696d7a05fa0f738281db459d1862a756ea15c.1707848297.git.thinhtr@linux.vnet.ibm.com>
On 2/13/2024 10:32 AM, Thinh Tran wrote:
> Refactor common code which disables and releases HW interrupts, deletes
> NAPI objects, into a new bnx2x_stop_nic() function.
>
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
>
Good cleanup.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> +void bnx2x_stop_nic(struct bnx2x *bp, int disable_hw)
> +{
> + if (!bp->nic_stopped) {
> + /* Disable HW interrupts, NAPI */
> + bnx2x_netif_stop(bp, disable_hw);
> + /* Delete all NAPI objects */
> + bnx2x_del_all_napi(bp);
> + if (CNIC_LOADED(bp))
> + bnx2x_del_all_napi_cnic(bp);
> + /* Release IRQs */
> + bnx2x_free_irq(bp);
> + bp->nic_stopped = true;
> + }
> +}
IMHO this could be an early return:
if (bp->nic_stopped)
return;
That is a bit of a nitpick and the existing code (by necessity of not
being a function) used this style.
next prev parent reply other threads:[~2024-02-14 20:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 18:32 [PATCH v10 0/2] bnx2x: Fix error recovering in switch configuration Thinh Tran
2024-02-13 18:32 ` [PATCH v10 1/2] net/bnx2x: Prevent access to a freed page in page_pool Thinh Tran
2024-02-14 20:47 ` Jacob Keller
2024-03-06 21:13 ` Thinh Tran
2024-02-13 18:32 ` [PATCH v10 2/2] net/bnx2x: refactor common code to bnx2x_stop_nic() Thinh Tran
2024-02-14 20:50 ` Jacob Keller [this message]
2024-02-15 16:17 ` Thinh Tran
2024-02-14 20:48 ` [PATCH v10 0/2] bnx2x: Fix error recovering in switch configuration Jacob Keller
2024-02-15 16:08 ` Thinh Tran
2024-02-15 17:29 ` Jacob Keller
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=680bd25a-8bf1-4af6-b2bb-e5a11daf287d@intel.com \
--to=jacob.e.keller@intel.com \
--cc=VENKATA.SAI.DUGGI@ibm.com \
--cc=abdhalee@in.ibm.com \
--cc=davem@davemloft.net \
--cc=drc@linux.vnet.ibm.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=skalluru@marvell.com \
--cc=thinhtr@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.