Commit eedffd12e07d8fd150618d603d010b491dc90354

Authored by Pete Zaitcev
Committed by Greg Kroah-Hartman
1 parent 5a3201b280

USB: Remove unnecessary zeroing from ub

These zeroings were taken from usb-storage long time ago. I examined
the submission paths and usb_fill_bulk_urb and found them unnecessary.

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 0 additions and 23 deletions Side-by-side Diff

... ... @@ -922,11 +922,6 @@
922 922 usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->send_bulk_pipe,
923 923 bcb, US_BULK_CB_WRAP_LEN, ub_urb_complete, sc);
924 924  
925   - /* Fill what we shouldn't be filling, because usb-storage did so. */
926   - sc->work_urb.actual_length = 0;
927   - sc->work_urb.error_count = 0;
928   - sc->work_urb.status = 0;
929   -
930 925 if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {
931 926 /* XXX Clear stalls */
932 927 ub_complete(&sc->work_done);
... ... @@ -1313,9 +1308,6 @@
1313 1308 sc->last_pipe = pipe;
1314 1309 usb_fill_bulk_urb(&sc->work_urb, sc->dev, pipe, sg_virt(sg),
1315 1310 sg->length, ub_urb_complete, sc);
1316   - sc->work_urb.actual_length = 0;
1317   - sc->work_urb.error_count = 0;
1318   - sc->work_urb.status = 0;
1319 1311  
1320 1312 if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {
1321 1313 /* XXX Clear stalls */
... ... @@ -1356,9 +1348,6 @@
1356 1348 sc->last_pipe = sc->recv_bulk_pipe;
1357 1349 usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->recv_bulk_pipe,
1358 1350 &sc->work_bcs, US_BULK_CS_WRAP_LEN, ub_urb_complete, sc);
1359   - sc->work_urb.actual_length = 0;
1360   - sc->work_urb.error_count = 0;
1361   - sc->work_urb.status = 0;
1362 1351  
1363 1352 if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {
1364 1353 /* XXX Clear stalls */
... ... @@ -1473,9 +1462,6 @@
1473 1462  
1474 1463 usb_fill_control_urb(&sc->work_urb, sc->dev, sc->send_ctrl_pipe,
1475 1464 (unsigned char*) cr, NULL, 0, ub_urb_complete, sc);
1476   - sc->work_urb.actual_length = 0;
1477   - sc->work_urb.error_count = 0;
1478   - sc->work_urb.status = 0;
1479 1465  
1480 1466 if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) {
1481 1467 ub_complete(&sc->work_done);
... ... @@ -1953,9 +1939,6 @@
1953 1939  
1954 1940 usb_fill_control_urb(&sc->work_urb, sc->dev, sc->send_ctrl_pipe,
1955 1941 (unsigned char*) cr, NULL, 0, ub_probe_urb_complete, &compl);
1956   - sc->work_urb.actual_length = 0;
1957   - sc->work_urb.error_count = 0;
1958   - sc->work_urb.status = 0;
1959 1942  
1960 1943 if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) {
1961 1944 printk(KERN_WARNING
... ... @@ -2007,9 +1990,6 @@
2007 1990  
2008 1991 usb_fill_control_urb(&sc->work_urb, sc->dev, sc->recv_ctrl_pipe,
2009 1992 (unsigned char*) cr, p, 1, ub_probe_urb_complete, &compl);
2010   - sc->work_urb.actual_length = 0;
2011   - sc->work_urb.error_count = 0;
2012   - sc->work_urb.status = 0;
2013 1993  
2014 1994 if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0)
2015 1995 goto err_submit;
... ... @@ -2077,9 +2057,6 @@
2077 2057  
2078 2058 usb_fill_control_urb(&sc->work_urb, sc->dev, sc->send_ctrl_pipe,
2079 2059 (unsigned char*) cr, NULL, 0, ub_probe_urb_complete, &compl);
2080   - sc->work_urb.actual_length = 0;
2081   - sc->work_urb.error_count = 0;
2082   - sc->work_urb.status = 0;
2083 2060  
2084 2061 if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) {
2085 2062 printk(KERN_WARNING