Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756457Ab1EQTNk (ORCPT ); Tue, 17 May 2011 15:13:40 -0400 Received: from lennier.cc.vt.edu ([198.82.162.213]:33449 "EHLO lennier.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756263Ab1EQTNj (ORCPT ); Tue, 17 May 2011 15:13:39 -0400 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3-dev To: Jean-Christophe PLAGNIOL-VILLARD Cc: Arnaud Lacombe , Michal Marek , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, x86@kernel.org, Ingo Molnar Subject: Re: [PATCH v2] kconfig: autogenerated config_is_xxx macro In-Reply-To: Your message of "Tue, 17 May 2011 03:03:29 +0200." <20110517010329.GB13466@game.jcrosoft.org> From: Valdis.Kletnieks@vt.edu References: <1304658229-30820-1-git-send-email-plagnioj@jcrosoft.com> <20110507015041.GA21017@game.jcrosoft.org> <4DC7AB57.9050002@suse.cz> <20110513080909.GO18952@game.jcrosoft.org> <32557.1305572616@localhost> <20110517010329.GB13466@game.jcrosoft.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1305659606_2811P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 17 May 2011 15:13:26 -0400 Message-ID: <14777.1305659606@localhost> X-Mirapoint-Received-SPF: 198.82.161.152 auth3.smtp.vt.edu Valdis.Kletnieks@vt.edu 2 pass X-Mirapoint-IP-Reputation: reputation=neutral-1, source=Fixed, refid=n/a, actions=MAILHURDLE SPF TAG X-Junkmail-Status: score=10/50, host=steiner.cc.vt.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020209.4DD2C8D8.00E7,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2925 Lines: 88 --==_Exmh_1305659606_2811P Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, 17 May 2011 03:03:29 +0200, Jean-Christophe PLAGNIOL-VILLARD said= : > On 15:38 Mon 16 May , Arnaud Lacombe wrote: > > On Mon, May 16, 2011 at 3:03 PM, wrote: > > > =23if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) > > > =A0 =A0 =A0 =A0if (=21pinned && get_sysctl_timer_migration() && idl= e_cpu(cpu)) > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cpu =3D get_nohz_timer_target(); > > > =23endif > > > =A0 =A0 =A0 =A0new_base =3D per_cpu(tvec_bases, cpu); > > I already exposed this case, but let's prove it: > > > > % grep CONFIG_SMP .config > > =23 CONFIG_SMP is not set > > > > % git diff > > diff --git a/kernel/timer.c b/kernel/timer.c > > index fd61986..ea4a5ba 100644 > > --- a/kernel/timer.c > > +++ b/kernel/timer.c > > =40=40 -681,10 +681,8 =40=40 __mod_timer(struct timer_list *timer, un= signed > > long expires, > > > > cpu =3D smp_processor_id(); > > > > -=23if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) > > - if (=21pinned && get_sysctl_timer_migration() && idle_cpu(cpu= )) > > + if (0 && 0 && =21pinned && get_sysctl_timer_migration() && id= le_cpu(cpu)) > > cpu =3D get_nohz_timer_target(); > > -=23endif > > new_base =3D per_cpu(tvec_bases, cpu); > > > > % gmake kernel/timer.o > > CHK include/linux/version.h > > CHK include/generated/utsrelease.h > > CALL scripts/checksyscalls.sh > > CC kernel/timer.o > > kernel/timer.c: In function '__mod_timer': > > kernel/timer.c:685:3: error: implicit declaration of function > > 'get_nohz_timer_target' > > gmake=5B1=5D: *** =5Bkernel/timer.o=5D Error 1 > > gmake: *** =5Bkernel/timer.o=5D Error 2 > because we do not define the inline function if the CONFIG_ is not defi= ne > as we are supposed to do if we want to compile without ifdef everywhere= Right - the point is that since many/most cases of =23ifdef CONFIG_FOO in= open code won't compile cleanly if converted to config_is_foo(), it limits the= usefulness of the feature. Which raises another question - does this create a maintenance headache, = where people who used to just 'grep -r CONFIG_FOO' to find code they needed to = fix up now have to remember to do a *second* grep to find all callsites? --==_Exmh_1305659606_2811P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFN0sjWcC3lWbTT17ARApf0AJwPgsudxzVFJHa/h8ONV+Xl3aF9sACgsRAt xdBramorFrN6NcpPi1lnD/0= =skbf -----END PGP SIGNATURE----- --==_Exmh_1305659606_2811P-- -- 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/