]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: avoid needless address-taking of function parameters
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 29 Oct 2008 21:25:51 +0000 (14:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Jan 2009 17:59:50 +0000 (09:59 -0800)
There's no need to take the address of the function params or local variables
when the direct value byteswapping routines are available.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/usb/kaweth.c
drivers/net/usb/pegasus.c
drivers/usb/core/message.c
drivers/usb/gadget/net2280.c

index 2ee034f70d1c61a1cfd0cbb799f02485ce654bdc..3073ca25a0b06bdffcfa1df3895fbcdfc7096a8f 100644 (file)
@@ -283,9 +283,9 @@ static int kaweth_control(struct kaweth_device *kaweth,
 
        dr->bRequestType= requesttype;
        dr->bRequest = request;
-       dr->wValue = cpu_to_le16p(&value);
-       dr->wIndex = cpu_to_le16p(&index);
-       dr->wLength = cpu_to_le16p(&size);
+       dr->wValue = cpu_to_le16(value);
+       dr->wIndex = cpu_to_le16(index);
+       dr->wLength = cpu_to_le16(size);
 
        return kaweth_internal_control_msg(kaweth->dev,
                                        pipe,
index 166880c113d6718ad00b87f75f0b84caa93867b3..d9241f1c0803e1385f0876f921246da110fa5865 100644 (file)
@@ -150,8 +150,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
        pegasus->dr.bRequestType = PEGASUS_REQT_READ;
        pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS;
        pegasus->dr.wValue = cpu_to_le16(0);
-       pegasus->dr.wIndex = cpu_to_le16p(&indx);
-       pegasus->dr.wLength = cpu_to_le16p(&size);
+       pegasus->dr.wIndex = cpu_to_le16(indx);
+       pegasus->dr.wLength = cpu_to_le16(size);
        pegasus->ctrl_urb->transfer_buffer_length = size;
 
        usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
@@ -208,8 +208,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
        pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
        pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
        pegasus->dr.wValue = cpu_to_le16(0);
-       pegasus->dr.wIndex = cpu_to_le16p(&indx);
-       pegasus->dr.wLength = cpu_to_le16p(&size);
+       pegasus->dr.wIndex = cpu_to_le16(indx);
+       pegasus->dr.wLength = cpu_to_le16(size);
        pegasus->ctrl_urb->transfer_buffer_length = size;
 
        usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
@@ -261,7 +261,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
        pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
        pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
        pegasus->dr.wValue = cpu_to_le16(data);
-       pegasus->dr.wIndex = cpu_to_le16p(&indx);
+       pegasus->dr.wIndex = cpu_to_le16(indx);
        pegasus->dr.wLength = cpu_to_le16(1);
        pegasus->ctrl_urb->transfer_buffer_length = 1;
 
@@ -476,7 +476,7 @@ static inline void get_node_id(pegasus_t * pegasus, __u8 * id)
 
        for (i = 0; i < 3; i++) {
                read_eprom_word(pegasus, i, &w16);
-               ((__le16 *) id)[i] = cpu_to_le16p(&w16);
+               ((__le16 *) id)[i] = cpu_to_le16(w16);
        }
 }
 
index 6d1048faf08e1679597af0fadd6a5849d3afd299..cc47d36798b1418accd1500b2cb803eea5400871 100644 (file)
@@ -139,9 +139,9 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request,
 
        dr->bRequestType = requesttype;
        dr->bRequest = request;
-       dr->wValue = cpu_to_le16p(&value);
-       dr->wIndex = cpu_to_le16p(&index);
-       dr->wLength = cpu_to_le16p(&size);
+       dr->wValue = cpu_to_le16(value);
+       dr->wIndex = cpu_to_le16(index);
+       dr->wLength = cpu_to_le16(size);
 
        /* dbg("usb_control_msg"); */
 
index 8ae70de2c37d805e422566fe9172f18770c6c3e6..12c6d83b218c07ae26c241aa5fc3b4540def2e59 100644 (file)
@@ -669,7 +669,7 @@ fill_dma_desc (struct net2280_ep *ep, struct net2280_request *req, int valid)
 
        /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */
        wmb ();
-       td->dmacount = cpu_to_le32p (&dmacount);
+       td->dmacount = cpu_to_le32(dmacount);
 }
 
 static const u32 dmactl_default =