Marek Behún
> Sent: Friday, November 6, 2020 2:40 PM
[...]
> Hi Hayes,
>
> just to be clear:
> Are you against defining these functions via macros?
> If so, I can simply rewrite this so that it does not use macros...
I would like the way which let me find the source of the
function easily. I don
On Fri, 6 Nov 2020 03:01:22 +
Hayes Wang wrote:
> Vladimir Oltean
> > Sent: Thursday, November 5, 2020 6:57 PM
> > On Thu, Nov 05, 2020 at 10:54:18AM +0100, Marek Behún wrote:
> > > I thought that static inline functions are preferred to macros, since
> > > compiler warns better if they ar
Vladimir Oltean
> Sent: Thursday, November 5, 2020 6:57 PM
> On Thu, Nov 05, 2020 at 10:54:18AM +0100, Marek Behún wrote:
> > I thought that static inline functions are preferred to macros, since
> > compiler warns better if they are used incorrectly...
>
> Citation needed. Also, how do static in
On Thu, Nov 05, 2020 at 12:30:43PM +0100, Marek Behún wrote:
> On Thu, 5 Nov 2020 12:56:42 +0200
> Vladimir Oltean wrote:
>
> > On Thu, Nov 05, 2020 at 10:54:18AM +0100, Marek Behún wrote:
> > > I thought that static inline functions are preferred to macros, since
> > > compiler warns better if th
On Thu, 5 Nov 2020 12:56:42 +0200
Vladimir Oltean wrote:
> On Thu, Nov 05, 2020 at 10:54:18AM +0100, Marek Behún wrote:
> > I thought that static inline functions are preferred to macros, since
> > compiler warns better if they are used incorrectly...
>
> Citation needed.
Just search for subs
On Thu, Nov 05, 2020 at 10:54:18AM +0100, Marek Behún wrote:
> I thought that static inline functions are preferred to macros, since
> compiler warns better if they are used incorrectly...
Citation needed. Also, how do static inline functions wrapped in macros
(i.e. your patch) stack up against yo
On Wed, 4 Nov 2020 14:14:24 +0200
Vladimir Oltean wrote:
> On Wed, Nov 04, 2020 at 12:10:53PM +0100, Marek Behún wrote:
> > > I'm not sure it's worth the change :(
> > > Let's put it another way, your diffstat has 338 insertions and 335
> > > deletions. Aka you're saving 3 lines overall.
> > > Wi
On Wed, 4 Nov 2020 14:14:24 +0200 Vladimir Oltean wrote:
> To my eyes this is easier to digest.
+1
On Wed, Nov 04, 2020 at 12:10:53PM +0100, Marek Behún wrote:
> > I'm not sure it's worth the change :(
> > Let's put it another way, your diffstat has 338 insertions and 335
> > deletions. Aka you're saving 3 lines overall.
> > With this new approach that doesn't use token concatenation at all,
> >
On Wed, 4 Nov 2020 13:00:59 +0200
Vladimir Oltean wrote:
> On Wed, Nov 04, 2020 at 11:35:45AM +0100, Marek Behún wrote:
> > Or something like this?
> >
> > #define DEF_R_FUNC(_t, _r, _r_i, _mcu) \
> > static inline _t _r(struct r8152 *tp, u16 index)\
> >
On Wed, Nov 04, 2020 at 11:35:45AM +0100, Marek Behún wrote:
> Or something like this?
>
> #define DEF_R_FUNC(_t, _r, _r_i, _mcu)\
> static inline _t _r(struct r8152 *tp, u16 index) \
> { \
>
Or something like this?
#define DEF_R_FUNC(_t, _r, _r_i, _mcu) \
static inline _t _r(struct r8152 *tp, u16 index)\
{ \
return _r_i(tp, _mcu, index); \
}
#define
On Wed, 4 Nov 2020 10:47:10 +0200
Vladimir Oltean wrote:
> > So you aren't complaining about the definition of pla_ and usb_
> > functions, just that they are defined via macros?
>
> Yes.
What if concatenation wasn't used, but the functions were still defined
with macro?
DEFINE_READ_FUNC(pla
On Wed, Nov 04, 2020 at 06:55:24AM +0100, Marek Behún wrote:
> On Tue, 3 Nov 2020 23:47:12 +0200
> Vladimir Oltean wrote:
>
> > On Tue, Nov 03, 2020 at 08:22:24PM +0100, Marek Behún wrote:
> > > Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_*
> > > functions. This saves us from
On Tue, 3 Nov 2020 23:47:12 +0200
Vladimir Oltean wrote:
> On Tue, Nov 03, 2020 at 08:22:24PM +0100, Marek Behún wrote:
> > Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_*
> > functions. This saves us from always writing MCU_TYPE_PLA/MCU_TYPE_USB
> > as parameter.
> >
> > Signe
On Tue, Nov 03, 2020 at 08:22:24PM +0100, Marek Behún wrote:
> Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_*
> functions. This saves us from always writing MCU_TYPE_PLA/MCU_TYPE_USB
> as parameter.
>
> Signed-off-by: Marek Behún
> ---
You just made it harder for everyone to f
Add pla_ and usb_ prefixed versions of ocp_read_* and ocp_write_*
functions. This saves us from always writing MCU_TYPE_PLA/MCU_TYPE_USB
as parameter.
Signed-off-by: Marek Behún
---
drivers/net/usb/r8152.c | 673
1 file changed, 338 insertions(+), 335 del
17 matches
Mail list logo