All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Fan Gong <gongfan1@huawei.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	guoxin09@huawei.com, kuba@kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, luosifu@huawei.com,
	luoyang82@h-partners.com, netdev@vger.kernel.org,
	pabeni@redhat.com, shijing34@huawei.com, wulike1@huawei.com,
	zhoushuai28@huawei.com, zhuyikai1@h-partners.com
Subject: Re: [PATCH net-next v02 2/4] hinic3: Remove redundant defensive code
Date: Wed, 28 Jan 2026 14:42:39 +0000	[thread overview]
Message-ID: <aXogX8UDfUpq05_d@horms.kernel.org> (raw)
In-Reply-To: <20260128065038.1381-1-gongfan1@huawei.com>

On Wed, Jan 28, 2026 at 02:50:37PM +0800, Fan Gong wrote:
> On 1/28/2026 12:25 AM, Simon Horman wrote:
> > On Mon, Jan 26, 2026 at 09:03:32AM +0800, Fan Gong wrote:
> >> According to comment of patch 03, check codes that were merged and
> >> remove redundant defensive codes.
> >>
> >> Co-developed-by: Zhu Yikai <zhuyikai1@h-partners.com>
> >> Signed-off-by: Zhu Yikai <zhuyikai1@h-partners.com>
> >> Signed-off-by: Fan Gong <gongfan1@huawei.com>
> >
> > Hi,
> >
> > I agree that defensive coding is unnecessary in Networking drivers.
> > But I'm unsure what "codes that were merged" and "patch 03" refers to.
> > Could you clarify this?
> >
> > Likewise in patch 3/4 of this series.
> >
> 
> Our negligence did not explain this clearly.
> 
> Patch 03 points to the mergeed patch "net: hinic3: Add a driver for Huawei 3rd
> gen NIC - sw and hw initialization".
> 
> "codes that were merged" means that we review the code already merged into
> Linux based on Jakub's review comments.
> https://lore.kernel.org/netdev/20250902180843.5ba05bf2@kernel.org/
> 
> At that time, "patch 03" could only modify the parts where the code was to be
> merged. Therefore, after we checked the previous codes ,the codes already
> merged are modified in this current patchset.

Thanks, and apologies if I still have this mixed up.
I'm wondering if the following commit message would make things clearer.

Subject: [PATCH net-next v3 2/4] hinic3: remove defensive txq_num check

Since commit 1f3838b84a63 ("hinic3: Add Rss function") nic_dev->num_txqs
cannot be zero in hinic3_alloc_txqs(). So remove the check for this case.

Link: https://lore.kernel.org/netdev/20250902180843.5ba05bf2@kernel.org/
Signed-off-by: ...

  reply	other threads:[~2026-01-28 14:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26  1:03 [PATCH net-next v02 0/4] net: hinic3: Fix code styles Fan Gong
2026-03-05 14:21 ` Fan Gong
2026-01-26  1:03 ` [PATCH net-next v02 1/4] hinic3: Fix code Style(remove empty lines between error handling) Fan Gong
2026-03-05 14:21   ` Fan Gong
2026-01-26  1:03 ` [PATCH net-next v02 2/4] hinic3: Remove redundant defensive code Fan Gong
2026-03-05 14:21   ` Fan Gong
2026-01-27 16:25   ` Simon Horman
2026-01-28  6:50     ` Fan Gong
2026-01-28 14:42       ` Simon Horman [this message]
2026-01-26  1:03 ` [PATCH net-next v02 3/4] hinic3: Use array_size instead of multiplying Fan Gong
2026-03-05 14:22   ` Fan Gong
2026-01-26  1:03 ` [PATCH net-next v02 4/4] hinic3: RQ use RQ_CTXT_PREF_CI_HI instead of SQ_CTXT_PREF_CI_HI Fan Gong
2026-03-05 14:22   ` Fan Gong

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=aXogX8UDfUpq05_d@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gongfan1@huawei.com \
    --cc=guoxin09@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luosifu@huawei.com \
    --cc=luoyang82@h-partners.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shijing34@huawei.com \
    --cc=wulike1@huawei.com \
    --cc=zhoushuai28@huawei.com \
    --cc=zhuyikai1@h-partners.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.