]> git.hungrycats.org Git - linux/commitdiff
[IRDA]: Fix 64-bit warnings.
authorDavid S. Miller <davem@nuts.ninka.net>
Thu, 19 Jun 2003 10:29:32 +0000 (03:29 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 19 Jun 2003 10:29:32 +0000 (03:29 -0700)
1) Use proper size_t printf format specifier
2) Cast pointers properly when passing them to hashfind
3) Print pointers using proper printf format specifier
   instead of using ugly casts.

net/irda/irda_device.c
net/irda/irnet/irnet_irda.c
net/irda/irnet/irnet_ppp.c
net/irda/irttp.c

index 743abb29c1643c389ead594921817cd616ae691a..5092abb62d549423702e904282aea4bedd763d9c 100644 (file)
@@ -231,7 +231,7 @@ static void __irda_task_delete(struct irda_task *task)
 void irda_task_delete(struct irda_task *task)
 {
        /* Unregister task */
-       hashbin_remove(tasks, (int) task, NULL);
+       hashbin_remove(tasks, (long) task, NULL);
 
        __irda_task_delete(task);
 }
@@ -345,7 +345,7 @@ struct irda_task *irda_task_execute(void *instance,
        init_timer(&task->timer);
 
        /* Register task */
-       hashbin_insert(tasks, (irda_queue_t *) task, (int) task, NULL);
+       hashbin_insert(tasks, (irda_queue_t *) task, (long) task, NULL);
 
        /* No time to waste, so lets get going! */
        ret = irda_task_kick(task);
index 45dc5b03c16817bfea2493850760182028fa2ecc..05458c3d4a5a8ce6fb07cd68657c999c268e5a13 100644 (file)
@@ -33,8 +33,8 @@ irnet_post_event(irnet_socket *       ap,
 {
   int                  index;          /* In the log */
 
-  DENTER(CTRL_TRACE, "(ap=0x%X, event=%d, daddr=%08x, name=``%s'')\n",
-        (unsigned int) ap, event, daddr, name);
+  DENTER(CTRL_TRACE, "(ap=0x%p, event=%d, daddr=%08x, name=``%s'')\n",
+        ap, event, daddr, name);
 
   /* Protect this section via spinlock.
    * Note : as we are the only event producer, we only need to exclude
@@ -100,7 +100,7 @@ irnet_open_tsap(irnet_socket *      self)
 {
   notify_t     notify;         /* Callback structure */
 
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   DABORT(self->tsap != NULL, -EBUSY, IRDA_SR_ERROR, "Already busy !\n");
 
@@ -125,8 +125,8 @@ irnet_open_tsap(irnet_socket *      self)
   /* Remember which TSAP selector we actually got */
   self->stsap_sel = self->tsap->stsap_sel;
 
-  DEXIT(IRDA_SR_TRACE, " - tsap=0x%X, sel=0x%X\n",
-       (unsigned int) self->tsap, self->stsap_sel);
+  DEXIT(IRDA_SR_TRACE, " - tsap=0x%p, sel=0x%X\n",
+       self->tsap, self->stsap_sel);
   return 0;
 }
 
@@ -151,7 +151,7 @@ irnet_ias_to_tsap(irnet_socket *    self,
 {
   __u8 dtsap_sel = 0;          /* TSAP we are looking for */
 
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   /* By default, no error */
   self->errno = 0;
@@ -231,7 +231,7 @@ irnet_ias_to_tsap(irnet_socket *    self,
 static inline int
 irnet_find_lsap_sel(irnet_socket *     self)
 {
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   /* This should not happen */
   DABORT(self->iriap, -EBUSY, IRDA_SR_ERROR, "busy with a previous query.\n");
@@ -268,7 +268,7 @@ irnet_connect_tsap(irnet_socket *   self)
 {
   int          err;
 
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   /* Open a local TSAP (an IrTTP instance) */
   err = irnet_open_tsap(self);
@@ -369,7 +369,7 @@ irnet_discover_daddr_and_lsap_sel(irnet_socket *    self)
 {
   int  ret;
 
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   /* Ask lmp for the current discovery log */
   self->discoveries = irlmp_get_discoveries(&self->disco_number, self->mask,
@@ -382,8 +382,8 @@ irnet_discover_daddr_and_lsap_sel(irnet_socket *    self)
       clear_bit(0, &self->ttp_connect);
       DRETURN(-ENETUNREACH, IRDA_SR_INFO, "No Cachelog...\n");
     }
-  DEBUG(IRDA_SR_INFO, "Got the log (0x%X), size is %d\n",
-       (unsigned int) self->discoveries, self->disco_number);
+  DEBUG(IRDA_SR_INFO, "Got the log (0x%p), size is %d\n",
+       self->discoveries, self->disco_number);
 
   /* Start with the first discovery */
   self->disco_index = -1;
@@ -426,7 +426,7 @@ irnet_dname_to_daddr(irnet_socket * self)
   int  number;                 /* Number of nodes in the log */
   int  i;
 
-  DENTER(IRDA_SR_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
 
   /* Ask lmp for the current discovery log */
   discoveries = irlmp_get_discoveries(&number, 0xffff,
@@ -474,7 +474,7 @@ irnet_dname_to_daddr(irnet_socket * self)
 int
 irda_irnet_create(irnet_socket *       self)
 {
-  DENTER(IRDA_SOCK_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SOCK_TRACE, "(self=0x%p)\n", self);
 
   self->magic = IRNET_MAGIC;   /* Paranoia */
 
@@ -518,7 +518,7 @@ irda_irnet_connect(irnet_socket *   self)
 {
   int          err;
 
-  DENTER(IRDA_SOCK_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SOCK_TRACE, "(self=0x%p)\n", self);
 
   /* Check if we are already trying to connect.
    * Because irda_irnet_connect() can be called directly by pppd plus
@@ -585,7 +585,7 @@ irda_irnet_connect(irnet_socket *   self)
 void
 irda_irnet_destroy(irnet_socket *      self)
 {
-  DENTER(IRDA_SOCK_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SOCK_TRACE, "(self=0x%p)\n", self);
   if(self == NULL)
     return;
 
@@ -676,7 +676,7 @@ irnet_daddr_to_dname(irnet_socket * self)
   int  number;                 /* Number of nodes in the log */
   int  i;
 
-  DENTER(IRDA_SERV_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SERV_TRACE, "(self=0x%p)\n", self);
 
   /* Ask lmp for the current discovery log */
   discoveries = irlmp_get_discoveries(&number, 0xffff,
@@ -722,7 +722,7 @@ irnet_find_socket(irnet_socket *    self)
   irnet_socket *       new = (irnet_socket *) NULL;
   int                  err;
 
-  DENTER(IRDA_SERV_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SERV_TRACE, "(self=0x%p)\n", self);
 
   /* Get the addresses of the requester */
   self->daddr = irttp_get_daddr(self->tsap);
@@ -741,8 +741,8 @@ irnet_find_socket(irnet_socket *    self)
       new = (irnet_socket *) hashbin_find(irnet_server.list,
                                          0, self->rname);
       if(new)
-       DEBUG(IRDA_SERV_INFO, "Socket 0x%X matches rname ``%s''.\n",
-             (unsigned int) new, new->rname);
+       DEBUG(IRDA_SERV_INFO, "Socket 0x%p matches rname ``%s''.\n",
+             new, new->rname);
     }
 
   /* If no name matches, try to find an socket by the destination address */
@@ -758,8 +758,8 @@ irnet_find_socket(irnet_socket *    self)
          if((new->rdaddr == self->daddr) || (new->daddr == self->daddr))
            {
              /* Yes !!! Get it.. */
-             DEBUG(IRDA_SERV_INFO, "Socket 0x%X matches daddr %#08x.\n",
-                   (unsigned int) new, self->daddr);
+             DEBUG(IRDA_SERV_INFO, "Socket 0x%p matches daddr %#08x.\n",
+                   new, self->daddr);
              break;
            }
          new = (irnet_socket *) hashbin_get_next(irnet_server.list);
@@ -777,8 +777,8 @@ irnet_find_socket(irnet_socket *    self)
             (new->rname[0] == '\0') && (new->ppp_open))
            {
              /* Yes !!! Get it.. */
-             DEBUG(IRDA_SERV_INFO, "Socket 0x%X is free.\n",
-                   (unsigned int) new);
+             DEBUG(IRDA_SERV_INFO, "Socket 0x%p is free.\n",
+                   new);
              break;
            }
          new = (irnet_socket *) hashbin_get_next(irnet_server.list);
@@ -788,7 +788,7 @@ irnet_find_socket(irnet_socket *    self)
   /* Spin lock end */
   spin_unlock_bh(&irnet_server.spinlock);
 
-  DEXIT(IRDA_SERV_TRACE, " - new = 0x%X\n", (unsigned int) new);
+  DEXIT(IRDA_SERV_TRACE, " - new = 0x%p\n", new);
   return new;
 }
 
@@ -806,8 +806,8 @@ irnet_connect_socket(irnet_socket * server,
                     __u32              max_sdu_size,
                     __u8               max_header_size)
 {
-  DENTER(IRDA_SERV_TRACE, "(server=0x%X, new=0x%X)\n",
-        (unsigned int) server, (unsigned int) new);
+  DENTER(IRDA_SERV_TRACE, "(server=0x%p, new=0x%p)\n",
+        server, new);
 
   /* Now attach up the new socket */
   new->tsap = irttp_dup(server->tsap, new);
@@ -878,7 +878,7 @@ static inline void
 irnet_disconnect_server(irnet_socket * self,
                        struct sk_buff *skb)
 {
-  DENTER(IRDA_SERV_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_SERV_TRACE, "(self=0x%p)\n", self);
 
   /* Put the received packet in the black hole */
   kfree_skb(skb);
@@ -1010,8 +1010,8 @@ irnet_data_indication(void *      instance,
   unsigned char *      p;
   int                  code = 0;
 
-  DENTER(IRDA_TCB_TRACE, "(self/ap=0x%X, skb=0x%X)\n",
-        (unsigned int) ap,(unsigned int) skb);
+  DENTER(IRDA_TCB_TRACE, "(self/ap=0x%p, skb=0x%p)\n",
+        ap, skb);
   DASSERT(skb != NULL, 0, IRDA_CB_ERROR, "skb is NULL !!!\n");
 
   /* Check is ppp is ready to receive our packet */
@@ -1081,7 +1081,7 @@ irnet_disconnect_indication(void *        instance,
   int                  test_open;
   int                  test_connect;
 
-  DENTER(IRDA_TCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_TCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(self != NULL, , IRDA_CB_ERROR, "Self is NULL !!!\n");
 
   /* Don't care about it, but let's not leak it */
@@ -1171,7 +1171,7 @@ irnet_connect_confirm(void *      instance,
 {
   irnet_socket *       self = (irnet_socket *) instance;
 
-  DENTER(IRDA_TCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_TCB_TRACE, "(self=0x%p)\n", self);
 
   /* Check if socket is closing down (via irda_irnet_destroy()) */
   if(! test_bit(0, &self->ttp_connect))
@@ -1237,7 +1237,7 @@ irnet_flow_indication(void *      instance,
   irnet_socket *       self = (irnet_socket *) instance;
   LOCAL_FLOW           oldflow = self->tx_flow;
 
-  DENTER(IRDA_TCB_TRACE, "(self=0x%X, flow=%d)\n", (unsigned int) self, flow);
+  DENTER(IRDA_TCB_TRACE, "(self=0x%p, flow=%d)\n", self, flow);
 
   /* Update our state */
   self->tx_flow = flow;
@@ -1278,7 +1278,7 @@ irnet_status_indication(void *    instance,
 {
   irnet_socket *       self = (irnet_socket *) instance;
 
-  DENTER(IRDA_TCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_TCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(self != NULL, , IRDA_CB_ERROR, "Self is NULL !!!\n");
 
   /* We can only get this event if we are connected */
@@ -1320,9 +1320,9 @@ irnet_connect_indication(void *           instance,
   irnet_socket *       server = &irnet_server.s;
   irnet_socket *       new = (irnet_socket *) NULL;
 
-  DENTER(IRDA_TCB_TRACE, "(server=0x%X)\n", (unsigned int) server);
+  DENTER(IRDA_TCB_TRACE, "(server=0x%p)\n", server);
   DASSERT(instance == &irnet_server, , IRDA_CB_ERROR,
-         "Invalid instance (0x%X) !!!\n", (unsigned int) instance);
+         "Invalid instance (0x%p) !!!\n", instance);
   DASSERT(sap == irnet_server.s.tsap, , IRDA_CB_ERROR, "Invalid sap !!!\n");
 
   /* Try to find the most appropriate IrNET socket */
@@ -1466,7 +1466,7 @@ irnet_getvalue_confirm(int        result,
 {
   irnet_socket *       self = (irnet_socket *) priv;
 
-  DENTER(IRDA_OCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_OCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(self != NULL, , IRDA_OCB_ERROR, "Self is NULL !!!\n");
 
   /* Check if already connected (via irnet_connect_socket())
@@ -1530,7 +1530,7 @@ irnet_discovervalue_confirm(int           result,
   irnet_socket *       self = (irnet_socket *) priv;
   __u8                 dtsap_sel;              /* TSAP we are looking for */
 
-  DENTER(IRDA_OCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_OCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(self != NULL, , IRDA_OCB_ERROR, "Self is NULL !!!\n");
 
   /* Check if already connected (via irnet_connect_socket())
@@ -1583,8 +1583,8 @@ irnet_discovervalue_confirm(int           result,
   self->iriap = NULL;
 
   /* No more items : remove the log and signal termination */
-  DEBUG(IRDA_OCB_INFO, "Cleaning up log (0x%X)\n",
-       (unsigned int) self->discoveries);
+  DEBUG(IRDA_OCB_INFO, "Cleaning up log (0x%p)\n",
+       self->discoveries);
   if(self->discoveries != NULL)
     {
       /* Cleanup our copy of the discovery log */
@@ -1643,9 +1643,9 @@ irnet_discovery_indication(discinfo_t *           discovery,
 {
   irnet_socket *       self = &irnet_server.s;
        
-  DENTER(IRDA_OCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_OCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(priv == &irnet_server, , IRDA_OCB_ERROR,
-         "Invalid instance (0x%X) !!!\n", (unsigned int) priv);
+         "Invalid instance (0x%p) !!!\n", priv);
 
   DEBUG(IRDA_OCB_INFO, "Discovered new IrNET/IrLAN node %s...\n",
        discovery->info);
@@ -1674,9 +1674,9 @@ irnet_expiry_indication(discinfo_t *      expiry,
 {
   irnet_socket *       self = &irnet_server.s;
        
-  DENTER(IRDA_OCB_TRACE, "(self=0x%X)\n", (unsigned int) self);
+  DENTER(IRDA_OCB_TRACE, "(self=0x%p)\n", self);
   DASSERT(priv == &irnet_server, , IRDA_OCB_ERROR,
-         "Invalid instance (0x%X) !!!\n", (unsigned int) priv);
+         "Invalid instance (0x%p) !!!\n", priv);
 
   DEBUG(IRDA_OCB_INFO, "IrNET/IrLAN node %s expired...\n",
        expiry->info);
index 187871a4208aba0367192c818d25bd123609e961..b724fb087220f112e541e04bbd27fc3f23be21e5 100644 (file)
@@ -43,7 +43,7 @@ irnet_ctrl_write(irnet_socket *       ap,
   char *       next;           /* Next command to process */
   int          length;         /* Length of current command */
 
-  DENTER(CTRL_TRACE, "(ap=0x%X, count=%d)\n", (unsigned int) ap, count);
+  DENTER(CTRL_TRACE, "(ap=0x%p, count=%Zd)\n", ap, count);
 
   /* Check for overflow... */
   DABORT(count >= IRNET_MAX_COMMAND, -ENOMEM,
@@ -58,7 +58,7 @@ irnet_ctrl_write(irnet_socket *       ap,
 
   /* Safe terminate the string */
   command[count] = '\0';
-  DEBUG(CTRL_INFO, "Command line received is ``%s'' (%d).\n",
+  DEBUG(CTRL_INFO, "Command line received is ``%s'' (%Zd).\n",
        command, count);
 
   /* Check every commands in the command line */
@@ -184,8 +184,8 @@ irnet_read_discovery_log(irnet_socket *     ap,
 {
   int          done_event = 0;
 
-  DENTER(CTRL_TRACE, "(ap=0x%X, event=0x%X)\n",
-        (unsigned int) ap, (unsigned int) event);
+  DENTER(CTRL_TRACE, "(ap=0x%p, event=0x%p)\n",
+        ap, event);
 
   /* Test if we have some work to do or we have already finished */
   if(ap->disco_number == -1)
@@ -205,8 +205,8 @@ irnet_read_discovery_log(irnet_socket *     ap,
       /* Check if the we got some results */
       if(ap->discoveries == NULL)
        ap->disco_number = -1;
-      DEBUG(CTRL_INFO, "Got the log (0x%X), size is %d\n",
-           (unsigned int) ap->discoveries, ap->disco_number);
+      DEBUG(CTRL_INFO, "Got the log (0x%p), size is %d\n",
+           ap->discoveries, ap->disco_number);
     }
 
   /* Check if we have more item to dump */
@@ -232,8 +232,8 @@ irnet_read_discovery_log(irnet_socket *     ap,
   if(ap->disco_index >= ap->disco_number)
     {
       /* No more items : remove the log and signal termination */
-      DEBUG(CTRL_INFO, "Cleaning up log (0x%X)\n",
-           (unsigned int) ap->discoveries);
+      DEBUG(CTRL_INFO, "Cleaning up log (0x%p)\n",
+           ap->discoveries);
       if(ap->discoveries != NULL)
        {
          /* Cleanup our copy of the discovery log */
@@ -261,7 +261,7 @@ irnet_ctrl_read(irnet_socket *      ap,
   char         event[64];      /* Max event is 61 char */
   ssize_t      ret = 0;
 
-  DENTER(CTRL_TRACE, "(ap=0x%X, count=%d)\n", (unsigned int) ap, count);
+  DENTER(CTRL_TRACE, "(ap=0x%p, count=%Zd)\n", ap, count);
 
   /* Check if we can write an event out in one go */
   DABORT(count < sizeof(event), -EOVERFLOW, CTRL_ERROR, "Buffer to small.\n");
@@ -307,7 +307,7 @@ irnet_ctrl_read(irnet_socket *      ap,
   if(ret != 0)
     {
       /* No, return the error code */
-      DEXIT(CTRL_TRACE, " - ret %d\n", ret);
+      DEXIT(CTRL_TRACE, " - ret %Zd\n", ret);
       return ret;
     }
 
@@ -402,7 +402,7 @@ irnet_ctrl_poll(irnet_socket *      ap,
 {
   unsigned int mask;
 
-  DENTER(CTRL_TRACE, "(ap=0x%X)\n", (unsigned int) ap);
+  DENTER(CTRL_TRACE, "(ap=0x%p)\n", ap);
 
   poll_wait(file, &irnet_events.rwait, wait);
   mask = POLLOUT | POLLWRNORM;
@@ -439,7 +439,7 @@ dev_irnet_open(struct inode *       inode,
   struct irnet_socket *        ap;
   int                  err;
 
-  DENTER(FS_TRACE, "(file=0x%X)\n", (unsigned int) file);
+  DENTER(FS_TRACE, "(file=0x%p)\n", file);
 
 #ifdef SECURE_DEVIRNET
   /* This could (should?) be enforced by the permissions on /dev/irnet. */
@@ -482,7 +482,7 @@ dev_irnet_open(struct inode *       inode,
   /* Put our stuff where we will be able to find it later */
   file->private_data = ap;
 
-  DEXIT(FS_TRACE, " - ap=0x%X\n", (unsigned int) ap);
+  DEXIT(FS_TRACE, " - ap=0x%p\n", ap);
   return 0;
 }
 
@@ -498,8 +498,8 @@ dev_irnet_close(struct inode *      inode,
 {
   irnet_socket *       ap = (struct irnet_socket *) file->private_data;
 
-  DENTER(FS_TRACE, "(file=0x%X, ap=0x%X)\n",
-        (unsigned int) file, (unsigned int) ap);
+  DENTER(FS_TRACE, "(file=0x%p, ap=0x%p)\n",
+        file, ap);
   DABORT(ap == NULL, 0, FS_ERROR, "ap is NULL !!!\n");
 
   /* Detach ourselves */
@@ -535,8 +535,8 @@ dev_irnet_write(struct file *       file,
 {
   irnet_socket *       ap = (struct irnet_socket *) file->private_data;
 
-  DPASS(FS_TRACE, "(file=0x%X, ap=0x%X, count=%d)\n",
-       (unsigned int) file, (unsigned int) ap, count);
+  DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%Zd)\n",
+       file, ap, count);
   DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n");
 
   /* If we are connected to ppp_generic, let it handle the job */
@@ -559,8 +559,8 @@ dev_irnet_read(struct file *        file,
 {
   irnet_socket *       ap = (struct irnet_socket *) file->private_data;
 
-  DPASS(FS_TRACE, "(file=0x%X, ap=0x%X, count=%d)\n",
-       (unsigned int) file, (unsigned int) ap, count);
+  DPASS(FS_TRACE, "(file=0x%p, ap=0x%p, count=%Zd)\n",
+       file, ap, count);
   DABORT(ap == NULL, -ENXIO, FS_ERROR, "ap is NULL !!!\n");
 
   /* If we are connected to ppp_generic, let it handle the job */
@@ -581,8 +581,8 @@ dev_irnet_poll(struct file *        file,
   irnet_socket *       ap = (struct irnet_socket *) file->private_data;
   unsigned int         mask;
 
-  DENTER(FS_TRACE, "(file=0x%X, ap=0x%X)\n",
-        (unsigned int) file, (unsigned int) ap);
+  DENTER(FS_TRACE, "(file=0x%p, ap=0x%p)\n",
+        file, ap);
 
   mask = POLLOUT | POLLWRNORM;
   DABORT(ap == NULL, mask, FS_ERROR, "ap is NULL !!!\n");
@@ -611,8 +611,8 @@ dev_irnet_ioctl(struct inode *      inode,
   int                  err;
   int                  val;
 
-  DENTER(FS_TRACE, "(file=0x%X, ap=0x%X, cmd=0x%X)\n",
-        (unsigned int) file, (unsigned int) ap, cmd);
+  DENTER(FS_TRACE, "(file=0x%p, ap=0x%p, cmd=0x%X)\n",
+        file, ap, cmd);
 
   /* Basic checks... */
   DASSERT(ap != NULL, -ENXIO, PPP_ERROR, "ap is NULL...\n");
@@ -777,8 +777,8 @@ irnet_prepare_skb(irnet_socket *    ap,
   int                  islcp;          /* Protocol == LCP */
   int                  needaddr;       /* Need PPP address */
 
-  DENTER(PPP_TRACE, "(ap=0x%X, skb=0x%X)\n",
-        (unsigned int) ap, (unsigned int) skb);
+  DENTER(PPP_TRACE, "(ap=0x%p, skb=0x%p)\n",
+        ap, skb);
 
   /* Extract PPP protocol from the frame */
   data  = skb->data;
@@ -845,8 +845,8 @@ ppp_irnet_send(struct ppp_channel * chan,
   irnet_socket *       self = (struct irnet_socket *) chan->private;
   int                  ret;
 
-  DENTER(PPP_TRACE, "(channel=0x%X, ap/self=0x%X)\n",
-        (unsigned int) chan, (unsigned int) self);
+  DENTER(PPP_TRACE, "(channel=0x%p, ap/self=0x%p)\n",
+        chan, self);
 
   /* Check if things are somewhat valid... */
   DASSERT(self != NULL, 0, PPP_ERROR, "Self is NULL !!!\n");
@@ -949,8 +949,8 @@ ppp_irnet_ioctl(struct ppp_channel *        chan,
   int                  val;
   u32                  accm[8];
 
-  DENTER(PPP_TRACE, "(channel=0x%X, ap=0x%X, cmd=0x%X)\n",
-        (unsigned int) chan, (unsigned int) ap, cmd);
+  DENTER(PPP_TRACE, "(channel=0x%p, ap=0x%p, cmd=0x%X)\n",
+        chan, ap, cmd);
 
   /* Basic checks... */
   DASSERT(ap != NULL, -ENXIO, PPP_ERROR, "ap is NULL...\n");
index bb51edc7d99bf12dbb02f937783f90b973eb192a..cc9069395d968e9f1eb4fc823bdf092c5ada2e39 100644 (file)
@@ -1408,7 +1408,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
        spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags);
 
        /* Find the old instance */
-       if (!hashbin_find(irttp->tsaps, (int) orig, NULL)) {
+       if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) {
                IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __FUNCTION__);
                spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
                return NULL;