Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291734

Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors

From Boqun Feng <boqun.feng@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors
Date 2015-12-15 02:00 +0100
Message-ID <qFM8a-5dK-7@gated-at.bofh.it> (permalink)
References (1 earlier) <qEIzF-4E2-53@gated-at.bofh.it> <qFy5c-4ms-19@gated-at.bofh.it> <qFyeU-4Fp-39@gated-at.bofh.it> <qFA6Z-5XO-5@gated-at.bofh.it> <qFDRh-8pJ-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC 0/3] sparse: Introduce __private to privatize members of structs Boqun Feng <boqun.feng@gmail.com> - 2015-12-12 04:00 +0100
  [RFC 1/3] sparse: Add __private to privatize members of structs Boqun Feng <boqun.feng@gmail.com> - 2015-12-12 04:00 +0100
  [RFC 2/3] RCU: Privatize rcu_node::lock Boqun Feng <boqun.feng@gmail.com> - 2015-12-12 04:00 +0100
  [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Boqun Feng <boqun.feng@gmail.com> - 2015-12-12 04:00 +0100
    Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Peter Zijlstra <peterz@infradead.org> - 2015-12-14 11:00 +0100
      Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Thomas Gleixner <tglx@linutronix.de> - 2015-12-14 11:10 +0100
        Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Boqun Feng <boqun.feng@gmail.com> - 2015-12-14 13:10 +0100
          Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Thomas Gleixner <tglx@linutronix.de> - 2015-12-14 17:10 +0100
            Re: [RFC 3/3] irq: Privatize irq_common_data::state_use_accessors Boqun Feng <boqun.feng@gmail.com> - 2015-12-15 02:00 +0100

csiph-web