Re: [PATCH net-next 06/15] dsa: Remove const from tag driver ops structure

2019-04-19 Thread Florian Fainelli
On 4/18/2019 2:47 PM, Andrew Lunn wrote: > On Thu, Apr 18, 2019 at 10:58:46AM -0700, Florian Fainelli wrote: >> >> >> On 4/17/2019 7:31 PM, Andrew Lunn wrote: >>> A later patch will create a linked list of tag driver ops structures, >>> using a list_head in the structure. So the structure cannot

Re: [PATCH net-next 06/15] dsa: Remove const from tag driver ops structure

2019-04-18 Thread Andrew Lunn
On Thu, Apr 18, 2019 at 10:58:46AM -0700, Florian Fainelli wrote: > > > On 4/17/2019 7:31 PM, Andrew Lunn wrote: > > A later patch will create a linked list of tag driver ops structures, > > using a list_head in the structure. So the structure cannot be const. > > Can't we encapsulate the existi

Re: [PATCH net-next 06/15] dsa: Remove const from tag driver ops structure

2019-04-18 Thread Florian Fainelli
On 4/17/2019 7:31 PM, Andrew Lunn wrote: > A later patch will create a linked list of tag driver ops structures, > using a list_head in the structure. So the structure cannot be const. Can't we encapsulate the existing dsa_device_ops, while leaving them const into another structure which is not

[PATCH net-next 06/15] dsa: Remove const from tag driver ops structure

2019-04-17 Thread Andrew Lunn
A later patch will create a linked list of tag driver ops structures, using a list_head in the structure. So the structure cannot be const. Signed-off-by: Andrew Lunn --- net/dsa/dsa.c | 2 +- net/dsa/dsa_priv.h| 22 +++--- net/dsa/tag_brcm.c| 4 ++-- net/dsa/ta