diff options
Diffstat (limited to 'drivers/xen/tmem.c')
-rw-r--r-- | drivers/xen/tmem.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index 18e8bd8fa947..83b5c53bec6b 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c @@ -5,6 +5,8 @@ * Author: Dan Magenheimer */ +#define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> @@ -41,6 +43,8 @@ module_param(selfballooning, bool, S_IRUGO); #ifdef CONFIG_FRONTSWAP static bool frontswap __read_mostly = true; module_param(frontswap, bool, S_IRUGO); +#else /* CONFIG_FRONTSWAP */ +#define frontswap (0) #endif /* CONFIG_FRONTSWAP */ #ifdef CONFIG_XEN_SELFBALLOONING @@ -377,17 +381,17 @@ static int xen_tmem_init(void) #ifdef CONFIG_FRONTSWAP if (tmem_enabled && frontswap) { char *s = ""; - struct frontswap_ops *old_ops = - frontswap_register_ops(&tmem_frontswap_ops); + struct frontswap_ops *old_ops; tmem_frontswap_poolid = -1; + old_ops = frontswap_register_ops(&tmem_frontswap_ops); if (IS_ERR(old_ops) || old_ops) { if (IS_ERR(old_ops)) return PTR_ERR(old_ops); s = " (WARNING: frontswap_ops overridden)"; } - printk(KERN_INFO "frontswap enabled, RAM provided by " - "Xen Transcendent Memory%s\n", s); + pr_info("frontswap enabled, RAM provided by Xen Transcendent Memory%s\n", + s); } #endif #ifdef CONFIG_CLEANCACHE @@ -398,8 +402,8 @@ static int xen_tmem_init(void) cleancache_register_ops(&tmem_cleancache_ops); if (old_ops) s = " (WARNING: cleancache_ops overridden)"; - printk(KERN_INFO "cleancache enabled, RAM provided by " - "Xen Transcendent Memory%s\n", s); + pr_info("cleancache enabled, RAM provided by Xen Transcendent Memory%s\n", + s); } #endif #ifdef CONFIG_XEN_SELFBALLOONING |