RE: [PATCH net-next 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-19 Thread David Laight
> >>> +#define b53_build_op(type, op_size, val_type)\ > >>> +static inline int b53_##type##op_size(struct b53_device *dev, u8 > >page,\ > >>> + u8 reg, val_type val) > >>> \ > >>> +{

RE: [PATCH net-next 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-19 Thread Florian Fainelli
On September 19, 2017 7:19:35 AM PDT, Vivien Didelot wrote: >Hi David, > >David Laight writes: > >> From: Florian Fainelli >>> Sent: 18 September 2017 22:41 >>> Instead of repeating the same pattern: acquire mutex, read/write,

RE: [PATCH net-next 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-19 Thread Vivien Didelot
Hi David, David Laight writes: > From: Florian Fainelli >> Sent: 18 September 2017 22:41 >> Instead of repeating the same pattern: acquire mutex, read/write, release >> mutex, define a macro: b53_build_op() which takes the type (read|write), I/O >> size, and value

RE: [PATCH net-next 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-19 Thread David Laight
From: Florian Fainelli > Sent: 18 September 2017 22:41 > Instead of repeating the same pattern: acquire mutex, read/write, release > mutex, define a macro: b53_build_op() which takes the type (read|write), I/O > size, and value (scalar or pointer). This helps with fixing bugs that could > exit

Re: [PATCH net-next 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-18 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Instead of repeating the same pattern: acquire mutex, read/write, release > mutex, define a macro: b53_build_op() which takes the type (read|write), I/O > size, and value (scalar or pointer). This helps with fixing bugs that could >