mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
scst.h: Move definition of swap()
Make sure that the definition of swap() is guarded by "#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)" only instead of "#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)" and "#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)". git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -127,13 +127,6 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap);
|
||||
#define nr_cpumask_bits NR_CPUS
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
#ifndef swap
|
||||
#define swap(a, b) \
|
||||
do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* verify cpu argument to cpumask_* operators */
|
||||
static inline unsigned int cpumask_check(unsigned int cpu)
|
||||
{
|
||||
@@ -187,6 +180,13 @@ static inline void cpumask_copy(cpumask_t *dstp,
|
||||
#define set_cpus_allowed_ptr(p, new_mask) set_cpus_allowed((p), *(new_mask))
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
#ifndef swap
|
||||
#define swap(a, b) \
|
||||
do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
|
||||
static inline unsigned int queue_max_hw_sectors(struct request_queue *q)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user