Thread (18 messages) 18 messages, 5 authors, 2025-10-27

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

From: Simon Horman <horms@kernel.org>
Date: 2025-10-15 16:46:47
Also in: linux-doc, lkml

On Wed, Oct 15, 2025 at 12:00:33PM +0200, Markus Elfring wrote:
quoted
To: Fan Gong …
Please reconsider the distribution of recipient information between message fields
once more.


…
quoted
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_mgmt.c
@@ -3,19 +3,325 @@
quoted
+static void mgmt_resp_msg_handler(struct hinic3_msg_pf_to_mgmt *pf_to_mgmt,
+				  struct hinic3_recv_msg *recv_msg)
+{
quoted
+	spin_lock(&pf_to_mgmt->sync_event_lock);
+	if (recv_msg->msg_id != pf_to_mgmt->sync_msg_id) {
quoted
+	}
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help