Greg,

This patch fixes the kmalloc() flags argument type in USB 
subsystem; hopefully all of its occurences. The patch was 
made against patch-2.6.12-git2 from Jun 20.

Please apply,
Olav
Cleanup of flags for kmalloc() in USB subsystem.

Signed-off-by: Olav Kongas <[EMAIL PROTECTED]>

diff -purN linux-2.6.12-tmp1/drivers/usb/core/buffer.c 
linux-2.6.12-tmp2/drivers/usb/core/buffer.c
--- linux-2.6.12-tmp1/drivers/usb/core/buffer.c 2005-06-21 10:41:37.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/core/buffer.c 2005-06-23 17:33:06.000000000 
+0300
@@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd 
 void *hcd_buffer_alloc (
        struct usb_bus          *bus,
        size_t                  size,
-       int                     mem_flags,
+       unsigned                mem_flags,
        dma_addr_t              *dma
 )
 {
diff -purN linux-2.6.12-tmp1/drivers/usb/core/hcd.c 
linux-2.6.12-tmp2/drivers/usb/core/hcd.c
--- linux-2.6.12-tmp1/drivers/usb/core/hcd.c    2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/core/hcd.c    2005-06-23 17:33:58.000000000 
+0300
@@ -1119,7 +1119,7 @@ static void urb_unlink (struct urb *urb)
  * expects usb_submit_urb() to have sanity checked and conditioned all
  * inputs in the urb
  */
-static int hcd_submit_urb (struct urb *urb, int mem_flags)
+static int hcd_submit_urb (struct urb *urb, unsigned mem_flags)
 {
        int                     status;
        struct usb_hcd          *hcd = urb->dev->bus->hcpriv;
diff -purN linux-2.6.12-tmp1/drivers/usb/core/hcd.h 
linux-2.6.12-tmp2/drivers/usb/core/hcd.h
--- linux-2.6.12-tmp1/drivers/usb/core/hcd.h    2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/core/hcd.h    2005-06-23 17:35:05.000000000 
+0300
@@ -142,12 +142,12 @@ struct hcd_timeout {      /* timeouts we allo
 
 struct usb_operations {
        int (*get_frame_number) (struct usb_device *usb_dev);
-       int (*submit_urb) (struct urb *urb, int mem_flags);
+       int (*submit_urb) (struct urb *urb, unsigned mem_flags);
        int (*unlink_urb) (struct urb *urb, int status);
 
        /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
        void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
-                       int mem_flags,
+                       unsigned mem_flags,
                        dma_addr_t *dma);
        void (*buffer_free)(struct usb_bus *bus, size_t size,
                        void *addr, dma_addr_t dma);
@@ -200,7 +200,7 @@ struct hc_driver {
        int     (*urb_enqueue) (struct usb_hcd *hcd,
                                        struct usb_host_endpoint *ep,
                                        struct urb *urb,
-                                       int mem_flags);
+                                       unsigned mem_flags);
        int     (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
 
        /* hw synch, freeing endpoint resources that urb_dequeue can't */
@@ -247,7 +247,7 @@ int hcd_buffer_create (struct usb_hcd *h
 void hcd_buffer_destroy (struct usb_hcd *hcd);
 
 void *hcd_buffer_alloc (struct usb_bus *bus, size_t size,
-       int mem_flags, dma_addr_t *dma);
+       unsigned mem_flags, dma_addr_t *dma);
 void hcd_buffer_free (struct usb_bus *bus, size_t size,
        void *addr, dma_addr_t dma);
 
diff -purN linux-2.6.12-tmp1/drivers/usb/core/message.c 
linux-2.6.12-tmp2/drivers/usb/core/message.c
--- linux-2.6.12-tmp1/drivers/usb/core/message.c        2005-06-21 
10:41:37.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/core/message.c        2005-06-21 
12:35:50.000000000 +0300
@@ -320,7 +320,7 @@ int usb_sg_init (
        struct scatterlist      *sg,
        int                     nents,
        size_t                  length,
-       int                     mem_flags
+       unsigned                mem_flags
 )
 {
        int                     i;
diff -purN linux-2.6.12-tmp1/drivers/usb/core/urb.c 
linux-2.6.12-tmp2/drivers/usb/core/urb.c
--- linux-2.6.12-tmp1/drivers/usb/core/urb.c    2005-06-21 10:41:37.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/core/urb.c    2005-06-23 17:36:20.000000000 
+0300
@@ -60,7 +60,7 @@ void usb_init_urb(struct urb *urb)
  *
  * The driver must call usb_free_urb() when it is finished with the urb.
  */
-struct urb *usb_alloc_urb(int iso_packets, int mem_flags)
+struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags)
 {
        struct urb *urb;
 
@@ -224,7 +224,7 @@ struct urb * usb_get_urb(struct urb *urb
  *      GFP_NOIO, unless b) or c) apply
  *
  */
-int usb_submit_urb(struct urb *urb, int mem_flags)
+int usb_submit_urb(struct urb *urb, unsigned mem_flags)
 {
        int                     pipe, temp, max;
        struct usb_device       *dev;
diff -purN linux-2.6.12-tmp1/drivers/usb/core/usb.c 
linux-2.6.12-tmp2/drivers/usb/core/usb.c
--- linux-2.6.12-tmp1/drivers/usb/core/usb.c    2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/core/usb.c    2005-06-23 17:36:55.000000000 
+0300
@@ -1118,7 +1118,7 @@ int __usb_get_extra_descriptor(char *buf
 void *usb_buffer_alloc (
        struct usb_device *dev,
        size_t size,
-       int mem_flags,
+       unsigned mem_flags,
        dma_addr_t *dma
 )
 {
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/dummy_hcd.c 
linux-2.6.12-tmp2/drivers/usb/gadget/dummy_hcd.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/dummy_hcd.c    2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/dummy_hcd.c    2005-06-23 
17:49:43.000000000 +0300
@@ -470,7 +470,7 @@ static int dummy_disable (struct usb_ep 
 }
 
 static struct usb_request *
-dummy_alloc_request (struct usb_ep *_ep, int mem_flags)
+dummy_alloc_request (struct usb_ep *_ep, unsigned mem_flags)
 {
        struct dummy_ep         *ep;
        struct dummy_request    *req;
@@ -507,7 +507,7 @@ dummy_alloc_buffer (
        struct usb_ep *_ep,
        unsigned bytes,
        dma_addr_t *dma,
-       int mem_flags
+       unsigned mem_flags
 ) {
        char                    *retval;
        struct dummy_ep         *ep;
@@ -540,7 +540,8 @@ fifo_complete (struct usb_ep *ep, struct
 }
 
 static int
-dummy_queue (struct usb_ep *_ep, struct usb_request *_req, int mem_flags)
+dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
+               unsigned mem_flags)
 {
        struct dummy_ep         *ep;
        struct dummy_request    *req;
@@ -998,7 +999,7 @@ static int dummy_urb_enqueue (
        struct usb_hcd                  *hcd,
        struct usb_host_endpoint        *ep,
        struct urb                      *urb,
-       int                             mem_flags
+       unsigned                        mem_flags
 ) {
        struct dummy    *dum;
        struct urbp     *urbp;
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/ether.c 
linux-2.6.12-tmp2/drivers/usb/gadget/ether.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/ether.c        2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/ether.c        2005-06-23 
18:55:52.000000000 +0300
@@ -945,11 +945,11 @@ config_buf (enum usb_device_speed speed,
 
 /*-------------------------------------------------------------------------*/
 
-static void eth_start (struct eth_dev *dev, int gfp_flags);
-static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags);
+static void eth_start (struct eth_dev *dev, unsigned gfp_flags);
+static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned 
gfp_flags);
 
 static int
-set_ether_config (struct eth_dev *dev, int gfp_flags)
+set_ether_config (struct eth_dev *dev, unsigned gfp_flags)
 {
        int                                     result = 0;
        struct usb_gadget                       *gadget = dev->gadget;
@@ -1079,7 +1079,7 @@ static void eth_reset_config (struct eth
  * that returns config descriptors, and altsetting code.
  */
 static int
-eth_set_config (struct eth_dev *dev, unsigned number, int gfp_flags)
+eth_set_config (struct eth_dev *dev, unsigned number, unsigned gfp_flags)
 {
        int                     result = 0;
        struct usb_gadget       *gadget = dev->gadget;
@@ -1596,7 +1596,7 @@ static void defer_kevent (struct eth_dev
 static void rx_complete (struct usb_ep *ep, struct usb_request *req);
 
 static int
-rx_submit (struct eth_dev *dev, struct usb_request *req, int gfp_flags)
+rx_submit (struct eth_dev *dev, struct usb_request *req, unsigned gfp_flags)
 {
        struct sk_buff          *skb;
        int                     retval = -ENOMEM;
@@ -1722,7 +1722,7 @@ clean:
 }
 
 static int prealloc (struct list_head *list, struct usb_ep *ep,
-                       unsigned n, int gfp_flags)
+                       unsigned n, unsigned gfp_flags)
 {
        unsigned                i;
        struct usb_request      *req;
@@ -1761,7 +1761,7 @@ extra:
        return 0;
 }
 
-static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags)
+static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags)
 {
        int status;
 
@@ -1777,7 +1777,7 @@ fail:
        return status;
 }
 
-static void rx_fill (struct eth_dev *dev, int gfp_flags)
+static void rx_fill (struct eth_dev *dev, unsigned gfp_flags)
 {
        struct usb_request      *req;
        unsigned long           flags;
@@ -2022,7 +2022,7 @@ static int rndis_control_ack (struct net
 
 #endif /* RNDIS */
 
-static void eth_start (struct eth_dev *dev, int gfp_flags)
+static void eth_start (struct eth_dev *dev, unsigned gfp_flags)
 {
        DEBUG (dev, "%s\n", __FUNCTION__);
 
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/goku_udc.c 
linux-2.6.12-tmp2/drivers/usb/gadget/goku_udc.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/goku_udc.c     2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/goku_udc.c     2005-06-23 
18:57:34.000000000 +0300
@@ -269,7 +269,7 @@ static int goku_ep_disable(struct usb_ep
 /*-------------------------------------------------------------------------*/
 
 static struct usb_request *
-goku_alloc_request(struct usb_ep *_ep, int gfp_flags)
+goku_alloc_request(struct usb_ep *_ep, unsigned gfp_flags)
 {
        struct goku_request     *req;
 
@@ -327,7 +327,7 @@ goku_free_request(struct usb_ep *_ep, st
  */
 static void *
 goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
-                       dma_addr_t *dma, int  gfp_flags)
+                       dma_addr_t *dma, unsigned gfp_flags)
 {
        void            *retval;
        struct goku_ep  *ep;
@@ -789,7 +789,7 @@ finished:
 /*-------------------------------------------------------------------------*/
 
 static int
-goku_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+goku_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags)
 {
        struct goku_request     *req;
        struct goku_ep          *ep;
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/lh7a40x_udc.c 
linux-2.6.12-tmp2/drivers/usb/gadget/lh7a40x_udc.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/lh7a40x_udc.c  2005-06-21 
10:41:37.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/lh7a40x_udc.c  2005-06-23 
18:59:29.000000000 +0300
@@ -1106,7 +1106,7 @@ static int lh7a40x_ep_disable(struct usb
 }
 
 static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
-                                                int gfp_flags)
+                                                unsigned gfp_flags)
 {
        struct lh7a40x_request *req;
 
@@ -1134,7 +1134,7 @@ static void lh7a40x_free_request(struct 
 }
 
 static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes,
-                                 dma_addr_t * dma, int gfp_flags)
+                                 dma_addr_t * dma, unsigned gfp_flags)
 {
        char *retval;
 
@@ -1158,7 +1158,7 @@ static void lh7a40x_free_buffer(struct u
  *  NOTE: Sets INDEX register
  */
 static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
-                        int gfp_flags)
+                        unsigned gfp_flags)
 {
        struct lh7a40x_request *req;
        struct lh7a40x_ep *ep;
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/net2280.c 
linux-2.6.12-tmp2/drivers/usb/gadget/net2280.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/net2280.c      2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/net2280.c      2005-06-23 
19:01:08.000000000 +0300
@@ -376,7 +376,7 @@ static int net2280_disable (struct usb_e
 /*-------------------------------------------------------------------------*/
 
 static struct usb_request *
-net2280_alloc_request (struct usb_ep *_ep, int gfp_flags)
+net2280_alloc_request (struct usb_ep *_ep, unsigned gfp_flags)
 {
        struct net2280_ep       *ep;
        struct net2280_request  *req;
@@ -463,7 +463,7 @@ net2280_alloc_buffer (
        struct usb_ep           *_ep,
        unsigned                bytes,
        dma_addr_t              *dma,
-       int                     gfp_flags
+       unsigned                gfp_flags
 )
 {
        void                    *retval;
@@ -897,7 +897,7 @@ done (struct net2280_ep *ep, struct net2
 /*-------------------------------------------------------------------------*/
 
 static int
-net2280_queue (struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+net2280_queue (struct usb_ep *_ep, struct usb_request *_req, unsigned 
gfp_flags)
 {
        struct net2280_request  *req;
        struct net2280_ep       *ep;
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/omap_udc.c 
linux-2.6.12-tmp2/drivers/usb/gadget/omap_udc.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/omap_udc.c     2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/omap_udc.c     2005-06-23 
19:02:29.000000000 +0300
@@ -269,7 +269,7 @@ static int omap_ep_disable(struct usb_ep
 /*-------------------------------------------------------------------------*/
 
 static struct usb_request *
-omap_alloc_request(struct usb_ep *ep, int gfp_flags)
+omap_alloc_request(struct usb_ep *ep, unsigned gfp_flags)
 {
        struct omap_req *req;
 
@@ -298,7 +298,7 @@ omap_alloc_buffer(
        struct usb_ep   *_ep,
        unsigned        bytes,
        dma_addr_t      *dma,
-       int             gfp_flags
+       unsigned        gfp_flags
 )
 {
        void            *retval;
@@ -937,7 +937,7 @@ static void dma_channel_release(struct o
 /*-------------------------------------------------------------------------*/
 
 static int
-omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags)
 {
        struct omap_ep  *ep = container_of(_ep, struct omap_ep, ep);
        struct omap_req *req = container_of(_req, struct omap_req, req);
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/pxa2xx_udc.c 
linux-2.6.12-tmp2/drivers/usb/gadget/pxa2xx_udc.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/pxa2xx_udc.c   2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/pxa2xx_udc.c   2005-06-23 
19:04:01.000000000 +0300
@@ -332,7 +332,7 @@ static int pxa2xx_ep_disable (struct usb
  *     pxa2xx_ep_alloc_request - allocate a request data structure
  */
 static struct usb_request *
-pxa2xx_ep_alloc_request (struct usb_ep *_ep, int gfp_flags)
+pxa2xx_ep_alloc_request (struct usb_ep *_ep, unsigned gfp_flags)
 {
        struct pxa2xx_request *req;
 
@@ -367,7 +367,7 @@ pxa2xx_ep_free_request (struct usb_ep *_
  */
 static void *
 pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
-       dma_addr_t *dma, int gfp_flags)
+       dma_addr_t *dma, unsigned gfp_flags)
 {
        char                    *retval;
 
@@ -874,7 +874,7 @@ done:
 /*-------------------------------------------------------------------------*/
 
 static int
-pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
+pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned 
gfp_flags)
 {
        struct pxa2xx_request   *req;
        struct pxa2xx_ep        *ep;
diff -purN linux-2.6.12-tmp1/drivers/usb/gadget/zero.c 
linux-2.6.12-tmp2/drivers/usb/gadget/zero.c
--- linux-2.6.12-tmp1/drivers/usb/gadget/zero.c 2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/gadget/zero.c 2005-06-23 19:06:06.000000000 
+0300
@@ -612,7 +612,7 @@ static void source_sink_complete (struct
 }
 
 static struct usb_request *
-source_sink_start_ep (struct usb_ep *ep, int gfp_flags)
+source_sink_start_ep (struct usb_ep *ep, unsigned gfp_flags)
 {
        struct usb_request      *req;
        int                     status;
@@ -640,7 +640,7 @@ source_sink_start_ep (struct usb_ep *ep,
 }
 
 static int
-set_source_sink_config (struct zero_dev *dev, int gfp_flags)
+set_source_sink_config (struct zero_dev *dev, unsigned gfp_flags)
 {
        int                     result = 0;
        struct usb_ep           *ep;
@@ -744,7 +744,7 @@ static void loopback_complete (struct us
 }
 
 static int
-set_loopback_config (struct zero_dev *dev, int gfp_flags)
+set_loopback_config (struct zero_dev *dev, unsigned gfp_flags)
 {
        int                     result = 0;
        struct usb_ep           *ep;
@@ -845,7 +845,7 @@ static void zero_reset_config (struct ze
  * by limiting configuration choices (like the pxa2xx).
  */
 static int
-zero_set_config (struct zero_dev *dev, unsigned number, int gfp_flags)
+zero_set_config (struct zero_dev *dev, unsigned number, unsigned gfp_flags)
 {
        int                     result = 0;
        struct usb_gadget       *gadget = dev->gadget;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/ehci-hcd.c 
linux-2.6.12-tmp2/drivers/usb/host/ehci-hcd.c
--- linux-2.6.12-tmp1/drivers/usb/host/ehci-hcd.c       2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/ehci-hcd.c       2005-06-23 
17:39:55.000000000 +0300
@@ -960,7 +960,7 @@ static int ehci_urb_enqueue (
        struct usb_hcd  *hcd,
        struct usb_host_endpoint *ep,
        struct urb      *urb,
-       int             mem_flags
+       unsigned        mem_flags
 ) {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
        struct list_head        qtd_list;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/ehci-q.c 
linux-2.6.12-tmp2/drivers/usb/host/ehci-q.c
--- linux-2.6.12-tmp1/drivers/usb/host/ehci-q.c 2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/host/ehci-q.c 2005-06-23 17:38:50.000000000 
+0300
@@ -898,7 +898,7 @@ submit_async (
        struct usb_host_endpoint *ep,
        struct urb              *urb,
        struct list_head        *qtd_list,
-       int                     mem_flags
+       unsigned                mem_flags
 ) {
        struct ehci_qtd         *qtd;
        int                     epnum;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/ehci-sched.c 
linux-2.6.12-tmp2/drivers/usb/host/ehci-sched.c
--- linux-2.6.12-tmp1/drivers/usb/host/ehci-sched.c     2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/ehci-sched.c     2005-06-21 
12:42:55.000000000 +0300
@@ -588,7 +588,7 @@ static int intr_submit (
        struct usb_host_endpoint *ep,
        struct urb              *urb,
        struct list_head        *qtd_list,
-       int                     mem_flags
+       unsigned                mem_flags
 ) {
        unsigned                epnum;
        unsigned long           flags;
@@ -633,7 +633,7 @@ done:
 /* ehci_iso_stream ops work with both ITD and SITD */
 
 static struct ehci_iso_stream *
-iso_stream_alloc (int mem_flags)
+iso_stream_alloc (unsigned mem_flags)
 {
        struct ehci_iso_stream *stream;
 
@@ -846,7 +846,7 @@ iso_stream_find (struct ehci_hcd *ehci, 
 /* ehci_iso_sched ops can be ITD-only or SITD-only */
 
 static struct ehci_iso_sched *
-iso_sched_alloc (unsigned packets, int mem_flags)
+iso_sched_alloc (unsigned packets, unsigned mem_flags)
 {
        struct ehci_iso_sched   *iso_sched;
        int                     size = sizeof *iso_sched;
@@ -919,7 +919,7 @@ itd_urb_transaction (
        struct ehci_iso_stream  *stream,
        struct ehci_hcd         *ehci,
        struct urb              *urb,
-       int                     mem_flags
+       unsigned                mem_flags
 )
 {
        struct ehci_itd         *itd;
@@ -1412,7 +1412,8 @@ itd_complete (
 
 /*-------------------------------------------------------------------------*/
 
-static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, 
+       unsigned mem_flags)
 {
        int                     status = -EINVAL;
        unsigned long           flags;
@@ -1523,7 +1524,7 @@ sitd_urb_transaction (
        struct ehci_iso_stream  *stream,
        struct ehci_hcd         *ehci,
        struct urb              *urb,
-       int                     mem_flags
+       unsigned                mem_flags
 )
 {
        struct ehci_sitd        *sitd;
@@ -1772,7 +1773,8 @@ sitd_complete (
 }
 
 
-static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, 
+       unsigned mem_flags)
 {
        int                     status = -EINVAL;
        unsigned long           flags;
@@ -1822,7 +1824,8 @@ done:
 #else
 
 static inline int
-sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags)
+sitd_submit (struct ehci_hcd *ehci, struct urb *urb, 
+       unsigned mem_flags)
 {
        ehci_dbg (ehci, "split iso support is disabled\n");
        return -ENOSYS;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/hc_crisv10.c 
linux-2.6.12-tmp2/drivers/usb/host/hc_crisv10.c
--- linux-2.6.12-tmp1/drivers/usb/host/hc_crisv10.c     2005-06-21 
10:41:37.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/hc_crisv10.c     2005-06-21 
12:45:25.000000000 +0300
@@ -463,7 +463,8 @@ static void etrax_usb_free_epid(int epid
 
 static int etrax_remove_from_sb_list(struct urb *urb);
 
-static void* etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int 
mem_flags, dma_addr_t *dma);
+static void* etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, 
+       unsigned mem_flags, dma_addr_t *dma);
 static void etrax_usb_buffer_free(struct usb_bus *bus, size_t size, void 
*addr, dma_addr_t dma);
 
 static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid);
@@ -476,7 +477,7 @@ static int etrax_usb_submit_ctrl_urb(str
 static int etrax_usb_submit_intr_urb(struct urb *urb);
 static int etrax_usb_submit_isoc_urb(struct urb *urb);
 
-static int etrax_usb_submit_urb(struct urb *urb, int mem_flags);
+static int etrax_usb_submit_urb(struct urb *urb, unsigned mem_flags);
 static int etrax_usb_unlink_urb(struct urb *urb, int status);
 static int etrax_usb_get_frame_number(struct usb_device *usb_dev);
 
@@ -1262,7 +1263,7 @@ static int etrax_usb_allocate_epid(void)
        return -1;
 }
 
-static int etrax_usb_submit_urb(struct urb *urb, int mem_flags)
+static int etrax_usb_submit_urb(struct urb *urb, unsigned mem_flags)
 {
        etrax_hc_t *hc;
        int ret = -EINVAL;
@@ -4277,7 +4278,8 @@ etrax_usb_bulk_eot_timer_func(unsigned l
 }
 
 static void*
-etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int mem_flags, 
dma_addr_t *dma)
+etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, 
+       unsigned mem_flags, dma_addr_t *dma)
 {
   return kmalloc(size, mem_flags);
 }
diff -purN linux-2.6.12-tmp1/drivers/usb/host/isp116x-hcd.c 
linux-2.6.12-tmp2/drivers/usb/host/isp116x-hcd.c
--- linux-2.6.12-tmp1/drivers/usb/host/isp116x-hcd.c    2005-06-21 
11:27:53.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/isp116x-hcd.c    2005-06-21 
12:46:42.000000000 +0300
@@ -693,7 +693,7 @@ static int balance(struct isp116x *isp11
 
 static int isp116x_urb_enqueue(struct usb_hcd *hcd,
                               struct usb_host_endpoint *hep, struct urb *urb,
-                              int mem_flags)
+                              unsigned mem_flags)
 {
        struct isp116x *isp116x = hcd_to_isp116x(hcd);
        struct usb_device *udev = urb->dev;
@@ -715,7 +715,7 @@ static int isp116x_urb_enqueue(struct us
        }
        /* avoid all allocations within spinlocks: request or endpoint */
        if (!hep->hcpriv) {
-               ep = kcalloc(1, sizeof *ep, (__force unsigned)mem_flags);
+               ep = kcalloc(1, sizeof *ep, mem_flags);
                if (!ep)
                        return -ENOMEM;
        }
diff -purN linux-2.6.12-tmp1/drivers/usb/host/ohci-hcd.c 
linux-2.6.12-tmp2/drivers/usb/host/ohci-hcd.c
--- linux-2.6.12-tmp1/drivers/usb/host/ohci-hcd.c       2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/ohci-hcd.c       2005-06-21 
12:47:55.000000000 +0300
@@ -180,7 +180,7 @@ static int ohci_urb_enqueue (
        struct usb_hcd  *hcd,
        struct usb_host_endpoint *ep,
        struct urb      *urb,
-       int             mem_flags
+       unsigned        mem_flags
 ) {
        struct ohci_hcd *ohci = hcd_to_ohci (hcd);
        struct ed       *ed;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/ohci-mem.c 
linux-2.6.12-tmp2/drivers/usb/host/ohci-mem.c
--- linux-2.6.12-tmp1/drivers/usb/host/ohci-mem.c       2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/ohci-mem.c       2005-06-21 
12:48:42.000000000 +0300
@@ -84,7 +84,7 @@ dma_to_td (struct ohci_hcd *hc, dma_addr
 
 /* TDs ... */
 static struct td *
-td_alloc (struct ohci_hcd *hc, int mem_flags)
+td_alloc (struct ohci_hcd *hc, unsigned mem_flags)
 {
        dma_addr_t      dma;
        struct td       *td;
@@ -118,7 +118,7 @@ td_free (struct ohci_hcd *hc, struct td 
 
 /* EDs ... */
 static struct ed *
-ed_alloc (struct ohci_hcd *hc, int mem_flags)
+ed_alloc (struct ohci_hcd *hc, unsigned mem_flags)
 {
        dma_addr_t      dma;
        struct ed       *ed;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/sl811-hcd.c 
linux-2.6.12-tmp2/drivers/usb/host/sl811-hcd.c
--- linux-2.6.12-tmp1/drivers/usb/host/sl811-hcd.c      2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/drivers/usb/host/sl811-hcd.c      2005-06-23 
17:41:53.000000000 +0300
@@ -815,7 +815,7 @@ static int sl811h_urb_enqueue(
        struct usb_hcd          *hcd,
        struct usb_host_endpoint *hep,
        struct urb              *urb,
-       int                     mem_flags
+       unsigned                mem_flags
 ) {
        struct sl811            *sl811 = hcd_to_sl811(hcd);
        struct usb_device       *udev = urb->dev;
diff -purN linux-2.6.12-tmp1/drivers/usb/host/uhci-q.c 
linux-2.6.12-tmp2/drivers/usb/host/uhci-q.c
--- linux-2.6.12-tmp1/drivers/usb/host/uhci-q.c 2005-06-21 10:59:13.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/host/uhci-q.c 2005-06-23 17:44:00.000000000 
+0300
@@ -1164,7 +1164,7 @@ static struct urb *uhci_find_urb_ep(stru
 
 static int uhci_urb_enqueue(struct usb_hcd *hcd,
                struct usb_host_endpoint *ep,
-               struct urb *urb, int mem_flags)
+               struct urb *urb, unsigned mem_flags)
 {
        int ret;
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
diff -purN linux-2.6.12-tmp1/drivers/usb/net/kaweth.c 
linux-2.6.12-tmp2/drivers/usb/net/kaweth.c
--- linux-2.6.12-tmp1/drivers/usb/net/kaweth.c  2005-06-21 10:41:38.000000000 
+0300
+++ linux-2.6.12-tmp2/drivers/usb/net/kaweth.c  2005-06-23 18:32:42.000000000 
+0300
@@ -477,7 +477,7 @@ static int kaweth_reset(struct kaweth_de
 }
 
 static void kaweth_usb_receive(struct urb *, struct pt_regs *regs);
-static int kaweth_resubmit_rx_urb(struct kaweth_device *, int);
+static int kaweth_resubmit_rx_urb(struct kaweth_device *, unsigned);
 
 /****************************************************************
        int_callback
@@ -550,7 +550,7 @@ static void kaweth_resubmit_tl(void *d)
  *     kaweth_resubmit_rx_urb
  ****************************************************************/
 static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth,
-                                               int mem_flags)
+                                               unsigned mem_flags)
 {
        int result;
 
diff -purN linux-2.6.12-tmp1/include/linux/usb.h 
linux-2.6.12-tmp2/include/linux/usb.h
--- linux-2.6.12-tmp1/include/linux/usb.h       2005-06-21 10:41:50.000000000 
+0300
+++ linux-2.6.12-tmp2/include/linux/usb.h       2005-06-23 18:06:24.000000000 
+0300
@@ -939,17 +939,17 @@ static inline void usb_fill_int_urb (str
 }
 
 extern void usb_init_urb(struct urb *urb);
-extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags);
+extern struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags);
 extern void usb_free_urb(struct urb *urb);
 #define usb_put_urb usb_free_urb
 extern struct urb *usb_get_urb(struct urb *urb);
-extern int usb_submit_urb(struct urb *urb, int mem_flags);
+extern int usb_submit_urb(struct urb *urb, unsigned mem_flags);
 extern int usb_unlink_urb(struct urb *urb);
 extern void usb_kill_urb(struct urb *urb);
 
 #define HAVE_USB_BUFFERS
 void *usb_buffer_alloc (struct usb_device *dev, size_t size,
-       int mem_flags, dma_addr_t *dma);
+       unsigned mem_flags, dma_addr_t *dma);
 void usb_buffer_free (struct usb_device *dev, size_t size,
        void *addr, dma_addr_t dma);
 
@@ -1056,7 +1056,7 @@ int usb_sg_init (
        struct scatterlist      *sg,
        int                     nents,
        size_t                  length,
-       int                     mem_flags
+       unsigned                mem_flags
 );
 void usb_sg_cancel (struct usb_sg_request *io);
 void usb_sg_wait (struct usb_sg_request *io);
diff -purN linux-2.6.12-tmp1/include/linux/usb_gadget.h 
linux-2.6.12-tmp2/include/linux/usb_gadget.h
--- linux-2.6.12-tmp1/include/linux/usb_gadget.h        2005-06-21 
10:59:13.000000000 +0300
+++ linux-2.6.12-tmp2/include/linux/usb_gadget.h        2005-06-23 
18:42:53.000000000 +0300
@@ -107,18 +107,18 @@ struct usb_ep_ops {
        int (*disable) (struct usb_ep *ep);
 
        struct usb_request *(*alloc_request) (struct usb_ep *ep,
-               int gfp_flags);
+               unsigned gfp_flags);
        void (*free_request) (struct usb_ep *ep, struct usb_request *req);
 
        void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes,
-               dma_addr_t *dma, int gfp_flags);
+               dma_addr_t *dma, unsigned gfp_flags);
        void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma,
                unsigned bytes);
        // NOTE:  on 2.6, drivers may also use dma_map() and
        // dma_sync_single_*() to directly manage dma overhead. 
 
        int (*queue) (struct usb_ep *ep, struct usb_request *req,
-               int gfp_flags);
+               unsigned gfp_flags);
        int (*dequeue) (struct usb_ep *ep, struct usb_request *req);
 
        int (*set_halt) (struct usb_ep *ep, int value);
@@ -214,7 +214,7 @@ usb_ep_disable (struct usb_ep *ep)
  * Returns the request, or null if one could not be allocated.
  */
 static inline struct usb_request *
-usb_ep_alloc_request (struct usb_ep *ep, int gfp_flags)
+usb_ep_alloc_request (struct usb_ep *ep, unsigned gfp_flags)
 {
        return ep->ops->alloc_request (ep, gfp_flags);
 }
@@ -254,7 +254,7 @@ usb_ep_free_request (struct usb_ep *ep, 
  */
 static inline void *
 usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma,
-       int gfp_flags)
+       unsigned gfp_flags)
 {
        return ep->ops->alloc_buffer (ep, len, dma, gfp_flags);
 }
@@ -330,7 +330,7 @@ usb_ep_free_buffer (struct usb_ep *ep, v
  * reported when the usb peripheral is disconnected.
  */
 static inline int
-usb_ep_queue (struct usb_ep *ep, struct usb_request *req, int gfp_flags)
+usb_ep_queue (struct usb_ep *ep, struct usb_request *req, unsigned gfp_flags)
 {
        return ep->ops->queue (ep, req, gfp_flags);
 }

Reply via email to