Hi,

This commit fixes warnings reported by checkpatch.pl

Signed-off-by: Jerome Pinot <ngc...@gmail.com>
---
 drivers/staging/ozwpan/ozcdev.c  | 4 ++--
 drivers/staging/ozwpan/ozhcd.c   | 8 ++++----
 drivers/staging/ozwpan/ozpd.c    | 2 +-
 drivers/staging/ozwpan/ozpd.h    | 2 +-
 drivers/staging/ozwpan/ozproto.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
index 5de5981..10c0a96 100644
--- a/drivers/staging/ozwpan/ozcdev.c
+++ b/drivers/staging/ozwpan/ozcdev.c
@@ -217,7 +217,7 @@ static int oz_set_active_pd(const u8 *addr)
        pd = oz_pd_find(addr);
        if (pd) {
                spin_lock_bh(&g_cdev.lock);
-               memcpy(g_cdev.active_addr, addr, ETH_ALEN);
+               ether_addr_copy(g_cdev.active_addr, addr);
                old_pd = g_cdev.active_pd;
                g_cdev.active_pd = pd;
                spin_unlock_bh(&g_cdev.lock);
@@ -283,7 +283,7 @@ static long oz_cdev_ioctl(struct file *filp, unsigned int 
cmd,
                        u8 addr[ETH_ALEN];
                        oz_dbg(ON, "OZ_IOCTL_GET_ACTIVE_PD\n");
                        spin_lock_bh(&g_cdev.lock);
-                       memcpy(addr, g_cdev.active_addr, ETH_ALEN);
+                       ether_addr_copy(addr, g_cdev.active_addr);
                        spin_unlock_bh(&g_cdev.lock);
                        if (copy_to_user((void __user *)arg, addr, ETH_ALEN))
                                return -EFAULT;
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index efaf26f..ec61973 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -354,7 +354,8 @@ static struct oz_endpoint *oz_ep_alloc(int buffer_size, 
gfp_t mem_flags)
  * disabled.
  * Context: softirq or process
  */
-static struct oz_urb_link *oz_uncancel_urb(struct oz_hcd *ozhcd, struct urb 
*urb)
+static struct oz_urb_link *oz_uncancel_urb(struct oz_hcd *ozhcd,
+                                               struct urb *urb)
 {
        struct oz_urb_link *urbl;
        struct list_head *e;
@@ -1986,8 +1987,7 @@ static void oz_get_hub_descriptor(struct usb_hcd *hcd,
        memset(desc, 0, sizeof(*desc));
        desc->bDescriptorType = 0x29;
        desc->bDescLength = 9;
-       desc->wHubCharacteristics = (__force __u16)
-                       __constant_cpu_to_le16(0x0001);
+       desc->wHubCharacteristics = (__force __u16)cpu_to_le16(0x0001);
        desc->bNbrPorts = OZ_NB_PORTS;
 }
 
@@ -2181,7 +2181,7 @@ static int oz_hcd_hub_control(struct usb_hcd *hcd, u16 
req_type, u16 wvalue,
                break;
        case GetHubStatus:
                oz_dbg(HUB, "GetHubStatus: req_type = 0x%x\n", req_type);
-               put_unaligned(__constant_cpu_to_le32(0), (__le32 *)buf);
+               put_unaligned(cpu_to_le32(0), (__le32 *)buf);
                break;
        case GetPortStatus:
                err = oz_get_port_status(hcd, windex, buf);
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
index 29a23a3..4740238 100644
--- a/drivers/staging/ozwpan/ozpd.c
+++ b/drivers/staging/ozwpan/ozpd.c
@@ -173,7 +173,7 @@ struct oz_pd *oz_pd_alloc(const u8 *mac_addr)
                pd->last_rx_pkt_num = 0xffffffff;
                oz_pd_set_state(pd, OZ_PD_S_IDLE);
                pd->max_tx_size = OZ_MAX_TX_SIZE;
-               memcpy(pd->mac_addr, mac_addr, ETH_ALEN);
+               ether_addr_copy(pd->mac_addr, mac_addr);
                if (0 != oz_elt_buf_init(&pd->elt_buff)) {
                        kfree(pd);
                        pd = NULL;
diff --git a/drivers/staging/ozwpan/ozpd.h b/drivers/staging/ozwpan/ozpd.h
index 56e6fdf..ad5fe7a 100644
--- a/drivers/staging/ozwpan/ozpd.h
+++ b/drivers/staging/ozwpan/ozpd.h
@@ -22,7 +22,7 @@
 #define OZ_TIMER_HEARTBEAT     2
 #define OZ_TIMER_STOP          3
 
-/* 
+/*
  *External spinlock variable
  */
 extern spinlock_t g_polling_lock;
diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index c1325a6..a7e953d 100644
--- a/drivers/staging/ozwpan/ozproto.c
+++ b/drivers/staging/ozwpan/ozproto.c
@@ -672,7 +672,7 @@ void oz_binding_add(const char *net_dev)
        if (!binding)
                return;
 
-       binding->ptype.type = __constant_htons(OZ_ETHERTYPE);
+       binding->ptype.type = htons(OZ_ETHERTYPE);
        binding->ptype.func = oz_pkt_recv;
        if (net_dev && *net_dev) {
                memcpy(binding->name, net_dev, OZ_MAX_BINDING_LEN);
@@ -792,7 +792,7 @@ int oz_get_pd_list(struct oz_mac_addr *addr, int max_count)
                if (count >= max_count)
                        break;
                pd = container_of(e, struct oz_pd, link);
-               memcpy(&addr[count++], pd->mac_addr, ETH_ALEN);
+               ether_addr_copy(&addr[count++], pd->mac_addr);
        }
        spin_unlock_bh(&g_polling_lock);
        return count;
-- 
1.8.4


-- 
Jérôme Pinot
http://ngc891.blogdns.net/
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to