Subject: Re: [PATCH net-next 2/9] hinic3: Add PF management interfaces

From: Simon Horman <[email-masked]>
Date: Wed, 15 Oct 2025 17:46:40 +0100

On Wed, Oct 15, 2025 at 12:00:33PM +0200, Markus Elfring wrote:
> > To: Fan Gong …
> 
> Please reconsider the distribution of recipient information between message fields
> once more.
> 
> 
> …
> > +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_mgmt.c
> > @@ -3,19 +3,325 @@
> …
> > +static void mgmt_resp_msg_handler(struct hinic3_msg_pf_to_mgmt *pf_to_mgmt,
> > +				  struct hinic3_recv_msg *recv_msg)
> > +{
> …
> > +	spin_lock(&pf_to_mgmt->sync_event_lock);
> > +	if (recv_msg->msg_id != pf_to_mgmt->sync_msg_id) {
> …
> > +	}
> > +	spin_unlock(&pf_to_mgmt->sync_event_lock);
> > +}
> …
> 
> Will development interests grow to apply a call like “scoped_guard(spinlock, &pf_to_mgmt->sync_event_lock)”?
> https://elixir.bootlin.com/linux/v6.17.1/source/include/linux/spinlock.h#L565-L567

Hi Markus, all.

It's up to the developer. But there is a still a weak preference
for open-coding, as is done above, in Networking code. So in the
absence of some other motivation (I have not reviewed this code)
I would suggest leaving this as-is.

https://docs.kernel.org/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs