direct-io.hg

changeset 5503:8c0d12e257e2

bitkeeper revision 1.1718.1.1 (42b3d9b3dbLlrBark4MWafH2yPtcRA)

Fixed compiler warnings of "cast to pointer from integer of different
size" which were caused by referencing memory addresses as 32bits on a 64bit
system.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Sat Jun 18 08:22:11 2005 +0000 (2005-06-18)
parents 30735e9ca179
children f915b63407b4
files linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Fri Jun 17 22:54:26 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Sat Jun 18 08:22:11 2005 +0000
     1.3 @@ -623,7 +623,7 @@ static int netif_poll(struct net_device 
     1.4              /* Only copy the packet if it fits in the current MTU. */
     1.5              if (skb->len <= (dev->mtu + ETH_HLEN)) {
     1.6                  if ((skb->tail > skb->end) && net_ratelimit())
     1.7 -                    printk(KERN_INFO "Received packet needs %d bytes more "
     1.8 +                    printk(KERN_INFO "Received packet needs %zd bytes more "
     1.9                             "headroom.\n", skb->tail - skb->end);
    1.10  
    1.11                  if ((nskb = alloc_xen_skb(skb->len + 2)) != NULL) {
    1.12 @@ -967,9 +967,9 @@ static int create_netdev(int handle, str
    1.13  
    1.14      /* Initialise {tx,rx}_skbs to be a free chain containing every entry. */
    1.15      for (i = 0; i <= NETIF_TX_RING_SIZE; i++)
    1.16 -        np->tx_skbs[i] = (void *)(i+1);
    1.17 +        np->tx_skbs[i] = (void *)((unsigned long) i+1);
    1.18      for (i = 0; i <= NETIF_RX_RING_SIZE; i++)
    1.19 -        np->rx_skbs[i] = (void *)(i+1);
    1.20 +        np->rx_skbs[i] = (void *)((unsigned long) i+1);
    1.21  
    1.22      dev->open            = network_open;
    1.23      dev->hard_start_xmit = network_start_xmit;
    1.24 @@ -1343,7 +1343,7 @@ static int xennet_proc_read(
    1.25  {
    1.26      struct net_device *dev = (struct net_device *)((unsigned long)data & ~3UL);
    1.27      struct net_private *np = netdev_priv(dev);
    1.28 -    int len = 0, which_target = (int)data & 3;
    1.29 +    int len = 0, which_target = (unsigned long) data & 3;
    1.30      
    1.31      switch (which_target)
    1.32      {
    1.33 @@ -1368,7 +1368,7 @@ static int xennet_proc_write(
    1.34  {
    1.35      struct net_device *dev = (struct net_device *)((unsigned long)data & ~3UL);
    1.36      struct net_private *np = netdev_priv(dev);
    1.37 -    int which_target = (int)data & 3;
    1.38 +    int which_target = (unsigned long) data & 3;
    1.39      char string[64];
    1.40      long target;
    1.41