mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christopher Li <sparse@chrisli.org>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Brian Norris <computersforpeace@gmail.com>
Subject: Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors
Date: Tue, 15 Dec 2015 08:56:25 +0800	[thread overview]
Message-ID: <20151215005625.GK1072@fixme-laptop.cn.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1512141657430.4336@nanos>

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

On Mon, Dec 14, 2015 at 04:59:45PM +0100, Thomas Gleixner wrote:
> On Mon, 14 Dec 2015, Boqun Feng wrote:
> > Probably something like this(untested, only run "make kernel/irq/")?
> > 
> > Subject: [RFC v2 3/3] irq: Privatize irq_common_data::state_use_accessors
> > 
> > According to Peter Zijlstra, irq_common_data::state_use_accessors is not
> > designed for public use. Therefore make it private so that people who
> > write code accessing it directly will get blamed by sparse.
> > 
> > Also macro __irqd_to_state() is for _designed_ accesses to irq_data's
> > state only, it's better to limit its scope, therefore put all its
> > callers together and #undef it after use.
> 
> That exposes the set/clr functions to the global header file, while
> today those are restricted to the core internals header. There is a
> reason why I did not make them public ....
> 

Oops, I wasn't aware of that... then I guess we should define and undef
__irqd_to_state twice, in include/linux/irq.h and in
kernel/irq/internals.h, right?

Regards,
Boqun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-12-15  0:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12  2:55 [RFC 0/3] sparse: Introduce __private to privatize members of structs Boqun Feng
2015-12-12  2:56 ` [RFC 1/3] sparse: Add " Boqun Feng
2015-12-12  2:56 ` [RFC 2/3] RCU: Privatize rcu_node::lock Boqun Feng
2015-12-12  2:56 ` [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Boqun Feng
2015-12-14  9:50   ` Peter Zijlstra
2015-12-14 10:03     ` Thomas Gleixner
2015-12-14 12:00       ` Boqun Feng
2015-12-14 15:59         ` Thomas Gleixner
2015-12-15  0:56           ` Boqun Feng [this message]

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=20151215005625.GK1072@fixme-laptop.cn.ibm.com \
    --to=boqun.feng@gmail.com \
    --cc=apw@canonical.com \
    --cc=computersforpeace@gmail.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joe@perches.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rostedt@goodmis.org \
    --cc=sparse@chrisli.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®