diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2014-09-03 06:17:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-04 01:17:24 -0400 |
commit | 315427691c7a064718b5ad7d378d7f1c1898a626 (patch) | |
tree | cbd3eb8a9d8d46d6bfec6bab1f4436d5e456aef2 | |
parent | ae17ea0ec7d8fa64fbb773a52b2df5ba4766bcb8 (diff) |
locking/semaphore: Resolve some shadow warnings
Resolve some shadow warnings resulting from using the name
jiffies, which is a well-known global. This is not a problem
of course, but it could be a trap for someone copying and
pasting code, and it just makes W=2 a little cleaner.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1409739444-13635-1-git-send-email-jeffrey.t.kirsher@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/locking/semaphore.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/locking/semaphore.c b/kernel/locking/semaphore.c index 6815171a4fff..b8120abe594b 100644 --- a/kernel/locking/semaphore.c +++ b/kernel/locking/semaphore.c | |||
@@ -36,7 +36,7 @@ | |||
36 | static noinline void __down(struct semaphore *sem); | 36 | static noinline void __down(struct semaphore *sem); |
37 | static noinline int __down_interruptible(struct semaphore *sem); | 37 | static noinline int __down_interruptible(struct semaphore *sem); |
38 | static noinline int __down_killable(struct semaphore *sem); | 38 | static noinline int __down_killable(struct semaphore *sem); |
39 | static noinline int __down_timeout(struct semaphore *sem, long jiffies); | 39 | static noinline int __down_timeout(struct semaphore *sem, long timeout); |
40 | static noinline void __up(struct semaphore *sem); | 40 | static noinline void __up(struct semaphore *sem); |
41 | 41 | ||
42 | /** | 42 | /** |
@@ -145,14 +145,14 @@ EXPORT_SYMBOL(down_trylock); | |||
145 | /** | 145 | /** |
146 | * down_timeout - acquire the semaphore within a specified time | 146 | * down_timeout - acquire the semaphore within a specified time |
147 | * @sem: the semaphore to be acquired | 147 | * @sem: the semaphore to be acquired |
148 | * @jiffies: how long to wait before failing | 148 | * @timeout: how long to wait before failing |
149 | * | 149 | * |
150 | * Attempts to acquire the semaphore. If no more tasks are allowed to | 150 | * Attempts to acquire the semaphore. If no more tasks are allowed to |
151 | * acquire the semaphore, calling this function will put the task to sleep. | 151 | * acquire the semaphore, calling this function will put the task to sleep. |
152 | * If the semaphore is not released within the specified number of jiffies, | 152 | * If the semaphore is not released within the specified number of jiffies, |
153 | * this function returns -ETIME. It returns 0 if the semaphore was acquired. | 153 | * this function returns -ETIME. It returns 0 if the semaphore was acquired. |
154 | */ | 154 | */ |
155 | int down_timeout(struct semaphore *sem, long jiffies) | 155 | int down_timeout(struct semaphore *sem, long timeout) |
156 | { | 156 | { |
157 | unsigned long flags; | 157 | unsigned long flags; |
158 | int result = 0; | 158 | int result = 0; |
@@ -161,7 +161,7 @@ int down_timeout(struct semaphore *sem, long jiffies) | |||
161 | if (likely(sem->count > 0)) | 161 | if (likely(sem->count > 0)) |
162 | sem->count--; | 162 | sem->count--; |
163 | else | 163 | else |
164 | result = __down_timeout(sem, jiffies); | 164 | result = __down_timeout(sem, timeout); |
165 | raw_spin_unlock_irqrestore(&sem->lock, flags); | 165 | raw_spin_unlock_irqrestore(&sem->lock, flags); |
166 | 166 | ||
167 | return result; | 167 | return result; |
@@ -248,9 +248,9 @@ static noinline int __sched __down_killable(struct semaphore *sem) | |||
248 | return __down_common(sem, TASK_KILLABLE, MAX_SCHEDULE_TIMEOUT); | 248 | return __down_common(sem, TASK_KILLABLE, MAX_SCHEDULE_TIMEOUT); |
249 | } | 249 | } |
250 | 250 | ||
251 | static noinline int __sched __down_timeout(struct semaphore *sem, long jiffies) | 251 | static noinline int __sched __down_timeout(struct semaphore *sem, long timeout) |
252 | { | 252 | { |
253 | return __down_common(sem, TASK_UNINTERRUPTIBLE, jiffies); | 253 | return __down_common(sem, TASK_UNINTERRUPTIBLE, timeout); |
254 | } | 254 | } |
255 | 255 | ||
256 | static noinline void __sched __up(struct semaphore *sem) | 256 | static noinline void __sched __up(struct semaphore *sem) |