Re: [PATCH] decnet: remove macro-local declarations

2015-11-07 Thread Julia Lawall
On Sat, 7 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Fri, 6 Nov 2015 11:57:34 +0100 (CET) > > >> > Would it be preferable to remove the macro entirely and inline the for > >> > loop header? > >> > >> Could you show me an example of how this would look exactly? > > > > One poss

Re: [PATCH] decnet: remove macro-local declarations

2015-11-07 Thread David Miller
From: Julia Lawall Date: Fri, 6 Nov 2015 11:57:34 +0100 (CET) >> > Would it be preferable to remove the macro entirely and inline the for >> > loop header? >> >> Could you show me an example of how this would look exactly? > > One possible solution is below. I moved the initialization of the nh

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread walter harms
+1 I like this more since it is much more obvious what is done. more over we can remove a macro with only 2 users. re, wh Am 06.11.2015 11:57, schrieb Julia Lawall: >>> Would it be preferable to remove the macro entirely and inline the for >>> loop header? >> >> Could you show me an example o

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread Julia Lawall
On Fri, 6 Nov 2015, walter harms wrote: > +1 > > I like this more since it is much more obvious what is done. > > more over we can remove a macro with only 2 users. It's not to bad because it turns out to be pretty concise. But I don't agree about the 2 users. There are 2 users for this speci

Re: [PATCH] decnet: remove macro-local declarations

2015-11-06 Thread Julia Lawall
> > Would it be preferable to remove the macro entirely and inline the for > > loop header? > > Could you show me an example of how this would look exactly? One possible solution is below. I moved the initialization of the nh pointer inside the loop to reduce the size of the loop header. One cou

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, Joe Perches wrote: > On Thu, 2015-11-05 at 20:38 +0100, Julia Lawall wrote: > > On Thu, 5 Nov 2015, David Miller wrote: > > > From: Julia Lawall > > > Date: Thu, 5 Nov 2015 11:18:16 +0100> > > > > Move the variable declarations from the for_nexthops macro to the > > > > su

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Joe Perches
On Thu, 2015-11-05 at 20:38 +0100, Julia Lawall wrote: > On Thu, 5 Nov 2015, David Miller wrote: > > From: Julia Lawall > > Date: Thu, 5 Nov 2015 11:18:16 +0100> > > > Move the variable declarations from the for_nexthops macro to the > > > surrounding context, so that it is clear where these var

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread David Miller
From: Julia Lawall Date: Thu, 5 Nov 2015 21:08:17 +0100 (CET) > On Thu, 5 Nov 2015, David Miller wrote: > >> From: Julia Lawall >> Date: Thu, 5 Nov 2015 11:18:16 +0100 >> >> > Move the variable declarations from the for_nexthops macro to the >> > surrounding context, so that it is clear where

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Thu, 5 Nov 2015 11:18:16 +0100 > > > Move the variable declarations from the for_nexthops macro to the > > surrounding context, so that it is clear where these variables are > > declared. This also makes it possible to remove

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
On Thu, 5 Nov 2015, David Miller wrote: > From: Julia Lawall > Date: Thu, 5 Nov 2015 11:18:16 +0100 > > > Move the variable declarations from the for_nexthops macro to the > > surrounding context, so that it is clear where these variables are > > declared. This also makes it possible to remove

Re: [PATCH] decnet: remove macro-local declarations

2015-11-05 Thread David Miller
From: Julia Lawall Date: Thu, 5 Nov 2015 11:18:16 +0100 > Move the variable declarations from the for_nexthops macro to the > surrounding context, so that it is clear where these variables are > declared. This also makes it possible to remove the endfor_nexthops macro. > > This change adds new

[PATCH] decnet: remove macro-local declarations

2015-11-05 Thread Julia Lawall
Move the variable declarations from the for_nexthops macro to the surrounding context, so that it is clear where these variables are declared. This also makes it possible to remove the endfor_nexthops macro. This change adds new arguments to the macro for_nexthops. They are ordered such that a p