gregkh-usb-usb-isp116x-hcd-add.patch (was 2.6.12-mm1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> This patch provides an "isp116x-hcd" driver for Philips'
> ISP1160/ISP1161 USB host controllers.

--- /dev/null
+++ gregkh-2.6/drivers/usb/host/isp116x-hcd.c

> + *The driver passes all usbtests 1-14.

Missing space.

> +static void preproc_atl_queue(struct isp116x *isp116x)
> +{

> +			/* To please gcc */
> +			toggle = dir = 0;

Oh, just ignore bogus warnings. It's easy. ;-)

> +			ERR("%s %d: ep->nextpid %d\n", __func__, __LINE__,
> +			    ep->nextpid);
> +			BUG_ON(1);

Simply BUG().

> +static int isp116x_urb_enqueue(struct usb_hcd *hcd,
> +			       struct usb_host_endpoint *hep, struct urb *urb,
> +			       int mem_flags)
> +{

> +	if (!hep->hcpriv) {
> +		ep = kcalloc(1, sizeof *ep, (__force unsigned)mem_flags);

Please, drop this cast. The right thing is to change ->urb_enqueue method to
accept unsigned int mem_flags.

> +		if (!ep)
> +			return -ENOMEM;
> +	}

> +static int isp116x_hub_control(struct usb_hcd *hcd,
> +			       u16 typeReq,
> +			       u16 wValue, u16 wIndex, char *buf, u16 wLength)
> +{

> +	case GetHubStatus:
> +		DBG("GetHubStatus\n");
> +		*(__le32 *) buf = cpu_to_le32(0);
				  ^^^^^^^^^^^
Not needed. Zero is zero.

> +static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase)
> +{

> +		INFO("%s suspended\n", (char *)hcd_name);
> +	} else
> +		ERR("%s suspend failed\n", (char *)hcd_name);

Useless casts.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux