linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Kellogg-Stedman <lars@oddbit.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Duoming Zhou <duoming@zju.edu.cn>,
	linux-hams@vger.kernel.org,  jreuter@yaina.de
Subject: Re: [PATCH net v5 1/4] ax25: Use kernel universal linked list to implement ax25_dev_list
Date: Wed, 8 May 2024 10:31:24 -0400	[thread overview]
Message-ID: <5o3kmbi6sq3c36a2qufxcii7si6qbmbinplqwugncvzcqpuk33@jvrftug6332q> (raw)
In-Reply-To: <e4751c30-b950-411b-aeab-5259915f649e@moroto.mountain>

On Wed, May 08, 2024 at 12:26:59PM GMT, Dan Carpenter wrote:
> Let's drop all the other netdev people from the CC list.
> 
> On Tue, May 07, 2024 at 07:46:51PM -0400, Lars Kellogg-Stedman wrote:
> > On Tue, May 07, 2024 at 03:43:11PM GMT, Lars Kellogg-Stedman wrote:
> > > On Tue, May 07, 2024 at 03:03:39PM GMT, Duoming Zhou wrote:
> > > >  typedef struct ax25_dev {
> > > > -	struct ax25_dev		*next;
> > > > +	struct list_head	list;
> > > 
> > > Would it make sense to replace this with:
> > >
> > > LIST_HEAD(ax25_dev_list);
> > 
> > Sorry, *this*:
> > 
> > > +static struct list_head ax25_dev_list;
> 
> I'm not sure I understand.  The code is correct though...

I was suggested using:

    LIST_HEAD(list_name);

Rather than:

    static struct list_head list_name;

...and then later on initializing the list using
INIT_LIST_HEAD(list_name).

There's not really a functional difference, but using LIST_HEAD saves us
a couple of extra lines of initialization code.

-- 
Lars Kellogg-Stedman <lars@oddbit.com> | larsks @ {irc,twitter,github}
http://blog.oddbit.com/                | N1LKS

  reply	other threads:[~2024-05-08 14:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  7:03 [PATCH net v5 0/4] ax25: Fix issues of ax25_dev and net_device Duoming Zhou
2024-05-07  7:03 ` [PATCH net v5 1/4] ax25: Use kernel universal linked list to implement ax25_dev_list Duoming Zhou
2024-05-07  8:48   ` Markus Elfring
2024-05-07  9:29   ` Ratheesh Kannoth
2024-05-07  9:52     ` Dan Carpenter
2024-05-07 19:43   ` Lars Kellogg-Stedman
2024-05-07 23:46     ` Lars Kellogg-Stedman
2024-05-08  9:26       ` Dan Carpenter
2024-05-08 14:31         ` Lars Kellogg-Stedman [this message]
2024-05-07  7:03 ` [PATCH net v5 2/4] ax25: Fix reference count leak issues of ax25_dev Duoming Zhou
2024-05-07  9:12   ` Markus Elfring
2024-05-07  7:03 ` [PATCH net v5 3/4] ax25: Fix reference count leak issues of net_device Duoming Zhou
2024-05-07  9:25   ` Markus Elfring
2024-05-07  7:03 ` [PATCH net v5 4/4] ax25: Change kfree() in ax25_dev_free() to ax25_dev_put() Duoming Zhou
2024-05-07  9:42   ` Markus Elfring
2024-05-07 14:13   ` Ratheesh Kannoth
2024-05-08 12:30     ` Dan Carpenter
2024-05-07 10:00 ` [PATCH net v5 0/4] ax25: Fix issues of ax25_dev and net_device Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5o3kmbi6sq3c36a2qufxcii7si6qbmbinplqwugncvzcqpuk33@jvrftug6332q \
    --to=lars@oddbit.com \
    --cc=dan.carpenter@linaro.org \
    --cc=duoming@zju.edu.cn \
    --cc=jreuter@yaina.de \
    --cc=linux-hams@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).