[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45f6991d-1595-4ba1-956b-acfcbbdfe8de@web.de>
Date: Mon, 6 May 2024 17:50:19 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Duoming Zhou <duoming@....edu.cn>, linux-hams@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Jörg Reuter <jreuter@...na.de>,
Paolo Abeni <pabeni@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
Lars Kellogg-Stedman <lars@...bit.com>, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net v3 2/2] ax25: Change kfree() in ax25_dev_free() to
ax25_dev_put()
…
> Replace it with a ax25_dev_put() call instead.
…
> ---
> Changes in v3:
> - Make commit messages more clearer.
…
> +++ b/net/ax25/ax25_dev.c
> @@ -188,16 +188,13 @@ struct net_device *ax25_fwd_dev(struct net_device *dev)
> */
> void __exit ax25_dev_free(void)
> {
…
> - ax25_dev = ax25_dev_list;
> - while (ax25_dev != NULL) {
> - s = ax25_dev;
> - netdev_put(ax25_dev->dev, &ax25_dev->dev_tracker);
> - ax25_dev = ax25_dev->next;
> - kfree(s);
> + list_for_each_entry_safe(s, n, &ax25_dev_list, list) {
> + netdev_put(s->dev, &s->dev_tracker);
> + list_del(&s->list);
> + ax25_dev_put(s);
> }
> - ax25_dev_list = NULL;
…
Can the increased application of the Linux list API be offered as
a separate update step?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9-rc7#n81
Regards,
Markus
Powered by blists - more mailing lists