lkml.org 
[lkml]   [2019]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants
On Mon, Jan 28, 2019 at 03:29:10PM +0100, Andrea Parri wrote:

> > diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h
> > index dbaed55..ab8f584 100644
> > --- a/arch/x86/include/asm/refcount.h
> > +++ b/arch/x86/include/asm/refcount.h
> > @@ -67,16 +67,29 @@ static __always_inline void refcount_dec(refcount_t *r)
> > static __always_inline __must_check
> > bool refcount_sub_and_test(unsigned int i, refcount_t *r)
> > {
> > - return GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl",
> > + bool ret = GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl",
> > REFCOUNT_CHECK_LT_ZERO,
> > r->refs.counter, e, "er", i, "cx");
> > +
> > + if (ret) {
> > + smp_acquire__after_ctrl_dep();
> > + return true;
> > + }
> > +
> > + return false;
>
> There appears to be some white-space damage (here and in other places);
> checkpatch.pl should point these and other style problems out.

It's worse...

patch: **** malformed patch at line 81: diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h

And yes, there's a lot of whitespace damage all around. Lots of trailing
spaces too.

\
 
 \ /
  Last update: 2019-01-29 10:52    [W:0.076 / U:7.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site