Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964999AbWA3VQf (ORCPT ); Mon, 30 Jan 2006 16:16:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965000AbWA3VQf (ORCPT ); Mon, 30 Jan 2006 16:16:35 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:26503 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S964999AbWA3VQe (ORCPT ); Mon, 30 Jan 2006 16:16:34 -0500 To: Pavel Machek Cc: linux-kernel@vger.kernel.org, vserver@list.linux-vserver.org, Herbert Poetzl , "Serge E. Hallyn" , Alan Cox , Dave Hansen , Arjan van de Ven , Suleiman Souhlal , Hubertus Franke , Cedric Le Goater , Kyle Moffett Subject: Re: [PATCH 4/5] vt: Update spawnpid to use a task_ref. References: <20060130105143.GA2953@elf.ucw.cz> <20060130210513.GH2250@elf.ucw.cz> From: ebiederm@xmission.com (Eric W. Biederman) Date: Mon, 30 Jan 2006 14:15:31 -0700 In-Reply-To: <20060130210513.GH2250@elf.ucw.cz> (Pavel Machek's message of "Mon, 30 Jan 2006 22:05:13 +0100") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 39 Pavel Machek writes: > Hi! > >> >> 7ed8301463a49ad03f8c9de2bbf8c41a5d9843ea >> >> diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c >> >> index 8b603b2..4e1f2e0 100644 >> >> --- a/drivers/char/keyboard.c >> >> +++ b/drivers/char/keyboard.c >> >> @@ -109,7 +109,8 @@ struct kbd_struct kbd_table[MAX_NR_CONSO >> >> static struct kbd_struct *kbd = kbd_table; >> >> static struct kbd_struct kbd0; >> >> >> >> -int spawnpid, spawnsig; >> >> +TASK_REF(spawnpid); >> > >> > Could we get some nicer syntax of declaration? This does not look like >> > declaration, and looks ugly to my eyes. >> >> Any suggestions? >> >> Does >> struct task_ref *spawnpid = &init_tref; > > Looks must better... The challenge for me is that I make assumptions that a struct task_ref * always points to something valid. Maybe it is sufficient to spell that out in comments. Having a helper function though feels like it encourages it even more. I guess the code oopsing if it is a NULL pointer helps too. Eric - 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/