[openib-general] [PATCH 4/7] AMSO1100 Provider

Roland Dreier rdreier at cisco.com
Wed Mar 8 12:34:55 PST 2006


 > +		dprintk("couldn't vmalloc page_list of size %d\n",
 > +			(sizeof(u64) * pbl_depth));

size_t should be printed with %zd, otherwise you get

c2_provider.c:388: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’

Fix:

--- infiniband/hw/amso1100/c2_provider.c	(revision 5693)
+++ infiniband/hw/amso1100/c2_provider.c	(working copy)
@@ -385,7 +385,7 @@ static struct ib_mr *c2_reg_phys_mr(stru
 
 	page_list = vmalloc(sizeof(u64) * pbl_depth);
 	if (!page_list) {
-		dprintk("couldn't vmalloc page_list of size %d\n",
+		dprintk("couldn't vmalloc page_list of size %zd\n",
 			(sizeof(u64) * pbl_depth));
 		return ERR_PTR(-ENOMEM);
 	}



More information about the general mailing list