Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755282AbZJAAb1 (ORCPT ); Wed, 30 Sep 2009 20:31:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755247AbZJAAb1 (ORCPT ); Wed, 30 Sep 2009 20:31:27 -0400 Received: from borg.medozas.de ([188.40.89.202]:39003 "EHLO borg.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241AbZJAAbZ (ORCPT ); Wed, 30 Sep 2009 20:31:25 -0400 Date: Thu, 1 Oct 2009 02:31:24 +0200 (CEST) From: Jan Engelhardt To: Joe Perches cc: Patrick McHardy , "David S. Miller" , Simon Horman , Julian Anastasov , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org Subject: Re: [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile In-Reply-To: <1254352160.2960.119.camel@Joe-Laptop.home> Message-ID: References: <0026bcf5aad9ae5036e68fc2dcda9c778d30dc47.1254349375.git.joe@perches.com> <1254352160.2960.119.camel@Joe-Laptop.home> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) 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: 1344 Lines: 32 On Thursday 2009-10-01 01:09, Joe Perches wrote: >On Thu, 2009-10-01 at 00:46 +0200, Jan Engelhardt wrote: >> On Thursday 2009-10-01 00:37, Joe Perches wrote: >> >This centralizes the definition and removes the >> >replicated #defines from all files > >I think this increased command line length hardly matters. > >I think a reasonable complaint might be that it separates >the definition of a macro from the code. I think it's >similar to the already used KBUILD_MODNAME macro though. KBUILD_MODNAME is special in that it is derived from the actual source filename. Of course you could put #define KBUILD_MODNAME "foo" in your source file, but that is like putting changelogs there when they belong into the git log. >> How about an #include file for the ipvs private things? > >It's not just IPVS, this style could be used treewide >without requiring extra #includes. Well I personally prefer the #include instead of hiding such in Makefiles. You know, when newcomers could start doing `grep KMSG_COMPONENT *.[ch]`. Perhaps GCC's -include flag in a Makefile to avoid #includes in .c files? -- 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/