All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josip Rodin <joy@entuzijast.net>
To: sparclinux@vger.kernel.org
Subject: Re: sparc: rename atomic_add_unless
Date: Thu, 04 Aug 2011 09:43:15 +0000	[thread overview]
Message-ID: <20110804094315.GA2005@entuzijast.net> (raw)
In-Reply-To: <20110728104017.GA27861@entuzijast.net>

On Thu, Aug 04, 2011 at 07:39:16PM +1000, Stephen Rothwell wrote:
> Hi Dave,
> 
> On Thu, 04 Aug 2011 01:21:46 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
> >
> > From: Josip Rodin <joy@entuzijast.net>
> > Date: Thu, 28 Jul 2011 12:40:17 +0200
> > 
> > > This patch[0] seems to fix a build issue, but it doesn't fix the
> > > functionality - the previous change[1] changed the return value semantics,
> > > it's now supposed to be to be just the old value, rather than a comparison.
> > > 
> > > [0] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hg8624e401b0b7747762b5223fb23f86dcdacc93
> > > [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hò4219b4e90cf70ec4a211b17fbabc725a0ddf3c
> > 
> > Stephen please post a fix for this before a 32-bit sparc person
> > loses their filesystem or worse.
> 
> Um, I could try to figure out how to do that, but what I did was respond
> in July 29 to the message above cc'ing the author of the orignal patch in
> the hope that they would write a fix.  Clearly that hope was in vain :-(

It should be fairly trivial:

diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c
index 8600eb2..1d32b54 100644
--- a/arch/sparc/lib/atomic32.c
+++ b/arch/sparc/lib/atomic32.c
@@ -65,7 +65,7 @@ int __atomic_add_unless(atomic_t *v, int a, int u)
        if (ret != u)
                v->counter += a;
        spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
-       return ret != u;
+       return ret;
 }
 EXPORT_SYMBOL(__atomic_add_unless);

-- 
     2. That which causes joy or happiness.

  parent reply	other threads:[~2011-08-04  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 10:40 sparc: rename atomic_add_unless Josip Rodin
2011-07-29 12:21 ` Stephen Rothwell
2011-08-04  8:21 ` David Miller
2011-08-04  9:39 ` Stephen Rothwell
2011-08-04  9:43 ` Josip Rodin [this message]
2011-08-04  9:48 ` David Miller
2011-08-04 15:35 ` Arun Sharma

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=20110804094315.GA2005@entuzijast.net \
    --to=joy@entuzijast.net \
    --cc=sparclinux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.