Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-22 Thread Peter Zijlstra
On Tue, Sep 20, 2016 at 02:54:01PM +0200, Christoffer Dall wrote: > On Tue, Sep 20, 2016 at 02:42:58PM +0200, Peter Zijlstra wrote: > > 'struct static_key' should indeed not be used and is deprecated. 'struct > > static_key_{true,false}' however should be fine. > > ah, ok, didn't realize this, esp

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Christoffer Dall
On Tue, Sep 20, 2016 at 02:42:58PM +0200, Peter Zijlstra wrote: > On Tue, Sep 20, 2016 at 02:25:14PM +0200, Christoffer Dall wrote: > > On Tue, Sep 20, 2016 at 11:42:23AM +0200, Peter Zijlstra wrote: > > > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > > > > It is desirable to allo

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Peter Zijlstra
On Tue, Sep 20, 2016 at 02:25:14PM +0200, Christoffer Dall wrote: > On Tue, Sep 20, 2016 at 11:42:23AM +0200, Peter Zijlstra wrote: > > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > > > It is desirable to allow static keys to be integrated in structures, > > > as it can lead do sl

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Christoffer Dall
On Tue, Sep 20, 2016 at 11:42:23AM +0200, Peter Zijlstra wrote: > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > > It is desirable to allow static keys to be integrated in structures, > > as it can lead do slightly more readable code. But the current API > > only provides DEFINE_ST

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Marc Zyngier
On 20/09/16 10:42, Peter Zijlstra wrote: > On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: >> It is desirable to allow static keys to be integrated in structures, >> as it can lead do slightly more readable code. But the current API >> only provides DEFINE_STATIC_KEY_TRUE/FALSE, which

Re: [PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-20 Thread Peter Zijlstra
On Mon, Sep 19, 2016 at 06:21:27PM +0100, Marc Zyngier wrote: > It is desirable to allow static keys to be integrated in structures, > as it can lead do slightly more readable code. But the current API > only provides DEFINE_STATIC_KEY_TRUE/FALSE, which is not exactly > nice and leads to the follow

[PATCH 1/2] jump_labels: Add API to deal with keys embedded in structures

2016-09-19 Thread Marc Zyngier
It is desirable to allow static keys to be integrated in structures, as it can lead do slightly more readable code. But the current API only provides DEFINE_STATIC_KEY_TRUE/FALSE, which is not exactly nice and leads to the following idiom: static struct { int