[PATCH net-next v2] net/hsr: update outdated comments

Kexin Sun posted 1 patch 1 month, 1 week ago
net/hsr/hsr_device.c   | 2 +-
net/hsr/hsr_framereg.c | 4 ++--
net/hsr/hsr_main.c     | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
[PATCH net-next v2] net/hsr: update outdated comments
Posted by Kexin Sun 1 month, 1 week ago
The function hsr_rcv() was renamed hsr_handle_frame() and moved to
net/hsr/hsr_slave.c by commit 81ba6afd6e64 ("net/hsr: Switch from
dev_add_pack() to netdev_rx_handler_register()").

Update all remaining references in the comments accordingly.

Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
---
Hi Simon,

Regarding your question about how these were found: we are building a 
research prototype for identifying and fixing dangling method references 
in comments. Generally, we use Coccinelle to check for dangling references 
and DeepSeek-V3.2 to generate the fixes. 

Since it is still a work-in-progress, we haven't settled on a proper tool 
name yet. Therefore, I chose to omit the `Assisted-by:` tag in this v2 
patch for now. Do you have any suggestions on what would be appropriate 
to use in this situation?

 net/hsr/hsr_device.c   | 2 +-
 net/hsr/hsr_framereg.c | 4 ++--
 net/hsr/hsr_main.c     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index d1bfc49b5f01..5c3eca2235ce 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -742,7 +742,7 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
 		hsr->proto_ops = &hsr_ops;
 	}
 
-	/* Make sure we recognize frames from ourselves in hsr_rcv() */
+	/* Make sure we recognize frames from ourselves in hsr_handle_frame() */
 	res = hsr_create_self_node(hsr, hsr_dev->dev_addr,
 				   slave[1]->dev_addr);
 	if (res < 0)
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index 50996f4de7f9..577fb588bc2f 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -71,8 +71,8 @@ bool hsr_is_node_in_db(struct list_head *node_db,
 	return !!find_node_by_addr_A(node_db, addr);
 }
 
-/* Helper for device init; the self_node is used in hsr_rcv() to recognize
- * frames from self that's been looped over the HSR ring.
+/* Helper for device init; the self_node is used in hsr_handle_frame() to
+ * recognize frames from self that's been looped over the HSR ring.
  */
 int hsr_create_self_node(struct hsr_priv *hsr,
 			 const unsigned char addr_a[ETH_ALEN],
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c
index bc94b07101d8..33951d9bd3c5 100644
--- a/net/hsr/hsr_main.c
+++ b/net/hsr/hsr_main.c
@@ -89,7 +89,7 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
 			}
 		}
 
-		/* Make sure we recognize frames from ourselves in hsr_rcv() */
+		/* Make sure we recognize frames from ourselves in hsr_handle_frame() */
 		port = hsr_port_get_hsr(hsr, HSR_PT_SLAVE_B);
 		res = hsr_create_self_node(hsr,
 					   master->dev->dev_addr,
-- 
2.25.1
Re: [PATCH net-next v2] net/hsr: update outdated comments
Posted by Simon Horman 1 month, 1 week ago
On Wed, Feb 25, 2026 at 10:51:59PM +0800, Kexin Sun wrote:
> The function hsr_rcv() was renamed hsr_handle_frame() and moved to
> net/hsr/hsr_slave.c by commit 81ba6afd6e64 ("net/hsr: Switch from
> dev_add_pack() to netdev_rx_handler_register()").
> 
> Update all remaining references in the comments accordingly.
> 
> Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
> ---
> Hi Simon,
> 
> Regarding your question about how these were found: we are building a 
> research prototype for identifying and fixing dangling method references 
> in comments. Generally, we use Coccinelle to check for dangling references 
> and DeepSeek-V3.2 to generate the fixes. 
> 
> Since it is still a work-in-progress, we haven't settled on a proper tool 
> name yet. Therefore, I chose to omit the `Assisted-by:` tag in this v2 
> patch for now. Do you have any suggestions on what would be appropriate 
> to use in this situation?

Hi Kexin,

I think many people are experimenting.
And likewise, the use of Assisted-by is evolving.

My reading of [1] is that an Assisted-by tag is appropriate here.
I would suggest:

Assisted-by: deepseek-v3.2 coccinelle

or

Assisted-by: unnamed:deepseek-v3.2 coccinelle

[1] https://docs.kernel.org/process/coding-assistants.html


Overall, this now looks good to me.
Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>