sparc: rename atomic_add_unless
Hi,
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
Signature · 1 line
2. That which causes joy or happiness.
Hi,
Quoted 7 lines · On Thu, 28 Jul 2011 12:40:17 +0200 Josip Rodin <[email protected]> wrote:
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;h=678624e401b0b7747762b5223fb23f86dcdacc93
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f24219b4e90cf70ec4a211b17fbabc725a0ddf3c
Ooops, sorry about that. Thanks for pointing it out.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
David Miller
maintainerFrom: Josip Rodin <[email protected]>
Date: Thu, 28 Jul 2011 12:40:17 +0200
Quoted 6 lines
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.
The return value semantics have changed for this function, you can't just put two underscores in front of the name, export the symbol, and say "Ship it!" :-)
Hi Dave,
Quoted 8 lines · On Thu, 04 Aug 2011 01:21:46 -0700 (PDT) David Miller <[email protected]>…
From: Josip Rodin <[email protected]>
Date: Thu, 28 Jul 2011 12:40:17 +0200Quoted 4 lines
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.
Quoted 5 lines
Quoted 2 lines
[0] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=678624e401b0b7747762b5223fb23f86dcdacc93
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f24219b4e90cf70ec4a211b17fbabc725a0ddf3cStephen 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 :-(
Quoted 3 lines
The return value semantics have changed for this function, you can't just put two underscores in front of the name, export the symbol, and say "Ship it!" :-)
Well, I never actaully said that about my original build fix patch. :-(
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 14 lines · Stephen Rothwell
Hi Dave,
Quoted 11 lines · On Thu, 04 Aug 2011 01:21:46 -0700 (PDT) David Miller <[email protected]>…
From: Josip Rodin <[email protected]>
Date: Thu, 28 Jul 2011 12:40:17 +0200Quoted 6 lines
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
Quoted 6 lines
Quoted 2 lines
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:
arch/sparc/lib/atomic32.c +1 -1
@@ -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);
Signature · 1 line
2. That which causes joy or happiness.
From: Josip Rodin <[email protected]>
Date: Thu, 4 Aug 2011 11:43:15 +0200
Quoted 7 lines
It should be fairly trivial:
arch/sparc/lib/atomic32.c +0
-0
arch/sparc/lib/atomic32.c int __atomic_add_unless(atomic_t *v, int a, int u) · line 70
Quoted 7 lines
arch/sparc/lib/atomic32.c +1
-1@@ -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);
Applied, thanks Josip.
Quoted 6 lines · Stephen Rothwell
Quoted 2 lines
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 :-(
I was on vacation for a few weeks and got buried under email. The patch looks right to me. Thanks for fixing Josip!
-Arun