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 existing dsa_device_ops, while leaving them
> const into another structure which is not const? Similar to how we did
> with the dsa_switch_driver structure?

Hi Florian

I was trying to keep it KISS, no dynamic memory allocation.

But i can make it more complex. For a tag driver with a single set of
ops, i can probably hide it all in the boiler plate, and make it all
static memory. For tag_brcm.c and tag_ksz.c, which have two ops
structures, i'm not sure i can hide it all.

I will think about it.

        Andrew

Reply via email to