From: Nikanth Karthikesan Subject: [PATCH] xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleancache is enabled Date: Fri, 10 Jun 2011 14:27:03 +0530 Message-ID: <1307696223.28682.21.camel@nikanth.blr.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Jeremy Fitzhardinge , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org xen-tmem: Build cleancache shim to Xen Transcendent Memory only if Cleanc= ache is enabled Fix compilation warning drivers/xen/tmem.c: In function =E2=80=98xen_tmem_init=E2=80=99: drivers/xen/tmem.c:246: warning: unused variable =E2=80=98old_ops=E2=80=99 drivers/xen/tmem.c: At top level: drivers/xen/tmem.c:234: warning: =E2=80=98tmem_cleancache_ops=E2=80=99 de= fined but not used Signed-off-by: Nikanth Karthikesan --- Index: linux-2.6/drivers/xen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- linux-2.6.orig/drivers/xen/Makefile 2011-06-10 13:42:18.521140982 +05= 30 +++ linux-2.6/drivers/xen/Makefile 2011-06-10 13:44:50.110986353 +0530 @@ -1,6 +1,6 @@ obj-y +=3D grant-table.o features.o events.o manage.o balloon.o obj-y +=3D xenbus/ -obj-y +=3D tmem.o +obj-$(CONFIG_CLEAN_CACHE) +=3D tmem.o =20 nostackp :=3D $(call cc-option, -fno-stack-protector) CFLAGS_features.o :=3D $(nostackp) Index: linux-2.6/drivers/xen/tmem.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- linux-2.6.orig/drivers/xen/tmem.c 2011-06-10 12:19:14.522391890 +0530 +++ linux-2.6/drivers/xen/tmem.c 2011-06-10 13:45:42.500984200 +0530 @@ -247,7 +247,6 @@ =20 if (!xen_domain()) return 0; -#ifdef CONFIG_CLEANCACHE BUG_ON(sizeof(struct cleancache_filekey) !=3D sizeof(struct tmem_oid)); if (tmem_enabled && use_cleancache) { char *s =3D ""; @@ -257,7 +256,6 @@ printk(KERN_INFO "cleancache enabled, RAM provided by " "Xen Transcendent Memory%s\n", s); } -#endif return 0; } =20