[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-16 Thread Daniel Vetter
On Thu, Dec 15, 2016 at 11:10:49AM -0800, Greg KH wrote: > On Thu, Dec 15, 2016 at 07:55:54PM +0100, Jason A. Donenfeld wrote: > > On most platforms, there exists this ifdef: > > > > #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) > > > > This makes this patch functionally useless.

[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-16 Thread Daniel Vetter
On Thu, Dec 15, 2016 at 06:01:10AM +0100, Jason A. Donenfeld wrote: > On most platforms, there exists this ifdef: > > #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) > > This makes this patch functionally useless. However, on PPC, there is > actually an explicit definition of

[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-15 Thread Jason A. Donenfeld
Hi Greg, On Thu, Dec 15, 2016 at 8:10 PM, Greg KH wrote: > I'll take it after 4.10-rc1 is out, thanks. Thank you! Jason

[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-15 Thread Jason A. Donenfeld
On most platforms, there exists this ifdef: #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) This makes this patch functionally useless. However, on PPC, there is actually an explicit definition of atomic_inc_not_zero with its own assembly that is slightly more optimized than

[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-15 Thread Greg KH
On Thu, Dec 15, 2016 at 07:55:54PM +0100, Jason A. Donenfeld wrote: > On most platforms, there exists this ifdef: > > #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) > > This makes this patch functionally useless. However, on PPC, there is > actually an explicit definition of

[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-15 Thread Jason A. Donenfeld
On most platforms, there exists this ifdef: #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) This makes this patch functionally useless. However, on PPC, there is actually an explicit definition of atomic_inc_not_zero with its own assembly that is slightly more optimized than

Patch for drm-next WAS Re: [PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-12-15 Thread Jason A. Donenfeld
On Tue, Jul 12, 2016 at 2:28 PM, Daniel Vetter wrote: > Sure can do, but I can't find the raw patch anywhere (I suck, I know). > Care to resend? Hey sorry I missed this email requesting the actual patch. I reposted it here: https://lkml.org/lkml/2016/12/14/814

Fwd: [PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-08-10 Thread Thomas Hellstrom
By request forwarded patch This is also Reviewed-by: Thomas Hellstrom /Thomas Forwarded Message Subject:[PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless Date: Sat, 10 Oct 2015 12:56:34 +0200 From: Jason A. Donenfeld <ja...@zx2c4.com> To:

Patch for drm-next WAS Re: [PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-07-12 Thread Daniel Vetter
On Fri, Jul 01, 2016 at 09:08:34AM +0200, Thomas Hellstrom wrote: > Dave, > > Since kref_get_unless_zero() was brought in by drm, could we add this to > drm-next? Sure can do, but I can't find the raw patch anywhere (I suck, I know). Care to resend? Thanks, Daniel > > Thanks, > Thomas > > >

Patch for drm-next WAS Re: [PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless

2016-07-01 Thread Thomas Hellstrom
Dave, Since kref_get_unless_zero() was brought in by drm, could we add this to drm-next? Thanks, Thomas On 06/30/2016 12:52 AM, Jason A. Donenfeld wrote: > This was positively reviewed by maintainers but never picked up. Can > someone queue this for 4.7 or 4.8? > > Thanks, > Jason > > On Mon,