[ewg] [PATCH] krping: fix compile warnings

Jon Mason jon at opengridcomputing.com
Fri Oct 9 12:31:32 PDT 2009


The patch below enables krping to compile on 2.6.30.  It fixes a warning
on printing a u64 as a unsigned int.  There is also an omission of a %s
and %d for the default printk in krping_cq_event_handler.  Finally,
there is no owner field in proc_dir_entry in 2.6.30.

Signed-Off-By: Jon Mason <jon at opengridcomputing.com>

diff --git a/krping.c b/krping.c
index 85cb9f9..f5c617b 100644
--- a/krping.c
+++ b/krping.c
@@ -377,7 +377,7 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx)
 				continue;
 			} else {
 				printk(KERN_ERR PFX "cq completion failed with "
-				       "wr_id %x status %d opcode %d vender_err %x\n",
+				       "wr_id %Lx status %d opcode %d vender_err %x\n",
 					wc.wr_id, wc.status, wc.opcode, wc.vendor_err);
 				goto error;
 			}
@@ -431,7 +431,7 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx)
 
 		default:
 			printk(KERN_ERR PFX
-			       "Unexpected opcode %d, Shutting down\n",
+			       "%s:%d Unexpected opcode %d, Shutting down\n",
 			       __func__, __LINE__, wc.opcode);
 			goto error;
 		}
@@ -2234,7 +2234,6 @@ static int __init krping_init(void)
 		printk(KERN_ERR PFX "cannot create /proc/krping\n");
 		return -ENOMEM;
 	}
-	krping_proc->owner = THIS_MODULE;
 	krping_proc->read_proc = krping_read_proc;
 	krping_proc->write_proc = krping_write_proc;
 	return 0;



More information about the ewg mailing list