android_kernel_xiaomi_sm8350/drivers/usb/gadget
Julia Lawall 00185a60c3 USB: Remove redundant test in pxa27x_udc and ftdi_sio
priv is checked not to be NULL near the beginning of the function and not
changed subsequently, making the test redundant.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:28 -07:00
..
amd5536udc.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
amd5536udc.h
at91_udc.c gadget: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:42 -08:00
at91_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
atmel_usba_udc.c gadget: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:42 -08:00
atmel_usba_udc.h
cdc2.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
ci13xxx_udc.c USB: gadget: MIPS ci13xxx_udc 2009-01-07 09:59:58 -08:00
ci13xxx_udc.h USB: gadget: MIPS ci13xxx_udc 2009-01-07 09:59:58 -08:00
composite.c USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index 2009-01-27 16:15:35 -08:00
config.c usb/gadget: fix kernel-doc warning 2008-10-22 10:05:28 -07:00
dummy_hcd.c USB: gadget: dummy_hcd: implement set_wedge 2008-10-17 14:40:52 -07:00
epautoconf.c USB: gadget: change simple_strtol to simple_strtoul 2009-01-07 09:59:58 -08:00
ether.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_acm.c USB: gadget: cdc-acm deadlock fix 2008-11-13 14:45:06 -08:00
f_ecm.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
f_loopback.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_obex.c usb: gadget: obex: select correct ep descriptors 2009-02-27 14:40:50 -08:00
f_phonet.c phonet: update to net_device_ops 2009-01-07 17:24:34 -08:00
f_rndis.c USB: gadget: fix rndis regression 2009-03-24 16:20:26 -07:00
f_serial.c usb gadget: remove needless struct members 2008-08-13 17:32:57 -07:00
f_sourcesink.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_subset.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
file_storage.c USB: g_file_storage: automatically disable stalls under Atmel 2009-02-27 14:40:50 -08:00
fsl_qe_udc.c USB: fsl_qe_udc: Fix stalled TX requests bug 2009-02-09 11:19:47 -08:00
fsl_qe_udc.h usb/fsl_qe_udc: fix response to get status request 2008-10-17 14:41:08 -07:00
fsl_usb2_udc.c USB: fsl_usb2_udc: fix potential queue head corruption 2009-02-27 14:40:50 -08:00
fsl_usb2_udc.h fsl_usb2_udc: Fix some sparse warnings and remove redundant code. 2008-10-17 14:41:05 -07:00
g_zero.h
gadget_chips.h USB: add imx udc gadget driver 2009-01-07 10:00:11 -08:00
gmidi.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
goku_udc.c USB: Fix goku_udc usb speed handling 2009-01-07 10:00:13 -08:00
goku_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
imx_udc.c USB: GADGET: fix !x & y 2009-01-27 16:15:37 -08:00
imx_udc.h USB: add imx udc gadget driver 2009-01-07 10:00:11 -08:00
inode.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
Kconfig USB: pxa27x_udc: add otg transceiver support 2009-03-24 16:20:27 -07:00
lh7a40x_udc.c gadget: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:42 -08:00
lh7a40x_udc.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
m66592-udc.c USB: m66592 and r8a66597 resource changes 2009-01-07 09:59:53 -08:00
m66592-udc.h sh: sh_mobile usbf clock framework support 2008-12-22 18:42:51 +09:00
Makefile USB: add imx udc gadget driver 2009-01-07 10:00:11 -08:00
ndis.h
net2280.c USB: avoid needless address-taking of function parameters 2009-01-07 09:59:50 -08:00
net2280.h USB: gadget: net2280: implement set_wedge 2008-10-17 14:40:52 -07:00
omap_udc.c USB: otg: add otg_put_transceiver() 2009-01-07 10:00:02 -08:00
omap_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
printer.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
pxa25x_udc.c [ARM] 5403/1: pxa25x_ep_fifo_flush() *ep->reg_udccs always set to 0 2009-02-19 11:04:46 +00:00
pxa25x_udc.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
pxa27x_udc.c USB: Remove redundant test in pxa27x_udc and ftdi_sio 2009-03-24 16:20:28 -07:00
pxa27x_udc.h USB: pxa27x_udc: add otg transceiver support 2009-03-24 16:20:27 -07:00
rndis.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
rndis.h
s3c2410_udc.c USB: gadget: s3c2410_udc uses standard GPIO calls 2009-01-07 10:00:02 -08:00
s3c2410_udc.h
serial.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
u_ether.c gadget: convert devices to new API 2009-01-07 18:05:39 -08:00
u_ether.h
u_phonet.h Phonet: USB CDC Phonet function for gadget framework 2008-12-17 15:49:09 -08:00
u_serial.c usb gadget: issue notifications from ACM function 2008-08-13 17:32:57 -07:00
u_serial.h usb gadget: cdc obex glue 2008-10-17 14:40:53 -07:00
usbstring.c
zero.c usb gadget: link fixes for gadget zero 2008-10-16 09:24:46 -07:00