From: Arthur Jones Date: Thu, 17 Apr 2008 04:01:06 +0000 (-0700) Subject: IB/ipath: Fix sparse warning about pointer signedness X-Git-Tag: v2.6.26-rc1~1156^2~97 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6ef6aee2f0ff111a2439b02b9d788097ca82f9d1;p=linux-2.6-omap-h63xx.git IB/ipath: Fix sparse warning about pointer signedness There's no reason for the third parameter of ipath_count_units() to be a u32 *, so change it to be an int * instead. This fixes the sparse warning: drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: warning: incorrect type in argument 3 (different signedness) drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: expected unsigned int [usertype] *maxportsp drivers/infiniband/hw/ipath/ipath_file_ops.c:1654:47: got int * Signed-off-by: Arthur Jones Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index ca4d0acc678..367f2a38744 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -234,12 +234,12 @@ struct ipath_devdata *ipath_lookup(int unit) return dd; } -int ipath_count_units(int *npresentp, int *nupp, u32 *maxportsp) +int ipath_count_units(int *npresentp, int *nupp, int *maxportsp) { int nunits, npresent, nup; struct ipath_devdata *dd; unsigned long flags; - u32 maxports; + int maxports; nunits = npresent = nup = maxports = 0; diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index ecf3f7ff771..3d4a254ffca 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h @@ -718,7 +718,7 @@ extern struct ipath_devdata *ipath_lookup(int unit); int ipath_init_chip(struct ipath_devdata *, int); int ipath_enable_wc(struct ipath_devdata *dd); void ipath_disable_wc(struct ipath_devdata *dd); -int ipath_count_units(int *npresentp, int *nupp, u32 *maxportsp); +int ipath_count_units(int *npresentp, int *nupp, int *maxportsp); void ipath_shutdown_device(struct ipath_devdata *); void ipath_clear_freeze(struct ipath_devdata *);