All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] percpu: add percpu_variable_ptr()
Date: Wed, 23 Jun 2010 12:07:59 +0200	[thread overview]
Message-ID: <4C21DCFF.5050604@kernel.org> (raw)
In-Reply-To: <4C21DC33.6070404@cn.fujitsu.com>

On 06/23/2010 12:04 PM, Lai Jiangshan wrote:
> The percpu variable and allocated percpu data are compatible
> witch each other, This patch adds a API, thus we can use
> per_cpu_ptr() for defined/declared percpu variable.
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
> index ce2dc65..d5c8d7f 100644
> --- a/include/linux/percpu-defs.h
> +++ b/include/linux/percpu-defs.h
> @@ -81,6 +81,12 @@
>  #endif
>  
>  /*
> + * Ptr of the declared/defined per-CPU variable.
> + * It is totally compatible with the return from alloc_percpu().
> + */
> +#define percpu_variable_ptr(name) (&(name))

Why not just use &name?

Thanks.

-- 
tejun

  reply	other threads:[~2010-06-23 10:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 10:04 [PATCH 1/2] percpu: add percpu_variable_ptr() Lai Jiangshan
2010-06-23 10:07 ` Tejun Heo [this message]
2010-06-23 10:20   ` Lai Jiangshan
2010-06-23 10:22     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C21DCFF.5050604@kernel.org \
    --to=tj@kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.