* [PATCH] Phonet:fix build problem
@ 2009-03-20 11:58 Alexander Beregalov
2009-03-21 23:59 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Beregalov @ 2009-03-20 11:58 UTC (permalink / raw)
To: netdev, linux-kernel
net/phonet/pep.c: In function 'pipe_rcv_status':
net/phonet/pep.c:262: error: lvalue required as left operand of assignment
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
net/phonet/pep.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/phonet/pep.c b/net/phonet/pep.c
index 8ad2b53..9a1aefa 100644
--- a/net/phonet/pep.c
+++ b/net/phonet/pep.c
@@ -259,7 +259,8 @@ static int pipe_rcv_status(struct sock *sk, struct sk_buff *skb)
case PN_PEP_IND_ID_MCFC_GRANT_CREDITS:
if (pn->tx_fc != PN_MULTI_CREDIT_FLOW_CONTROL)
break;
- atomic_add(wake = hdr->data[4], &pn->tx_credits);
+ wake = hdr->data[4];
+ atomic_add(wake, &pn->tx_credits);
break;
default:
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-20 11:58 [PATCH] Phonet:fix build problem Alexander Beregalov
@ 2009-03-21 23:59 ` David Miller
2009-03-22 0:19 ` Alexander Beregalov
0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2009-03-21 23:59 UTC (permalink / raw)
To: a.beregalov; +Cc: netdev, linux-kernel
From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Fri, 20 Mar 2009 14:58:38 +0300
> net/phonet/pep.c: In function 'pipe_rcv_status':
> net/phonet/pep.c:262: error: lvalue required as left operand of assignment
>
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
What platform hits this problem?
I think that platform's atomic_add() implementation should
be fixed instead.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-21 23:59 ` David Miller
@ 2009-03-22 0:19 ` Alexander Beregalov
2009-03-22 3:58 ` James Bottomley
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Beregalov @ 2009-03-22 0:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, kyle, linux-parisc
2009/3/22 David Miller <davem@davemloft.net>:
> From: Alexander Beregalov <a.beregalov@gmail.com>
> Date: Fri, 20 Mar 2009 14:58:38 +0300
>
>> net/phonet/pep.c: In function 'pipe_rcv_status':
>> net/phonet/pep.c:262: error: lvalue required as left operand of assignment
>>
>> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
>
> What platform hits this problem?
>
> I think that platform's atomic_add() implementation should
> be fixed instead.
It is parisc, CC added.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-22 0:19 ` Alexander Beregalov
@ 2009-03-22 3:58 ` James Bottomley
2009-03-22 16:06 ` Kyle McMartin
0 siblings, 1 reply; 8+ messages in thread
From: James Bottomley @ 2009-03-22 3:58 UTC (permalink / raw)
To: Alexander Beregalov
Cc: David Miller, netdev, linux-kernel, kyle, linux-parisc
On Sun, 2009-03-22 at 03:19 +0300, Alexander Beregalov wrote:
> 2009/3/22 David Miller <davem@davemloft.net>:
> > From: Alexander Beregalov <a.beregalov@gmail.com>
> > Date: Fri, 20 Mar 2009 14:58:38 +0300
> >
> >> net/phonet/pep.c: In function 'pipe_rcv_status':
> >> net/phonet/pep.c:262: error: lvalue required as left operand of assignment
> >>
> >> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
> >
> > What platform hits this problem?
> >
> > I think that platform's atomic_add() implementation should
> > be fixed instead.
>
> It is parisc, CC added.
Looks like a macro argument screw up in atomic.h
This should fix it (uncompiled, of course).
James
---
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index edbfe25..ada3e53 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -25,7 +25,7 @@
* Since "a" is usually an address, use one spinlock per cacheline.
*/
# define ATOMIC_HASH_SIZE 4
-# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
+# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) (a))/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
@@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v))))
-#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v))))
+#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v))))
+#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v))))
#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
-#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v)))
-#define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v)))
+#define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v)))
+#define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v)))
#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
@@ -289,13 +289,13 @@ atomic64_read(const atomic64_t *v)
return v->counter;
}
-#define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v))))
-#define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v))))
+#define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)(i)),(v))))
+#define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)(i)),(v))))
#define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v))))
#define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v))))
-#define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v)))
-#define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v)))
+#define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)(i)),(v)))
+#define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)(i)),(v)))
#define atomic64_inc_return(v) (__atomic64_add_return( 1,(v)))
#define atomic64_dec_return(v) (__atomic64_add_return( -1,(v)))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-22 3:58 ` James Bottomley
@ 2009-03-22 16:06 ` Kyle McMartin
2009-03-31 2:41 ` Kyle McMartin
0 siblings, 1 reply; 8+ messages in thread
From: Kyle McMartin @ 2009-03-22 16:06 UTC (permalink / raw)
To: James Bottomley
Cc: Alexander Beregalov, David Miller, netdev, linux-kernel, kyle,
linux-parisc
On Sun, Mar 22, 2009 at 03:58:40AM +0000, James Bottomley wrote:
> > > I think that platform's atomic_add() implementation should
> > > be fixed instead.
> >
> > It is parisc, CC added.
>
> Looks like a macro argument screw up in atomic.h
>
> This should fix it (uncompiled, of course).
>
Looks correct to me. Applied. Thanks everyone.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-22 16:06 ` Kyle McMartin
@ 2009-03-31 2:41 ` Kyle McMartin
2009-03-31 3:06 ` James Bottomley
0 siblings, 1 reply; 8+ messages in thread
From: Kyle McMartin @ 2009-03-31 2:41 UTC (permalink / raw)
To: Kyle McMartin
Cc: James Bottomley, Alexander Beregalov, David Miller, netdev,
linux-kernel, linux-parisc
On Sun, Mar 22, 2009 at 12:06:29PM -0400, Kyle McMartin wrote:
> On Sun, Mar 22, 2009 at 03:58:40AM +0000, James Bottomley wrote:
> > > > I think that platform's atomic_add() implementation should
> > > > be fixed instead.
> > >
> > > It is parisc, CC added.
> >
> > Looks like a macro argument screw up in atomic.h
> >
> > This should fix it (uncompiled, of course).
> >
>
> Looks correct to me. Applied. Thanks everyone.
>
Oh, bah, want to resend that with a sign-off, James?
regards, Kyle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-31 2:41 ` Kyle McMartin
@ 2009-03-31 3:06 ` James Bottomley
2009-03-31 3:07 ` Kyle McMartin
0 siblings, 1 reply; 8+ messages in thread
From: James Bottomley @ 2009-03-31 3:06 UTC (permalink / raw)
To: Kyle McMartin
Cc: Alexander Beregalov, David Miller, netdev, linux-kernel,
linux-parisc
On Mon, 2009-03-30 at 22:41 -0400, Kyle McMartin wrote:
> On Sun, Mar 22, 2009 at 12:06:29PM -0400, Kyle McMartin wrote:
> > On Sun, Mar 22, 2009 at 03:58:40AM +0000, James Bottomley wrote:
> > > > > I think that platform's atomic_add() implementation should
> > > > > be fixed instead.
> > > >
> > > > It is parisc, CC added.
> > >
> > > Looks like a macro argument screw up in atomic.h
> > >
> > > This should fix it (uncompiled, of course).
> > >
> >
> > Looks correct to me. Applied. Thanks everyone.
> >
>
> Oh, bah, want to resend that with a sign-off, James?
You can add:
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Phonet:fix build problem
2009-03-31 3:06 ` James Bottomley
@ 2009-03-31 3:07 ` Kyle McMartin
0 siblings, 0 replies; 8+ messages in thread
From: Kyle McMartin @ 2009-03-31 3:07 UTC (permalink / raw)
To: James Bottomley
Cc: Kyle McMartin, Alexander Beregalov, David Miller, netdev,
linux-kernel, linux-parisc
On Mon, Mar 30, 2009 at 10:06:16PM -0500, James Bottomley wrote:
> On Mon, 2009-03-30 at 22:41 -0400, Kyle McMartin wrote:
> > On Sun, Mar 22, 2009 at 12:06:29PM -0400, Kyle McMartin wrote:
> > > On Sun, Mar 22, 2009 at 03:58:40AM +0000, James Bottomley wrote:
> > > > > > I think that platform's atomic_add() implementation should
> > > > > > be fixed instead.
> > > > >
> > > > > It is parisc, CC added.
> > > >
> > > > Looks like a macro argument screw up in atomic.h
> > > >
> > > > This should fix it (uncompiled, of course).
> > > >
> > >
> > > Looks correct to me. Applied. Thanks everyone.
> > >
> >
> > Oh, bah, want to resend that with a sign-off, James?
>
> You can add:
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
>
Thanks! Sorted.
cheers, Kyle
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-03-31 3:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20 11:58 [PATCH] Phonet:fix build problem Alexander Beregalov
2009-03-21 23:59 ` David Miller
2009-03-22 0:19 ` Alexander Beregalov
2009-03-22 3:58 ` James Bottomley
2009-03-22 16:06 ` Kyle McMartin
2009-03-31 2:41 ` Kyle McMartin
2009-03-31 3:06 ` James Bottomley
2009-03-31 3:07 ` Kyle McMartin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).