Staging: otus: fix assignment makes integer from pointer without a cast warnings
authorJeff Mahoney <jeffm@suse.com>
Mon, 11 Jan 2010 15:54:30 +0000 (10:54 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:43 +0000 (16:42 -0800)
This patch fixes some %x pointer printing to %p.

It also uses the skb_tail_pointer and skb_mac_header macros for accessing
thos members.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/otus/usbdrv.c
drivers/staging/otus/wrap_pkt.c

index b0adbc8b2dc2403c9e54bad07ecbfbe0ae70815c..5e6a12037b12e10af4e285b93fc86b26ff532310 100644 (file)
@@ -829,7 +829,7 @@ int zfLnxRegisterVapDev(struct net_device* parentDev, u16_t vapId)
 {
     /* Allocate net device structure */
     vap[vapId].dev = alloc_etherdev(0);
-    printk("Register vap dev=%x\n", (u32_t)vap[vapId].dev);
+    printk("Register vap dev=%p\n", vap[vapId].dev);
 
     if(vap[vapId].dev == NULL) {
         printk("alloc_etherdev fail\n");
@@ -883,7 +883,7 @@ int zfLnxUnregisterVapDev(struct net_device* parentDev, u16_t vapId)
     printk("Unregister VAP dev : %s\n", vap[vapId].dev->name);
 
     if(vap[vapId].dev != NULL) {
-        printk("Unregister vap dev=%x\n", (u32_t)vap[vapId].dev);
+        printk("Unregister vap dev=%p\n", vap[vapId].dev);
         //
         //unregister_netdevice(wds[wdsId].dev);
         unregister_netdev(vap[vapId].dev);
index 75bb952fd0a50789ae26f7b8db26d26c7e64ac65..a2f5cb1f529884dc1d995bfddbeb458af8d39f7a 100644 (file)
@@ -58,7 +58,7 @@ void zfLnxRecv80211(zdev_t *dev, zbuf_t *buf, struct zsAdditionInfo *addInfo)
                        skb1 = skb_copy(buf, GFP_ATOMIC);
                        if (skb1 != NULL) {
                                skb1->dev = dev;
-                               skb1->mac_header = skb1->data;
+                               skb_reset_mac_header(skb1);
                                skb1->ip_summed = CHECKSUM_NONE;
                                skb1->pkt_type = PACKET_OTHERHOST;
                                /* ETH_P_80211_RAW */
@@ -85,13 +85,7 @@ void zfLnxRecvEth(zdev_t *dev, zbuf_t *buf, u16_t port)
        /* new_buf = dev_alloc_skb(2048);       */
        new_buf = dev_alloc_skb(buf->len);
 
-#ifdef NET_SKBUFF_DATA_USES_OFFSET
-       new_buf->tail = 0;
-       new_buf->len = 0;
-#else
-       new_buf->tail = new_buf->data;
-       new_buf->len = 0;
-#endif
+       skb_reset_tail_pointer(new_buf);
 
        skb_put(new_buf, buf->len);
        memcpy(new_buf->data, buf->data, buf->len);