android_kernel_xiaomi_sm8350/drivers/usb/serial
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
..
aircable.c USB: usb-serial: fix the aircable_init failure path 2009-02-09 11:19:48 -08:00
ark3116.c usb_serial: API all change 2008-07-22 13:03:22 -07:00
belkin_sa.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
belkin_sa.h belkin_sa: clean up code 2008-07-22 13:03:22 -07:00
bus.c usb-serial-bus: tidy coding style 2008-07-22 13:03:22 -07:00
ch341.c usb_serial: API all change 2008-07-22 13:03:22 -07:00
ChangeLog.history
console.c Add device function for USB serial console 2009-01-02 10:19:38 -08:00
cp2101.c USB: serial: new cp2101 device id 2009-03-17 14:01:28 -07:00
cyberjack.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
cypress_m8.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
cypress_m8.h cypress_m8: coding style 2008-07-22 13:03:23 -07:00
digi_acceleport.c USB: serial: fix up urb->status usage 2009-01-07 10:00:06 -08:00
empeg.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
ezusb_convert.pl
ezusb.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
ftdi_sio.c USB: Remove redundant test in pxa27x_udc and ftdi_sio 2009-03-24 16:20:28 -07:00
ftdi_sio.h USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist interface0 2009-03-17 14:01:28 -07:00
funsoft.c funsoft: Switch to linux/uaccess 2008-07-22 13:03:23 -07:00
garmin_gps.c USB: serial: fix up urb->status usage 2009-01-07 10:00:06 -08:00
generic.c tty: usb-serial krefs 2008-10-13 09:51:41 -07:00
hp4x.c USB: remove info() macro from usb/serial drivers 2008-10-17 14:41:09 -07:00
io_16654.h
io_edgeport.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
io_edgeport.h
io_ionsp.h
io_tables.h tty-usb-io_edgeport: Coding style 2008-07-22 13:03:27 -07:00
io_ti.c USB: remove info() macro from usb/serial drivers 2008-10-17 14:41:09 -07:00
io_ti.h
io_usbvend.h
ipaq.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
ipaq.h
ipw.c USB: serial: ipw.c: mark {__init|__exit} for usb_ipw_{init|exit} 2009-01-07 09:59:54 -08:00
ir-usb.c tty: trivial - fix up email addresses in tty related stuff 2008-11-11 09:30:10 -08:00
iuu_phoenix.c USB: serial: fix up urb->status usage 2009-01-07 10:00:06 -08:00
iuu_phoenix.h
Kconfig USB: add siemens_mpi usb-serial "stub" driver 2009-01-07 10:00:13 -08:00
keyspan_pda.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c USB: remove info() macro from usb/serial drivers 2008-10-17 14:41:09 -07:00
keyspan.h usb_serial: API all change 2008-07-22 13:03:22 -07:00
kl5kusb105.c tty: Drop the lock_kernel in the private ioctl hook 2009-01-02 10:19:42 -08:00
kl5kusb105.h
kobil_sct.c USB: remove info() macro from usb/serial drivers 2008-10-17 14:41:09 -07:00
kobil_sct.h
Makefile USB: add siemens_mpi usb-serial "stub" driver 2009-01-07 10:00:13 -08:00
Makefile-keyspan_pda_fw
mct_u232.c tty: Drop the lock_kernel in the private ioctl hook 2009-01-02 10:19:42 -08:00
mct_u232.h
mos7720.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
mos7840.c USB: serial: fix up urb->status usage 2009-01-07 10:00:06 -08:00
moto_modem.c USB: add new moto_modem driver for some Morotola phones 2008-05-14 10:00:25 -07:00
navman.c tty: usb-serial krefs 2008-10-13 09:51:41 -07:00
omninet.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
opticon.c USB: add new opticon serial driver 2009-01-07 10:00:13 -08:00
option.c USB: Add device id for Option GTM380 to option driver 2009-03-17 14:01:29 -07:00
oti6858.c tty: usb-serial krefs 2008-10-13 09:51:41 -07:00
oti6858.h
pl2303.c USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display 2008-12-17 10:49:15 -08:00
pl2303.h USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display 2008-12-17 10:49:15 -08:00
safe_serial.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
siemens_mpi.c USB: add siemens_mpi usb-serial "stub" driver 2009-01-07 10:00:13 -08:00
sierra.c sierra: Fix formatting 2009-01-02 10:19:36 -08:00
spcp8x5.c USB: serial: fix up urb->status usage 2009-01-07 10:00:06 -08:00
ti_usb_3410_5052.c USB: two more usb ids for ti_usb_3410_5052 2009-02-09 11:19:48 -08:00
ti_usb_3410_5052.h USB: two more usb ids for ti_usb_3410_5052 2009-02-09 11:19:48 -08:00
usb_debug.c USB: serial: usb_debug: Make static 2009-01-07 10:00:03 -08:00
usb-serial.c usb-serial: remove NULL check 2009-01-12 16:37:00 -08:00
visor.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
visor.h
whiteheat.c USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
whiteheat.h whiteheat: coding style 2008-07-22 13:03:22 -07:00