lkml.org 
[lkml]   [2019]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric
On Mon, 21 Oct 2019 14:37:40 +0200, Andrew Lunn <andrew@lunn.ch> wrote:
> > +static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index)
> > +{
> > + struct dsa_switch_tree *dst = ds->dst;
> > + struct dsa_port *dp;
> > +
> > + dp = &ds->ports[index];
> > +
> > + dp->ds = ds;
> > + dp->index = index;
> > +
> > + INIT_LIST_HEAD(&dp->list);
> > + list_add(&dp->list, &dst->ports);
> > +
> > + return dp;
> > +}
>
> Bike shedding, but i don't particularly like the name touch. How
> about list. The opposite would then be delist, if we ever need it?

The fabric code uses "touch" for "get or create" already, so I used the same
semantics for ports as well. But I'm not strongly attached to this naming
anyway, so I will polish them all together in a future series.


Thanks,
Vivien

\
 
 \ /
  Last update: 2019-10-21 22:01    [W:0.188 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site