[openib-general] [PATCH] AT: cleanup some sparse warnings

Tom Duffy tduffy at sun.com
Thu Jul 28 13:48:15 PDT 2005


This patch cleans up a few sparse warnings in AT.

Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: linux-2.6.13-rc3-openib/drivers/infiniband/core/at.c
===================================================================
--- linux-2.6.13-rc3-openib/drivers/infiniband/core/at.c	(revision 2931)
+++ linux-2.6.13-rc3-openib/drivers/infiniband/core/at.c	(working copy)
@@ -224,7 +224,7 @@ static void ib_dev_remove(struct ib_at_d
 	ib_dev->pend_op = 0;
 
 	dev_put(ib_dev->netdev);
-	ib_dev->netdev = 0;
+	ib_dev->netdev = NULL;
 	ib_dev->old_ip = 0;
 	ib_dev->ip = 0;
 	ib_dev->valid = 0;
@@ -325,7 +325,7 @@ static int ib_devs_changed(void)
 
 		for (i = 0; i < n; i++)
 			if (netdev == ibdevs[i]) {
-				ibdevs[i] = 0;	/* dev handled - not new */
+				ibdevs[i] = NULL; /* dev handled - not new */
 				break;
 			}
 
@@ -1165,7 +1165,7 @@ static int resolve_route(struct route_re
 	}
 
 	if (req->pend.type == IBAT_REQ_ATS)
-		return resolve_ats_route(req, 0);
+		return resolve_ats_route(req, NULL);
 
 	WARN("bad req %p type %d", req, req->pend.type);
 	return -1;
@@ -1401,7 +1401,7 @@ int ib_at_paths_by_route(struct ib_at_ib
 				IBAT_REQ_PATHREC, same_path_req);
 
 	if (req_start(&pending_reqs, &preq->pend, parent))
-		resolve_path(preq, 0);
+		resolve_path(preq, NULL);
 
 	return 0;			/* async req */
 }
@@ -1454,7 +1454,7 @@ int ib_at_ips_by_gid(union ib_gid *gid, 
 				IBAT_REQ_ATSARP, same_ats_ips_req);
 
 	if (req_start(&pending_reqs, &areq->pend, parent))
-		resolve_ats_ips(areq, 0);
+		resolve_ats_ips(areq, NULL);
 
 	return 0;			/* async req */
 }
@@ -1526,11 +1526,11 @@ static struct packet_type ib_at_arp_type
 };
 
 static struct notifier_block ib_at_netdev_notifier = {
-	notifier_call:	inetaddr_event,
+	.notifier_call = inetaddr_event,
 };
 
 static struct notifier_block ib_at_inetaddr_notifier = {
-	notifier_call:	inetaddr_event,
+	.notifier_call = inetaddr_event,
 };
 
 static int ib_at_init(void)
Index: linux-2.6.13-rc3-openib/drivers/infiniband/core/at_priv.h
===================================================================
--- linux-2.6.13-rc3-openib/drivers/infiniband/core/at_priv.h	(revision 2931)
+++ linux-2.6.13-rc3-openib/drivers/infiniband/core/at_priv.h	(working copy)
@@ -130,8 +130,8 @@ static const struct ib_field ats_rec_tab
 				 IB_SA_SERVICE_REC_SERVICE_GID)
 
 #define IB_ATS_SERVICE_NAME             "DAPL Address Translation Service"
-#define IB_ATS_SERVICE_ID               cpu_to_be64(0x10000ce100415453)
-#define IB_ATS_LAST_SERVICE_ID          cpu_to_be64(0x10000ce1ff415453)
+#define IB_ATS_SERVICE_ID               cpu_to_be64(0x10000ce100415453ULL)
+#define IB_ATS_LAST_SERVICE_ID          cpu_to_be64(0x10000ce1ff415453ULL)
 #define IB_ATS_OPENIB_MAGIC_KEY         cpu_to_be16(IB_OPENIB_OUI & 0xffff)
 
 //#define WARN(fmt, ...)	while (0) {}





More information about the general mailing list