Phonet:fix build problem
Subsystems (5)
PATCH 1/1 Phonet:fix build problem
net/phonet/pep.c: In function 'pipe_rcv_status':net/phonet/pep.c:262: error: lvalue required as left operand of assignment
---
net/phonet/pep.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/phonet/pep.c +2 -1
@@ -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 :
David Miller
maintainerFrom: Alexander Beregalov <[email protected]>
Date: Fri, 20 Mar 2009 14:58:38 +0300
Quoted 4 lines
net/phonet/pep.c: In function 'pipe_rcv_status':net/phonet/pep.c:262: error: lvalue required as left operand of assignmentSigned-off-by Alexander Beregalov <[email protected]>
What platform hits this problem?
I think that platform's atomic_add() implementation should be fixed instead.
2009/3/22 David Miller <[email protected]>:
Quoted 6 lines
From: Alexander Beregalov <[email protected]>
Date: Fri, 20 Mar 2009 14:58:38 +0300Quoted 3 lines
net/phonet/pep.c: In function 'pipe_rcv_status':net/phonet/pep.c:262: error: lvalue required as left operand of assignment
Quoted 6 lines
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>What platform hits this problem?
I think that platform's
atomic_add()implementation should be fixed instead.
It is parisc, CC added.
James Bottomley
maintainerQuoted 7 lines · Alexander Beregalov
2009/3/22 David Miller <[email protected]>:
Quoted 6 lines
From: Alexander Beregalov <[email protected]>
Date: Fri, 20 Mar 2009 14:58:38 +0300Quoted 3 lines
net/phonet/pep.c: In function 'pipe_rcv_status':net/phonet/pep.c:262: error: lvalue required as left operand of assignment
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Alexander Beregalov <[email protected]>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
---
arch/parisc/include/asm/atomic.h +9 -9
@@ -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)))
Quoted 9 lines · James Bottomley
Quoted 4 lines
Quoted 2 lines
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.hThis should fix it (uncompiled, of course).
Looks correct to me. Applied. Thanks everyone.
Quoted 4 lines · Kyle McMartin
Quoted 3 lines · James Bottomley
Quoted 3 lines
Quoted 2 lines
I think that platform's
atomic_add()implementation should be fixed instead.
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
It is parisc, CC added.
Looks like a macro argument screw up in
atomic.hThis 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
James Bottomley
maintainerQuoted 9 lines · Kyle McMartin
Quoted 8 lines · Kyle McMartin
Quoted 7 lines · James Bottomley
Quoted 4 lines
Quoted 2 lines
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
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
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:
James
Quoted 13 lines · James Bottomley
Quoted 12 lines · Kyle McMartin
Quoted 11 lines · Kyle McMartin
Quoted 9 lines · James Bottomley
Quoted 4 lines
Quoted 2 lines
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.hThis should fix it (uncompiled, of course).
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
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 <[email protected]>
Thanks! Sorted.
cheers, Kyle