Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964881AbbKEWV7 (ORCPT ); Thu, 5 Nov 2015 17:21:59 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:38821 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756349AbbKEWV6 (ORCPT ); Thu, 5 Nov 2015 17:21:58 -0500 X-IronPort-AV: E=Sophos;i="5.20,249,1444687200"; d="scan'208";a="152830239" Date: Thu, 5 Nov 2015 23:21:54 +0100 (CET) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Joe Perches cc: David Miller , kernel-janitors@vger.kernel.org, linux-decnet-user@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lkp@intel.com, roopa@cumulusnetworks.com, rshearma@brocade.com, ebiederm@xmission.com Subject: Re: [PATCH] decnet: remove macro-local declarations In-Reply-To: <1446760973.21133.92.camel@perches.com> Message-ID: References: <1446718696-32505-1-git-send-email-Julia.Lawall@lip6.fr> <20151105.142619.983467860147585345.davem@davemloft.net> <1446760973.21133.92.camel@perches.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1909 Lines: 53 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 > > > > 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 pointer to the referenced object comes first, the index in the > > > > list comes next, and the list itself comes last, roughly in analogy with > > > > the list_for_each macros. > [] > > > > This patch takes care of a single file, where the macros are defined > > > > locally. If the basic transformation looks OK, I will change the other > > > > files that either likewise define their own macros or use the macros in > > > > net/mpls/internal.h. The potentially affected files are: > > > ... > > > > > > This looks fine to me. > > > > > > Please resubmit this when net-next opens back up, which should be > > > shortly after -rc1. > > > > OK, I'll do the others then too. > > If you do can you please parenthesize the macro arguments? > > #define for_nexthops(nh, nhsel, fi) \ > for (nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; (nh)++, (nhsel)++) > instead of > for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) OK > And perhaps a renaming might be better > > s/for_nexthops/for_each_nexthop/ OK Thanks for the suggestions. julia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/