Re: [PATCH 1/3] kernel/srcu: merge common code into a macro

2013-04-08 Thread Sebastian Andrzej Siewior
On 04/05/2013 09:21 AM, Lai Jiangshan wrote: > Hi, Sebastian Hi Lai, > The patch hurts readability. > The original code are simple enough, merging them as one macro > gives us no benefit. Except when you need to adjust the macro and you have to touch both of them instead just one. But I don't ha

Re: [PATCH 1/3] kernel/srcu: merge common code into a macro

2013-04-05 Thread Lai Jiangshan
On 03/19/2013 10:16 PM, Sebastian Andrzej Siewior wrote: > DEFINE_SRCU() and DEFINE_STATIC_SRCU() does the same thing except for > the "static" attribute. This patch moves the common pieces into > _DEFINE_SRCU() which is used by the the former macros either adding the > static attribute or not. >

Re: [PATCH 1/3] kernel/srcu: merge common code into a macro

2013-03-19 Thread Sebastian Andrzej Siewior
On 03/19/2013 05:22 PM, Joe Perches wrote: >> +#define DEFINE_SRCU(name) _DEFINE_SRCU(name, ) >> +#define DEFINE_STATIC_SRCU(name)_DEFINE_SRCU(name, static) > > I think the use of an empty argument, even in > a macro, unsightly. __wait_event_lock_irq() => __wait_event_lock_irq() is

Re: [PATCH 1/3] kernel/srcu: merge common code into a macro

2013-03-19 Thread Joe Perches
On Tue, 2013-03-19 at 15:16 +0100, Sebastian Andrzej Siewior wrote: > DEFINE_SRCU() and DEFINE_STATIC_SRCU() does the same thing except for > the "static" attribute. This patch moves the common pieces into > _DEFINE_SRCU() which is used by the the former macros either adding the > static attribute

[PATCH 1/3] kernel/srcu: merge common code into a macro

2013-03-19 Thread Sebastian Andrzej Siewior
DEFINE_SRCU() and DEFINE_STATIC_SRCU() does the same thing except for the "static" attribute. This patch moves the common pieces into _DEFINE_SRCU() which is used by the the former macros either adding the static attribute or not. Signed-off-by: Sebastian Andrzej Siewior --- include/linux/srcu.h