Re: [PATCH net v6 1/3] ax25: Use kernel universal linked list to implement ax25_dev_list
From: Ratheesh Kannoth
Date: Wed May 08 2024 - 23:13:19 EST
On 2024-05-09 at 07:26:12, Duoming Zhou (duoming@xxxxxxxxxx) wrote:
> 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);
>