Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753403Ab0DTXoG (ORCPT ); Tue, 20 Apr 2010 19:44:06 -0400 Received: from cantor.suse.de ([195.135.220.2]:37290 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609Ab0DTXoC (ORCPT ); Tue, 20 Apr 2010 19:44:02 -0400 Date: Wed, 21 Apr 2010 01:43:56 +0200 (CEST) From: Jiri Kosina To: Jan Kiszka Cc: Jeff Dike , Amerigo Wang , linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net Subject: Re: [PATCH 3/5] uml: Fix warning due to missing task_struct declaration In-Reply-To: <4BCDDFBB.40805@web.de> Message-ID: References: <1d97cd7761a1eae73923b1adda4c6915a0647bb3.1271713955.git.jan.kiszka@web.de> <20100420100949.GB5317@cr0.nay.redhat.com> <20100420143016.GB30011@c-98-229-117-200.hsd1.ma.comcast.net> <4BCDDFBB.40805@web.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1989 Lines: 48 On Tue, 20 Apr 2010, Jan Kiszka wrote: > >>> We can't pull in linux/sched.h, so just declare the struct. > >>> > >> Did you meet any build error? If yes, please include it. > > > > What does this patch fix, aside from being a bit cleaner? > > CC arch/um/sys-i386/elfcore.o > In file included from /data/linux-2.6/include/linux/elf.h:8, > from /data/linux-2.6/arch/um/sys-i386/elfcore.c:2: > /data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: ‘struct task_struct’ declared inside parameter list > /data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: its scope is only this definition or declaration, which is probably not what you want > > I guess not many people build against i386 hosts anymore, so this > remained widely unnoticed. > > > > > If it built before, without having a task_struct declaration, I think > > that means that the elf_core_copy_fpregs was never used. The > > task_struct * in the declaration would become a private task_struct, > > known only to the declaration. If the implementation or callers have > > the regular task_struct, it will be a different one, and the > > prototypes will conflict due to the different types of the first > > parameter. > > This is just a forward declaration (that many arch elf header include), > so no such problem exists. > > BTW, to answer the other question in this thread: We have a circular > dependency that prevents including sched.h. > > I can add all these information to some v2 of this patch if it is > required to get this merged. Please let me know. I have updated the explanation in the changelog and applied the patch. If anyone has any objections still, please let me know. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- 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/