Subject: Re: [PATCH net 01/15] docs: net: dsa: update probing documentation

From: Florian Fainelli <[email-masked]>
Date: Sun, 17 Jul 2022 09:56:47 -0700

On 7/17/2022 8:14 AM, Andrew Lunn wrote:
> Hi Vladimir
> 
>> +Switch registration from the perspective of a driver means passing a valid
>> +``struct dsa_switch`` pointer to ``dsa_register_switch()``, usually from the
>> +switch driver's probing function. The following members must be valid in the
>> +provided structure:
> 
>> +
>> +- ``ds->priv``: backpointer to a driver-private data structure which can be
>> +  retrieved in all further DSA method callbacks.
> 
> I'm not sure this is strictly true. The DSA core itself should not use
> ds->priv. And the driver could use other means, like
> dev_get_platdata(ds->dev->pdev) to get at is private data. But in
> practice it is true.

The former is a tad more compact and "usual" when DSA already provides a 
driver model IMHO.
-- 
Florian