This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-ia64-devel] [patch] remove global zero initializers

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [patch] remove global zero initializers
From: Jes Sorensen <jes@xxxxxxx>
Date: Fri, 15 Dec 2006 11:09:03 +0100
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Dec 2006 02:08:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20060527)

This one falls in the micro optimisation area, but still. No reason to
zero initialize global variables.


No need to init global variables to zero as it will place them in the
data segment rather than the bss segment.

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

diff -r 2a5baff73732 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Fri Dec 15 10:36:59 2006 +0100
+++ b/xen/arch/ia64/xen/xensetup.c      Fri Dec 15 11:06:07 2006 +0100
@@ -51,7 +51,7 @@ extern void xen_patch_kernel(void);
 extern void xen_patch_kernel(void);
 /* opt_nosmp: If true, secondary processors are ignored. */
-static int opt_nosmp = 0;
+static int opt_nosmp;
 boolean_param("nosmp", opt_nosmp);
 /* maxcpus: maximum number of CPUs to activate. */
@@ -65,7 +65,7 @@ integer_param("xencons", opt_xencons);
 integer_param("xencons", opt_xencons);
 /* Toggle to allow non-legacy xencons UARTs to run in polling mode */
-static int opt_xencons_poll = 0;
+static int opt_xencons_poll;
 boolean_param("xencons_poll", opt_xencons_poll);
@@ -163,7 +163,7 @@ struct ns16550_defaults ns16550_com2 = {
 /* efi_print: print efi table at boot */
-static int opt_efi_print = 0;
+static int opt_efi_print;
 boolean_param("efi_print", opt_efi_print);
 /* print EFI memory map: */
Xen-ia64-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>