Re: [PATCH 5/5] xen: nuke the ballon files

Previous thread: [PATCH 3/5] xen: nuke dead code in enlighten.c by Steven Rostedt on Thursday, October 2, 2008 - 8:05 am. (1 message)

Next thread: [PATCH 2/5] xen: remove unused function warnings by Steven Rostedt on Thursday, October 2, 2008 - 8:05 am. (1 message)
From: Steven Rostedt
Date: Thursday, October 2, 2008 - 8:05 am

Investigating the unused static files in the balloon code, I discovered
that the balloon code is not used at all.

The header file is one big #if 0 and all the functions in the C file
is static. There is no caller like init_module to hook to any of
these functions. Basically, this code is one big patch of dead code
wasting space on my hard drive.

This patch removes the balloon code altogether since there are no
users.

CC: Jeremy Fitzhardinge <jeremy@xensource.com>
CC: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
 drivers/xen/Makefile  |    1 
 drivers/xen/balloon.c |  713 --------------------------------------------------
 include/xen/balloon.h |   61 ----
 3 files changed, 775 deletions(-)

Index: linux-compile.git/drivers/xen/Makefile
===================================================================
--- linux-compile.git.orig/drivers/xen/Makefile	2008-10-02 10:33:57.000000000 -0400
+++ linux-compile.git/drivers/xen/Makefile	2008-10-02 10:35:02.000000000 -0400
@@ -1,4 +1,3 @@
 obj-y	+= grant-table.o features.o events.o manage.o
 obj-y	+= xenbus/
 obj-$(CONFIG_XEN_XENCOMM)	+= xencomm.o
-obj-$(CONFIG_XEN_BALLOON)	+= balloon.o
Index: linux-compile.git/drivers/xen/balloon.c
===================================================================
--- linux-compile.git.orig/drivers/xen/balloon.c	2008-10-02 10:33:57.000000000 -0400
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,713 +0,0 @@
-/******************************************************************************
- * balloon.c
- *
- * Xen balloon driver - enables returning/claiming memory to/from Xen.
- *
- * Copyright (c) 2003, B Dragovic
- * Copyright (c) 2003-2004, M Williamson, K Fraser
- * Copyright (c) 2005 Dan M. Smith, IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation; or, when distributed
- * ...
From: Jeremy Fitzhardinge
Date: Thursday, October 2, 2008 - 8:34 am

From: Steven Rostedt
Date: Thursday, October 2, 2008 - 10:59 am

Ouch! How did I miss that.

Anyway, there are still a bunch of functions in that code that are not 
referenced.  OK, nack this patch, but could you please supply one that 
cleans that code up.

Thanks,

-- Steve

--

Previous thread: [PATCH 3/5] xen: nuke dead code in enlighten.c by Steven Rostedt on Thursday, October 2, 2008 - 8:05 am. (1 message)

Next thread: [PATCH 2/5] xen: remove unused function warnings by Steven Rostedt on Thursday, October 2, 2008 - 8:05 am. (1 message)