Re: [net-next PATCH v3 2/3] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver

From: Andrew Lunn
Date: Thu Nov 07 2024 - 14:37:02 EST


> > +enum an8855_stp_state {
> > + AN8855_STP_DISABLED = 0,
> > + AN8855_STP_BLOCKING = 1,
> > + AN8855_STP_LISTENING = 1,
>
> Just wondering if this 0, 1, *1*, 2, 3 was intentional?

There are some devices which don't differentiate between blocking and
listening. If this is true, then maybe:

+enum an8855_stp_state {
+ AN8855_STP_DISABLED = 0,
+ AN8855_STP_BLOCKING = 1,
+ AN8855_STP_LISTENING = AN8855_STP_BLOCKING,

Which saves a comment.

Andrew