Thread (5 messages) 5 messages, 2 authors, 2024-05-09

Re: [PATCH net v6 1/3] ax25: Use kernel universal linked list to implement ax25_dev_list

From: Ratheesh Kannoth <rkannoth@marvell.com>
Date: 2024-05-09 03:13:09
Also in: linux-hams, lkml

On 2024-05-09 at 07:26:12, Duoming Zhou (duoming@zju.edu.cn) wrote:
quoted hunk ↗ jump to hunk
 		if (ax25cmp(addr, (const ax25_address *)ax25_dev->dev->dev_addr) == 0) {
 			res = ax25_dev;
 			ax25_dev_hold(ax25_dev);
@@ -52,6 +53,9 @@ void ax25_dev_device_up(struct net_device *dev)
 {
 	ax25_dev *ax25_dev;

+	/* Initialized the list for the first entry */
+	if (!ax25_dev_list.next)
will there be any case where this condition is true ? LIST_HEAD() or list_del() will never
make this condition true.
+		INIT_LIST_HEAD(&ax25_dev_list);
 	ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_KERNEL);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help