From 4b192f7fa72177eb783c4098e299e5cb283efce0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 30 Jun 2014 07:18:53 +0000 Subject: [PATCH] scst: Build fix for Linux kernel versions 2.6.33 and 2.6.34 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5647 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 10 ++++++++++ scst/include/scst_debug.h | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index bce713839..3fea05c8c 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -215,6 +215,16 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +/* + * See also patch "kernel.h: add pr_warn for symmetry to dev_warn, + * netdev_warn" (commit fc62f2f19edf46c9bdbd1a54725b56b18c43e94f). + */ +#ifndef pr_warn +#define pr_warn pr_warning +#endif +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) /* * See also patch "sched: Fix softirq time accounting" (commit ID diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 99740bf46..d5b343241 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -53,7 +53,6 @@ printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) -#define pr_warn pr_warning #define pr_notice(fmt, ...) \ printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) #endif