lkml.org 
[lkml]   [2013]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] drivers: net: usb: rtl8150: bug fixing and cleanup
Petko Manolov <petkan@nucleusys.com> :
[...]
> static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
> {
> - return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
> - RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
> - indx, 0, data, size, 500);
> + int res;
> +
> + res = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
> + RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
> + indx, 0, data, size, 500);
> + if (res < 0)
> + dev_dbg(&dev->udev->dev, "%s returned %d\n", __func__, res);
> + return res;

You may move it into a separate patch. It is completely unrelated to the
ctrl_urb changes.

[...]
> +static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, u16 reg)
> {

[...]
> + usb_fill_control_urb(async_urb, dev->udev,
> + usb_sndctrlpipe(dev->udev, 0), (void *) &req->dr,

Useless void * cast.

--
Ueimor


\
 
 \ /
  Last update: 2013-05-18 23:21    [W:0.049 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site