lkml.org 
[lkml]   [2012]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] lglock: make the per_cpu locks static
On Tue, 9 Oct 2012 11:46:39 +0800
Lai Jiangshan <laijs@cn.fujitsu.com> wrote:

> The per_cpu locks are not used outside nor exported.
> Add a "static" linkage keyword to it.

I think a better description is:

: The per_cpu locks are not used outside the file which contains the
: DEFINE_LGLOCK(), so we can make these symbols static.

> --- a/include/linux/lglock.h
> +++ b/include/linux/lglock.h
> @@ -49,7 +49,7 @@ struct lglock {
> };
>
> #define DEFINE_LGLOCK(name) \
> - DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
> + static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \
> = __ARCH_SPIN_LOCK_UNLOCKED; \
> struct lglock name = { .lock = &name ## _lock }
>
> --
> 1.7.4.4


\
 
 \ /
  Last update: 2012-10-10 00:21    [W:0.061 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site