[openib-general] [PATCH][TRIVIAL] RDS: Fix for type incompatibility
Preggna S
spreggna at novell.com
Mon Nov 20 02:44:23 PST 2006
A trivial fix for type incompatibility found in the usage of
spin_lock_irqsave() function, where in the second parameter 'flags'
should be an 'unsigned long' and not 'int'. Build of RDS kernel modules
fails in 64 bit machines when strict checking is enabled. Patch below
fixes this trivial type incompatibility.
/usr/src/linux/spinlock.h :
#define spin_lock_irqsave(lock, flags) flags =
_spin_lock_irqsave(lock)
/usr/src/linux/spinlock_api_smp.h:
unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
Signed-off-by: Preggna S<spreggna at novell.com>
--
diff -up src/linux-kernel/infiniband/ulp/rds/rds_main.h
src_fixed/linux-kernel/infiniband/ulp/rds/rds_main.h
--- src/linux-kernel/infiniband/ulp/rds/rds_main.h 2006-11-20
12:04:48.000000000 +0530
+++
src_fixed/linux-kernel/infiniband/ulp/rds/rds_main.h 2006-11-20
12:17:38.000000000 +0530
@@ -270,7 +270,7 @@ int rds_wait_for_space(struct rds_ep *ep
/* Recv */
int rds_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr
*msg,
- size_t total_len, int nonblock, int flags, int
*addrlen);
+ size_t total_len, int nonblock, unsigned long flags, int
*addrlen);
int rds_post_recvs_list(struct rds_ep *ep);
void rds_recv_completion(void *context, struct ib_wc *wc);
void rds_free_pending_recvs(struct rds_cb *cb);
diff -up src/linux-kernel/infiniband/ulp/rds/rds_recv.c
src_fixed/linux-kernel/infiniband/ulp/rds/rds_recv.c
--- src/linux-kernel/infiniband/ulp/rds/rds_recv.c 2006-11-20
12:04:48.000000000 +0530
+++
src_fixed/linux-kernel/infiniband/ulp/rds/rds_recv.c 2006-11-20
12:20:30.000000000 +0530
@@ -34,7 +34,7 @@
#include "rds.h"
int rds_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr
*msg,
- size_t total_len, int nonblock, int flags, int
*addrlen)
+ size_t total_len, int nonblock, unsigned long flags, int
*addrlen)
{
int err=0;
struct rds_cb *cb;
More information about the general
mailing list