num(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\))
+ usb_endpoint_type(epd)
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/gadget/udc/r8a66597-udc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Using kfree to free data allocated with devm_kzalloc causes double frees.
The Coccinelle semantic patch that fixes this problem is as follows:
//
@@
expression x;
@@
x = devm_kzalloc(...)
...
?-kfree(x);
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/phy/phy-gpio
IORESOURCE_IO is removed as it allocates
memory that is not needed.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/host/fotg210-hcd.c | 48 --
1 file changed, 9 insertions(+), 39 deletions(-)
diff --git a/drivers/usb/host/fotg210
allocated memory in the probe and remove
functions are done away with. Some labels are removed and a label error
is added to make is less specific to the context. The debug message is
removed as devm_ioremap generates debug messages of its own.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
label err added to make it less specific to
the context.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/host/ohci-tmio.c | 36
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb
done away with and the name of the label err_gpio_pullup is
changed to make it less specific to the context.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/gadget/pxa25x_udc.c | 73 +
1 file changed, 22 insertions(+), 51 deletions
This patch introduces the use of managed interfaces for clk_get and
kzalloc and removes the corresponding free function calls in the probe
and remove functions.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/musb/ux500.c | 28 ++--
1 file changed
This patch introduces the use of managed interface devm_ioremap_resource
for ioremap_nocache and request_mem_region and removes the corresponding
free functions in the probe and remove functions.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/host/xhci-plat.c | 24
This patch introduces the use of managed interface devm_ioremap_resource
for ioremap_nocache and request_mem_region and removes the corresponding
free functions in the probe and remove functions.
Signed-off-by: Himangi Saraogi
---
drivers/usb/host/xhci-plat.c | 25 +
1
are removed and many labels are done
away with. Also, linux/device.h is added to make sure the devm_*()
routine declarations are unambiguously available.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
v2: refreshed and sent again as failed to apply
drivers/net/ethernet/nxp/lpc_eth.c
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi
---
Not compile tested due to incompatible architecture.
drivers/usb/gadge
with and linux/device.h is added to make sure the devm_*()
outine declarations are unambiguously available.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
v2: pass correct arguments to devm_ioremap_resource
Not compile tested due to incompatible architecture.
drivers/usb/host/uhci
done away with. Also, linux/device.h
is added to make sure the devm_*() routine declarations are
unambiguously available.
Signed-off-by: Himangi Saraogi
---
Not compile tested due to incompatible architecture.
v3: pass correct arguments to devm_ioremap_resource
drivers/usb/host/uhci-grlib.c
done away with. Also, linux/device.h
is added to make sure the devm_*() routine declarations are
unambiguously available.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/host/uhci-grlib.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions
with and linux/device.h is added to make sure the devm_*()
outine declarations are unambiguously available.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
Not compile tested due to incompatible architecture.
drivers/usb/host/uhci-platform.c | 23 ++-
1 file
corresponding free functions are
removed and the labels are done away with.
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
drivers/usb/phy/phy-gpio-vbus-usb.c | 45 +++--
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/drivers/usb/phy/phy
There is a call to clk_disable a few lines before the goto
err_alloc_ep_context. The clk goes not get enabled anywhere after that
so this is not required. This patch fixes the bug by removing the deinit
and clk_disable after the goto statement.
Signed-off-by: Himangi Saraogi
---
drivers/usb
in the remove function. The
corresponding free functions are removed and many labels are done away
with. Also, linux/device.h is added to make sure the devm_*()
routine declarations are unambiguously available.
Signed-off-by: Himangi Saraogi
---
drivers/usb/gadget/mv_u3d_core.c | 128
The first patch fixed the bug of calling clk_disable when the clk is
not enabled and the second patch uses devm function and removes the
corresponding free and error handling code and does away with all
labels in the probe function.
Himangi Saraogi (2):
usb: gadget: mv_u3d_core: Correct
(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Sarao
, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
--
ev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
Not compile tested due to incompatible architechture.
why is platform_device_alloc ca
22 matches
Mail list logo