From: "Jan Beulich" Subject: Re: [PATCH for-xen-4.5 v3 02/16] x86/boot/reloc: Move typedef and include to beginning of file Date: Fri, 10 Oct 2014 14:33:07 +0100 Message-ID: <5437FC33020000780003DC0A@mail.emea.novell.com> References: <1412790736-28915-1-git-send-email-daniel.kiper@oracle.com> <1412790736-28915-3-git-send-email-daniel.kiper@oracle.com> <5437B9E4020000780003D911@mail.emea.novell.com> <20141010131707.GQ3460@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XcaJj-00016H-Jk for xen-devel@lists.xenproject.org; Fri, 10 Oct 2014 13:33:11 +0000 In-Reply-To: <20141010131707.GQ3460@olila.local.net-space.pl> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper Cc: Juergen Gross , keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, ross.philipson@citrix.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 10.10.14 at 15:17, wrote: > On Fri, Oct 10, 2014 at 09:50:12AM +0100, Jan Beulich wrote: >> >>> On 08.10.14 at 19:52, wrote: >> > --- a/xen/arch/x86/boot/reloc.c >> > +++ b/xen/arch/x86/boot/reloc.c >> > @@ -10,6 +10,10 @@ >> > * Keir Fraser >> > */ >> > >> > +typedef unsigned int u32; >> > + >> > +#include "../../../include/xen/multiboot.h" >> > + >> > /* entered with %eax = BOOT_TRAMPOLINE */ >> > asm ( >> > " .text \n" >> > @@ -30,9 +34,6 @@ asm ( >> > " .long 0 \n" >> > ); >> > >> > -typedef unsigned int u32; >> > -#include "../../../include/xen/multiboot.h" >> > - >> > static void *reloc_mbi_struct(void *old, unsigned int bytes) >> > { >> > void *new; >> >> In an earlier version you added some shouting warning comments to >> point out where the entry point here is. Without your adjustment it >> was right at the top of the file, making it rather obvious. I don't see >> what the adjustment you do here is good for, and you also don't >> say so (description is missing altogether). > > Personally I think that all includes and definitions/declarations should be > at the beginning of file (if it is possible) and separated from the "real > code". > This makes files more readable. So, that is why I am doing this here. While generally I agree, I think there are always reasons for exceptions. And this is one of them. Jan