Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-03 Thread Andrew Lunn
> Related question: If the driver does dsa_switch_alloc(3), can it then > trust that all "port" params passed in DSA methods will be between > 0 and 2? Yes. Andrew

Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-03 Thread Egil Hjelmeland
On 01. aug. 2017 15:27, Andrew Lunn wrote: On Tue, Aug 01, 2017 at 02:31:44PM +0200, Egil Hjelmeland wrote: On 01. aug. 2017 13:49, Juergen Borleis wrote: Hi Egil, On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote: Will be used instead of '3' in upcomming patches. +#define LAN9303_NU

Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-01 Thread Egil Hjelmeland
On 01. aug. 2017 15:27, Andrew Lunn wrote: On Tue, Aug 01, 2017 at 02:31:44PM +0200, Egil Hjelmeland wrote: On 01. aug. 2017 13:49, Juergen Borleis wrote: Hi Egil, On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote: Will be used instead of '3' in upcomming patches. +#define LAN9303_NU

Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-01 Thread Andrew Lunn
On Tue, Aug 01, 2017 at 02:31:44PM +0200, Egil Hjelmeland wrote: > On 01. aug. 2017 13:49, Juergen Borleis wrote: > >Hi Egil, > > > >On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote: > >>Will be used instead of '3' in upcomming patches. > >> > >> > >>+#define LAN9303_NUM_PORTS 3 > >>+ > > >

Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-01 Thread Egil Hjelmeland
On 01. aug. 2017 13:49, Juergen Borleis wrote: Hi Egil, On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote: Will be used instead of '3' in upcomming patches. +#define LAN9303_NUM_PORTS 3 + Maybe we should put this macro into a shared location because in "net/dsa/tag_lan9303.c" there i

Re: [PATCH v2 net-next 2/3] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-01 Thread Juergen Borleis
Hi Egil, On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote: > Will be used instead of '3' in upcomming patches. > > Signed-off-by: Egil Hjelmeland > --- > drivers/net/dsa/lan9303-core.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/dsa/lan9303-core.c > b/drivers/n