Searched +hist:2 +hist:e124b4a (Results 1 - 25 of 105) sorted by relevance

12345

/linux-master/arch/um/drivers/
H A Dchan.hdiff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/linux-master/drivers/tty/serial/
H A Ddz.cdiff f4000a06 Tue Oct 18 15:11:08 MDT 2022 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> serial: dz: Use uart_xmit_advance()

Take advantage of the new uart_xmit_advance() helper.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019091151.6692-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 6e94dbc7 Wed May 05 03:19:05 MDT 2021 Jiri Slaby <jirislaby@kernel.org> tty: cumulate and document tty_struct::flow* members

Group the flow flags under a single struct called flow. The new struct
contains 'stopped' and 'tco_stopped' bools which used to be bits in a
bitfield. The struct also contains the lock protecting them to
potentially share the same cache line.

Note that commit c545b66c6922b (tty: Serialize tcflow() with other tty
flow control changes) added a padding to the original bitfield. It was
for the bitfield to occupy a whole 64b word to avoid interferring stores
on Alpha (cannot we evaporate this arch with weird implications to C
code yet?). But it doesn't work as expected as the padding
(tty_struct::unused) is aligned to a 8B boundary too and occupies some
bytes from the next word.

So make it reliable by:
1) setting __aligned of the struct -- that aligns the start, and
2) making 'unsigned long unused[0]' as the last member of the struct --
pads the end.

This is also the perfect time to start the documentation of tty_struct
where all this lives. So we start by documenting what these bools
actually serve for. And why we do all the alignment dances. Only the few
up-to-date information from the Theodore's comment made it into this new
Kerneldoc comment.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/20210505091928.22010-13-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dzs.cdiff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dtimbuart.cdiff 2b2dd9c6 Mon Aug 17 02:59:21 MDT 2020 Allen Pais <allen.lkml@gmail.com> tty: timbuart: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200817085921.26033-5-allen.cryptic@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 479e9b94 Thu Oct 16 14:54:18 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Refactor uart_flush_buffer() from uart_close()

In the context of the final tty & port close, flushing the tx
ring buffer after the hardware has already been shutdown and
the ring buffer freed is neither required nor desirable.

uart_flush_buffer() performs 3 operations:
1. Resets tx ring buffer indices, but the tx ring buffer has
already been freed and the indices are reset if the port is
re-opened.
2. Calls uart driver's flush_buffer() method
5 in-tree uart drivers define flush_buffer() methods:
amba-pl011, atmel-serial, imx, serial-tegra, timbuart
These have been refactored into the shutdown() method, if
required.
3. Kicks the ldisc for more writing, but this is undesirable.
The file handle is being released; any waiting writer will
will be kicked out by tty_release() with a warning. Further,
the N_TTY ldisc may generate SIGIO for a file handle which
is no longer valid.

Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ee160a38 Thu Sep 01 08:20:57 MDT 2011 Jiri Slaby <jirislaby@kernel.org> TTY: serial, fix includes in some drivers

linux/tty_flip.h is included in linux/serial_core.h. But this may (and
will) change in the future. Then we would get build errors such as:
.../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
.../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’

So fix all the drviers which call tty flip buffer helpers to really
include linux/tty_flip.h. And also make sure that those include
linux/tty.h when operating with struct tty_struct.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H A Dsb1250-duart.cdiff 43df4eb2 Mon Aug 24 10:32:51 MDT 2020 Thomas Bogendoerfer <tsbogend@alpha.franken.de> MIPS: Replace SIBYTE_1956_WAR by CONFIG_SB1_PASS_2_WORKAROUNDS

SB1250 uart bug is related to PASS 2 workarounds. Use config
CONFIG_SB1_PASS_2_WORKAROUNDS directly and get rid of SIBYTE_1956_WAR.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ee160a38 Thu Sep 01 08:20:57 MDT 2011 Jiri Slaby <jirislaby@kernel.org> TTY: serial, fix includes in some drivers

linux/tty_flip.h is included in linux/serial_core.h. But this may (and
will) change in the future. Then we would get build errors such as:
.../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
.../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’

So fix all the drviers which call tty flip buffer helpers to really
include linux/tty_flip.h. And also make sure that those include
linux/tty.h when operating with struct tty_struct.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H A D21285.cdiff 293f8995 Thu Dec 19 07:51:09 MST 2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org> tty: serial: 21285: stop using the unused[] variable from struct uart_port

Much like the samsung_tty driver (now I know where they copied the idea
from), the 21285 uart driver uses 2 bytes from the "unused" array of
struct uart_port to keep tx/rx enabled/disabled state. Those fields are
going away (they were never really needed in the first place), so fix up
the 21285 driver by another horrible hack.

Instead of creating a whole structure for just 2 bytes, just use two
bits from the private_data pointer instead, as that pointer is never
used. The two bits reflect if tx/rx is now enabled/disabled.

Astute readers will note that once rx is disabled, nothing ever seems to
turn it back on, making one wonder if anyone has ever done this.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20191219145109.GA1962496@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 293f8995 Thu Dec 19 07:51:09 MST 2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org> tty: serial: 21285: stop using the unused[] variable from struct uart_port

Much like the samsung_tty driver (now I know where they copied the idea
from), the 21285 uart driver uses 2 bytes from the "unused" array of
struct uart_port to keep tx/rx enabled/disabled state. Those fields are
going away (they were never really needed in the first place), so fix up
the 21285 driver by another horrible hack.

Instead of creating a whole structure for just 2 bytes, just use two
bits from the private_data pointer instead, as that pointer is never
used. The two bits reflect if tx/rx is now enabled/disabled.

Astute readers will note that once rx is disabled, nothing ever seems to
turn it back on, making one wonder if anyone has ever done this.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20191219145109.GA1962496@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dsunzilog.cdiff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 7bbe08d6 Wed Mar 13 17:30:34 MDT 2013 Jiri Slaby <jirislaby@kernel.org> TTY: serial, stop accessing potential NULLs

The following commits:
* 6732c8bb8671acbdac6cdc93dd72ddd581dd5e25 (TTY: switch
tty_schedule_flip)
* 2e124b4a390ca85325fae75764bef92f0547fa25 (TTY: switch
tty_flip_buffer_push)
* 05c7cd39907184328f48d3e7899f9cdd653ad336 (TTY: switch
tty_insert_flip_string)
* 92a19f9cec9a80ad93c06e115822deb729e2c6ad (TTY: switch
tty_insert_flip_char)
* 227434f8986c3827a1faedd1feb437acd6285315 (TTY: switch
tty_buffer_request_room to tty_port)

introduced a potential NULL dereference to some drivers. In
particular, when the device is used as a console, incoming bytes can
kill the box. This is caused by removed checks for TTY against NULL.

It happened because it was unclear to me why the checks were there. I
assumed them superfluous because the interrupts were unbound or
otherwise stopped. But this is not the case for consoles for these
drivers, as was pointed out by David Miller.

Now, this patch re-introduces the checks (at this point we check
port->state, not the tty proper, as we do not care about tty pointers
anymore). For both of the drivers, we place the check below the
handling of break signal so that sysrq can actually work. (One needs
to issue a break and then sysrq key within the following 5 seconds.)

We do not change sc26xx, sunhv, and sunsu here because they behave the
same as before. People having that hardware should fix the driver
eventually, however. They always could unconditionally dereference tty
in receive_chars, port->state in uart_handle_dcd_change, and
up->port.state->port.tty.

There is perhaps more to fix in all those drivers, but they are at
least in a state they were before.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Damba-pl010.cdiff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dsunhv.cdiff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2331e068 Wed Jan 25 10:48:52 MST 2017 Bhumika Goyal <bhumirks@gmail.com> tty: serial: constify uart_ops structures

Declare uart_ops structures as const as they are only stored in the ops
field of an uart_port structure. This field is of type const, so
uart_ops structures having this property can be made const too.

File size details before and after patching.
First line of every .o file shows the file size before patching
and second line shows the size after patching.

text data bss dec hex filename

2977 456 64 3497 da9 drivers/tty/serial/amba-pl010.o
3169 272 64 3505 db1 drivers/tty/serial/amba-pl010.o

3109 456 0 3565 ded drivers/tty/serial/efm32-uart.o
3301 272 0 3573 df5 drivers/tty/serial/efm32-uart.o

10668 753 1 11422 2c9e drivers/tty/serial/icom.o
10860 561 1 11422 2c9e drivers/tty/serial/icom.o

23904 408 8 24320 5f00 drivers/tty/serial/ioc3_serial.o
24088 224 8 24320 5f00 drivers/tty/serial/ioc3_serial.o

10516 560 4 11080 2b48 drivers/tty/serial/ioc4_serial.o
10709 368 4 11081 2b49 drivers/tty/serial/ioc4_serial.o

7853 648 1216 9717 25f5 drivers/tty/serial/mpsc.o
8037 456 1216 9709 25ed drivers/tty/serial/mpsc.o

10248 456 0 10704 29d0 drivers/tty/serial/omap-serial.o
10440 272 0 10712 29d8 drivers/tty/serial/omap-serial.o

8122 532 1984 10638 298e drivers/tty/serial/pmac_zilog.o
8306 340 1984 10630 2986 drivers/tty/serial/pmac_zilog.o

3808 456 0 4264 10a8 drivers/tty/serial/pxa.o
4000 264 0 4264 10a8 drivers/tty/serial/pxa.o

21781 3864 0 25645 642d drivers/tty/serial/serial-tegra.o
22037 3608 0 25645 642d drivers/tty/serial/serial-tegra.o

2481 456 96 3033 bd9 drivers/tty/serial/sprd_serial.o
2673 272 96 3041 be1 drivers/tty/serial/sprd_serial.o

5534 300 512 6346 18ca drivers/tty/serial/vr41xx_siu.o
5630 204 512 6346 18ca drivers/tty/serial/vr41xx_siu.o

6730 1576 128 8434 20f2 drivers/tty/serial/vt8500_serial.o
6986 1320 128 8434 20f2 drivers/tty/serial/vt8500_serial.o

Cross compiled for mips architecture.

3005 488 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o
3189 304 0 3493 da5 drivers/tty/serial/pnx8xxx_uart.o

4272 196 1056 5524 1594 drivers/tty/serial/dz.o
4368 100 1056 5524 1594 drivers/tty/serial/dz.o

6551 144 16 6711 1a37 drivers/tty/serial/ip22zilog.o
6647 48 16 6711 1a37 drivers/tty/serial/ip22zilog.o

9612 428 1520 11560 2d28 drivers/tty/serial/serial_txx9.o
9708 332 1520 11560 2d28 drivers/tty/serial/serial_txx9.o

4156 296 16 4468 1174 drivers/tty/serial/ar933x_uart.o
4252 200 16 4468 1174 drivers/tty/serial/ar933x_uart.o

Cross compiled for arm archiecture.

11716 1780 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o
11808 1688 44 13540 34e4 drivers/tty/serial/sirfsoc_uart.o

13352 596 56 14004 36b4 drivers/tty/serial/amba-pl011.o
13444 504 56 14004 36b4 drivers/tty/serial/amba-pl011.o

Cross compiled for sparc architecture.

4664 528 32 5224 1468 drivers/tty/serial/sunhv.o
4848 344 32 5224 1468 drivers/tty/serial/sunhv.o

8080 332 28 8440 20f8 drivers/tty/serial/sunzilog.o
8184 228 28 8440 20f8 drivers/tty/serial/sunzilog.o

Cross compiled for ia64 architecture.

10226 549 472 11247 2bef drivers/tty/serial/sn_console.o
10414 365 472 11251 2bf3 drivers/tty/serial/sn_console.o

The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
drivers/tty/serial/lantiq.o did not compile.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dsunsab.cdiff 6396bb22 Tue Jun 12 15:03:40 MDT 2018 Kees Cook <keescook@chromium.org> treewide: kzalloc() -> kcalloc()

The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a * b, gfp)

as well as handling cases of:

kzalloc(a * b * c, gfp)

with:

kzalloc(array3_size(a, b, c), gfp)

as it's slightly less ugly than:

kzalloc_array(array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

kzalloc(4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@

(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@

(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)

// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@

- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@

(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
diff 6396bb22 Tue Jun 12 15:03:40 MDT 2018 Kees Cook <keescook@chromium.org> treewide: kzalloc() -> kcalloc()

The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a * b, gfp)

as well as handling cases of:

kzalloc(a * b * c, gfp)

with:

kzalloc(array3_size(a, b, c), gfp)

as it's slightly less ugly than:

kzalloc_array(array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

kzalloc(4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@

(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@

(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)

// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@

- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@

(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
diff 6396bb22 Tue Jun 12 15:03:40 MDT 2018 Kees Cook <keescook@chromium.org> treewide: kzalloc() -> kcalloc()

The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a * b, gfp)

as well as handling cases of:

kzalloc(a * b * c, gfp)

with:

kzalloc(array3_size(a, b, c), gfp)

as it's slightly less ugly than:

kzalloc_array(array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

kzalloc(4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@

(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@

(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)

// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@

- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@

(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
diff 6396bb22 Tue Jun 12 15:03:40 MDT 2018 Kees Cook <keescook@chromium.org> treewide: kzalloc() -> kcalloc()

The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a * b, gfp)

as well as handling cases of:

kzalloc(a * b * c, gfp)

with:

kzalloc(array3_size(a, b, c), gfp)

as it's slightly less ugly than:

kzalloc_array(array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

kzalloc(4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@

(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@

(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)

// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@

- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@

(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
diff 6396bb22 Tue Jun 12 15:03:40 MDT 2018 Kees Cook <keescook@chromium.org> treewide: kzalloc() -> kcalloc()

The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:

kzalloc(a * b, gfp)

with:
kcalloc(a * b, gfp)

as well as handling cases of:

kzalloc(a * b * c, gfp)

with:

kzalloc(array3_size(a, b, c), gfp)

as it's slightly less ugly than:

kzalloc_array(array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

kzalloc(4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@

(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@

(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)

// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@

- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@

(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 7bbe08d6 Wed Mar 13 17:30:34 MDT 2013 Jiri Slaby <jirislaby@kernel.org> TTY: serial, stop accessing potential NULLs

The following commits:
* 6732c8bb8671acbdac6cdc93dd72ddd581dd5e25 (TTY: switch
tty_schedule_flip)
* 2e124b4a390ca85325fae75764bef92f0547fa25 (TTY: switch
tty_flip_buffer_push)
* 05c7cd39907184328f48d3e7899f9cdd653ad336 (TTY: switch
tty_insert_flip_string)
* 92a19f9cec9a80ad93c06e115822deb729e2c6ad (TTY: switch
tty_insert_flip_char)
* 227434f8986c3827a1faedd1feb437acd6285315 (TTY: switch
tty_buffer_request_room to tty_port)

introduced a potential NULL dereference to some drivers. In
particular, when the device is used as a console, incoming bytes can
kill the box. This is caused by removed checks for TTY against NULL.

It happened because it was unclear to me why the checks were there. I
assumed them superfluous because the interrupts were unbound or
otherwise stopped. But this is not the case for consoles for these
drivers, as was pointed out by David Miller.

Now, this patch re-introduces the checks (at this point we check
port->state, not the tty proper, as we do not care about tty pointers
anymore). For both of the drivers, we place the check below the
handling of break signal so that sysrq can actually work. (One needs
to issue a break and then sysrq key within the following 5 seconds.)

We do not change sc26xx, sunhv, and sunsu here because they behave the
same as before. People having that hardware should fix the driver
eventually, however. They always could unconditionally dereference tty
in receive_chars, port->state in uart_handle_dcd_change, and
up->port.state->port.tty.

There is perhaps more to fix in all those drivers, but they are at
least in a state they were before.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dmcf.cdiff 2d141e68 Mon Oct 03 16:49:26 MDT 2022 Jiri Slaby (SUSE) <jirislaby@kernel.org> tty: serial: use uart_port_tx() helper

uart_port_tx() is a new helper to send characters to the device. Use it
in these drivers.

Cc: Tobias Klauser <tklauser@distanz.ch>
Cc: Richard Genoud <richard.genoud@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: "Andreas Färber" <afaerber@suse.de>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20221004104927.14361-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 0139da50 Sun Jul 03 15:45:14 MDT 2022 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> serial: Embed rs485_supported to uart_port

Embed rs485_supported to uart_port to allow serial core to tweak it as
needed.

Reviewed-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220704094515.6831-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2fc0184d Thu Nov 06 01:22:55 MST 2014 Ricardo Ribalda <ribalda@kernel.org> serial/mcf: Use the rs485 functions on serial_core

In order to unify all the rs485 ioctl handling.
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.

Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 5275ad70 Mon Aug 19 08:44:17 MDT 2013 Viresh Kumar <viresh.kumar@linaro.org> tty: serial: mcf: drop uart_port->lock before calling tty_flip_buffer_push()

The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
called with uart_port->lock locked. This never shows up on UP kernels and comes
up only on SMP kernels.

Crash looks like this (produced with samsung.c driver):

-----
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8)
[<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8) from [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0)
[<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c020a1a8>] (s3c24xx_serial_rx_chars+0)
[<c020a1a8>] (s3c24xx_serial_rx_chars+0x12c/0x260) from [<c020aae8>] (s3c64xx_serial_handle_irq+)
[<c020aae8>] (s3c64xx_serial_handle_irq+0x48/0x60) from [<c006aaa0>] (handle_irq_event_percpu+0x)
[<c006aaa0>] (handle_irq_event_percpu+0x50/0x194) from [<c006ac20>] (handle_irq_event+0x3c/0x5c)
[<c006ac20>] (handle_irq_event+0x3c/0x5c) from [<c006d864>] (handle_fasteoi_irq+0x80/0x13c)
[<c006d864>] (handle_fasteoi_irq+0x80/0x13c) from [<c006a4a4>] (generic_handle_irq+0x20/0x30)
[<c006a4a4>] (generic_handle_irq+0x20/0x30) from [<c000f454>] (handle_IRQ+0x38/0x94)
[<c000f454>] (handle_IRQ+0x38/0x94) from [<c0008538>] (gic_handle_irq+0x34/0x68)
[<c0008538>] (gic_handle_irq+0x34/0x68) from [<c00123c0>] (__irq_svc+0x40/0x70)
Exception stack(0xc04cdf70 to 0xc04cdfb8)
df60: 00000000 00000000 0000166e 00000000
df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
[<c00123c0>] (__irq_svc+0x40/0x70) from [<c000f75c>] (arch_cpu_idle+0x28/0x30)
[<c000f75c>] (arch_cpu_idle+0x28/0x30) from [<c0054888>] (cpu_startup_entry+0x5c/0x148)
[<c0054888>] (cpu_startup_entry+0x5c/0x148) from [<c0497aa4>] (start_kernel+0x334/0x38c)
BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
Workqueue: events flush_to_ldisc
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b581c>] (do_raw_spin_lock+0x100/0x17c)
[<c01b581c>] (do_raw_spin_lock+0x100/0x17c) from [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28)
[<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c0203224>] (uart_start+0x18/0x34)
[<c0203224>] (uart_start+0x18/0x34) from [<c01ef890>] (__receive_buf+0x4b4/0x738)
[<c01ef890>] (__receive_buf+0x4b4/0x738) from [<c01efb44>] (n_tty_receive_buf2+0x30/0x98)
[<c01efb44>] (n_tty_receive_buf2+0x30/0x98) from [<c01f2ba8>] (flush_to_ldisc+0xec/0x138)
[<c01f2ba8>] (flush_to_ldisc+0xec/0x138) from [<c0031af0>] (process_one_work+0xfc/0x348)
[<c0031af0>] (process_one_work+0xfc/0x348) from [<c0032138>] (worker_thread+0x138/0x37c)
[<c0032138>] (worker_thread+0x138/0x37c) from [<c0037a7c>] (kthread+0xa4/0xb0)
[<c0037a7c>] (kthread+0xa4/0xb0) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
-----

Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.

Similar stuff was already done for few other drivers in the past, like:

commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue May 29 21:53:50 2007 +0100

[ARM] 4417/1: Serial: Fix AMBA drivers locking

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2b359172 Wed Apr 24 19:17:23 MDT 2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn> serial: mcf: missing uart_unregister_driver() on error in mcf_init()

Add the missing uart_unregister_driver() before return
from mcf_init() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dsunsu.cdiff 9fafe733 Fri May 13 02:29:02 MDT 2022 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> tty: remove CMSPAR ifdefs

CMSPAR is defined by all architectures since commit 6bf08cb246b5
("[PATCH] Add CMSPAR to termbits.h for powerpc and alpha").

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220513082906.11096-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ef8b9ddc Mon Jun 16 06:10:41 MDT 2014 Peter Hurley <peter@hurleysoftware.com> serial: Fix IGNBRK handling

If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
"If IGNBRK is set, a break condition detected on input shall be ignored;
that is, not put on the input queue and therefore not read by any
process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan <athlon_@mail.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff cb29529e Sat Feb 23 16:01:15 MST 2013 Tkhai Kirill <tkhai@yandex.ru> sunsu: Fix panic in case of nonexistent port at "console=ttySY" cmdline option

If a machine has X (X < 4) sunsu ports and cmdline
option "console=ttySY" is passed, where X < Y <= 4,
than the following panic happens:

Unable to handle kernel NULL pointer dereference
TPC: <sunsu_console_setup+0x78/0xe0>
RPC: <sunsu_console_setup+0x74/0xe0>
I7: <register_console+0x378/0x3e0>
Call Trace:
[0000000000453a38] register_console+0x378/0x3e0
[0000000000576fa0] uart_add_one_port+0x2e0/0x340
[000000000057af40] su_probe+0x160/0x2e0
[00000000005b8a4c] platform_drv_probe+0xc/0x20
[00000000005b6c2c] driver_probe_device+0x12c/0x220
[00000000005b6da8] __driver_attach+0x88/0xa0
[00000000005b4df4] bus_for_each_dev+0x54/0xa0
[00000000005b5a54] bus_add_driver+0x154/0x260
[00000000005b7190] driver_register+0x50/0x180
[00000000006d250c] sunsu_init+0x18c/0x1e0
[00000000006c2668] do_one_initcall+0xe8/0x160
[00000000006c282c] kernel_init_freeable+0x12c/0x1e0
[0000000000603764] kernel_init+0x4/0x100
[0000000000405f64] ret_from_syscall+0x1c/0x2c
[0000000000000000] (null)

1)Fix the panic;
2)Increment registered port number every successful
probe.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dapbuart.cdiff c6dcd805 Tue Dec 26 05:16:07 MST 2023 Sam Ravnborg <sam@ravnborg.org> serial: apbuart: fix console prompt on qemu

When using a leon kernel with qemu there where no console prompt.
The root cause is the handling of the fifo size in the tx part of the
apbuart driver.

The qemu uart driver only have a very rudimentary status handling and do
not report the number of chars queued in the tx fifo in the status register.
So the driver ends up with a fifo size of 1.

In the tx path the fifo size is divided by 2 - resulting in a fifo
size of zero.

The original implementation would always try to send one char, but
after the introduction of uart_port_tx_limited() the fifo size is
respected even for the first char.

There seems to be no good reason to divide the fifo size with two - so
remove this. It looks like something copied from the original amba driver.

With qemu we now have a minimum fifo size of one char, so we show
the prompt.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Fixes: d11cc8c3c4b6 ("tty: serial: use uart_port_tx_limited()")
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: <linux-serial@vger.kernel.org>
Cc: <sparclinux@vger.kernel.org>
Link: https://lore.kernel.org/r/20231226121607.GA2622970@ravnborg.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 78d34d75 Mon Aug 19 08:44:07 MDT 2013 Viresh Kumar <viresh.kumar@linaro.org> tty: serial: apbuart: drop uart_port->lock before calling tty_flip_buffer_push()

The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
called with uart_port->lock locked. This never shows up on UP kernels and comes
up only on SMP kernels.

Crash looks like this (produced with samsung.c driver):

-----
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8)
[<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8) from [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0)
[<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c020a1a8>] (s3c24xx_serial_rx_chars+0)
[<c020a1a8>] (s3c24xx_serial_rx_chars+0x12c/0x260) from [<c020aae8>] (s3c64xx_serial_handle_irq+)
[<c020aae8>] (s3c64xx_serial_handle_irq+0x48/0x60) from [<c006aaa0>] (handle_irq_event_percpu+0x)
[<c006aaa0>] (handle_irq_event_percpu+0x50/0x194) from [<c006ac20>] (handle_irq_event+0x3c/0x5c)
[<c006ac20>] (handle_irq_event+0x3c/0x5c) from [<c006d864>] (handle_fasteoi_irq+0x80/0x13c)
[<c006d864>] (handle_fasteoi_irq+0x80/0x13c) from [<c006a4a4>] (generic_handle_irq+0x20/0x30)
[<c006a4a4>] (generic_handle_irq+0x20/0x30) from [<c000f454>] (handle_IRQ+0x38/0x94)
[<c000f454>] (handle_IRQ+0x38/0x94) from [<c0008538>] (gic_handle_irq+0x34/0x68)
[<c0008538>] (gic_handle_irq+0x34/0x68) from [<c00123c0>] (__irq_svc+0x40/0x70)
Exception stack(0xc04cdf70 to 0xc04cdfb8)
df60: 00000000 00000000 0000166e 00000000
df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
[<c00123c0>] (__irq_svc+0x40/0x70) from [<c000f75c>] (arch_cpu_idle+0x28/0x30)
[<c000f75c>] (arch_cpu_idle+0x28/0x30) from [<c0054888>] (cpu_startup_entry+0x5c/0x148)
[<c0054888>] (cpu_startup_entry+0x5c/0x148) from [<c0497aa4>] (start_kernel+0x334/0x38c)
BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
Workqueue: events flush_to_ldisc
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b581c>] (do_raw_spin_lock+0x100/0x17c)
[<c01b581c>] (do_raw_spin_lock+0x100/0x17c) from [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28)
[<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c0203224>] (uart_start+0x18/0x34)
[<c0203224>] (uart_start+0x18/0x34) from [<c01ef890>] (__receive_buf+0x4b4/0x738)
[<c01ef890>] (__receive_buf+0x4b4/0x738) from [<c01efb44>] (n_tty_receive_buf2+0x30/0x98)
[<c01efb44>] (n_tty_receive_buf2+0x30/0x98) from [<c01f2ba8>] (flush_to_ldisc+0xec/0x138)
[<c01f2ba8>] (flush_to_ldisc+0xec/0x138) from [<c0031af0>] (process_one_work+0xfc/0x348)
[<c0031af0>] (process_one_work+0xfc/0x348) from [<c0032138>] (worker_thread+0x138/0x37c)
[<c0032138>] (worker_thread+0x138/0x37c) from [<c0037a7c>] (kthread+0xa4/0xb0)
[<c0037a7c>] (kthread+0xa4/0xb0) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
-----

Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.

Similar stuff was already done for few other drivers in the past, like:

commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue May 29 21:53:50 2007 +0100

[ARM] 4417/1: Serial: Fix AMBA drivers locking

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ee160a38 Thu Sep 01 08:20:57 MDT 2011 Jiri Slaby <jirislaby@kernel.org> TTY: serial, fix includes in some drivers

linux/tty_flip.h is included in linux/serial_core.h. But this may (and
will) change in the future. Then we would get build errors such as:
.../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
.../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’

So fix all the drviers which call tty flip buffer helpers to really
include linux/tty_flip.h. And also make sure that those include
linux/tty.h when operating with struct tty_struct.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H A Dmux.cdiff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff ee160a38 Thu Sep 01 08:20:57 MDT 2011 Jiri Slaby <jirislaby@kernel.org> TTY: serial, fix includes in some drivers

linux/tty_flip.h is included in linux/serial_core.h. But this may (and
will) change in the future. Then we would get build errors such as:
.../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
.../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’

So fix all the drviers which call tty flip buffer helpers to really
include linux/tty_flip.h. And also make sure that those include
linux/tty.h when operating with struct tty_struct.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
H A Dclps711x.cdiff 2f310b8e Thu Mar 27 03:38:19 MDT 2014 Alexander Shiyan <shc_work@mail.ru> Revert "serial: clps711x: Give a chance to perform useful tasks during wait loop"

This reverts commit 63e3ad3252695a2b8c01b6f6c225e4537af08b85,
since this not works as expected and produce runtime error:

BUG: sleeping function called from invalid context at drivers/tty/serial/clps711x.c:379
in_atomic(): 0, irqs_disabled(): 128, pid: 287, name: mount

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2d47b716 Mon Nov 19 11:21:34 MST 2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/linux-master/drivers/usb/serial/
H A Dquatech2.cdiff c5d1448f Mon Feb 08 07:31:49 MST 2021 Uwe Kleine-König <uwe@kleine-koenig.org> USB: serial: make remove callback return void

All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 548f32f5 Thu Oct 11 01:44:33 MDT 2018 YueHaibing <yuehaibing@huawei.com> USB: serial: quatech2: remove set but not used variable 'port_priv'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb':
drivers/usb/serial/quatech2.c:503:27: warning:
variable 'port_priv' set but not used [-Wunused-but-set-variable]

It not used any more after commit 2be818a116b2 ('Revert "USB: quatech2:
only write to the tty if the port is open."')

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 2ba02c8d Sat Jun 23 16:32:10 MDT 2018 John Ogness <john.ogness@linutronix.de> USB: serial: quatech2: use irqsave() in USB's complete callback

The USB completion callback does not disable interrupts while acquiring
the lock. We want to remove the local_irq_disable() invocation from
__usb_hcd_giveback_urb() and therefore it is required for the callback
handler to disable the interrupts while acquiring the lock.
The callback may be invoked either in IRQ or BH context depending on the
USB host controller.
Use the _irqsave() variant of the locking primitives.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 2fbd69c4 Tue Nov 08 05:26:50 MST 2016 Johan Hovold <johan@kernel.org> USB: serial: fix invalid user-pointer checks

Drop invalid user-pointer checks from ioctl handlers.

A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.

Signed-off-by: Johan Hovold <johan@kernel.org>
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
H A Dmetro-usb.cdiff c5d1448f Mon Feb 08 07:31:49 MST 2021 Uwe Kleine-König <uwe@kleine-koenig.org> USB: serial: make remove callback return void

All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 1143832e Thu Jun 06 11:32:00 MDT 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: ports: add minor and port number

The usb_serial_port structure had the number field, which was the minor
number for the port, which almost no one really cared about. They
really wanted the number of the port within the device, which you had to
subtract from the minor of the parent usb_serial_device structure. To
clean this up, provide the real minor number of the port, and the number
of the port within the serial device separately, as these numbers might
not be related in the future.

Bonus is that this cleans up a lot of logic in the drivers, and saves
lines overall.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++--------
drivers/usb/serial/ark3116.c | 2 -
drivers/usb/serial/bus.c | 6 +--
drivers/usb/serial/console.c | 2 -
drivers/usb/serial/cp210x.c | 2 -
drivers/usb/serial/cypress_m8.c | 4 +-
drivers/usb/serial/digi_acceleport.c | 6 ---
drivers/usb/serial/f81232.c | 5 +-
drivers/usb/serial/garmin_gps.c | 6 +--
drivers/usb/serial/io_edgeport.c | 58 ++++++++++++--------------------
drivers/usb/serial/io_ti.c | 21 ++++-------
drivers/usb/serial/keyspan.c | 29 +++++++---------
drivers/usb/serial/metro-usb.c | 4 +-
drivers/usb/serial/mos7720.c | 37 +++++++++-----------
drivers/usb/serial/mos7840.c | 52 +++++++++-------------------
drivers/usb/serial/opticon.c | 2 -
drivers/usb/serial/pl2303.c | 2 -
drivers/usb/serial/quatech2.c | 7 +--
drivers/usb/serial/sierra.c | 2 -
drivers/usb/serial/ti_usb_3410_5052.c | 10 ++---
drivers/usb/serial/usb-serial.c | 7 ++-
drivers/usb/serial/usb_wwan.c | 2 -
drivers/usb/serial/whiteheat.c | 20 +++++------
include/linux/usb/serial.h | 6 ++-
24 files changed, 133 insertions(+), 180 deletions(-)
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dssu100.cdiff c5d1448f Mon Feb 08 07:31:49 MST 2021 Uwe Kleine-König <uwe@kleine-koenig.org> USB: serial: make remove callback return void

All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 2fbd69c4 Tue Nov 08 05:26:50 MST 2016 Johan Hovold <johan@kernel.org> USB: serial: fix invalid user-pointer checks

Drop invalid user-pointer checks from ioctl handlers.

A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.

Signed-off-by: Johan Hovold <johan@kernel.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2f693357 Thu Jan 03 07:53:02 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: convert more flipping functions

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flags

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff adc8d746 Sat Jul 14 08:31:47 MDT 2012 Alan Cox <alan@linux.intel.com> tty: move the termios object into the tty

This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dsymbolserial.cdiff c5d1448f Mon Feb 08 07:31:49 MST 2021 Uwe Kleine-König <uwe@kleine-koenig.org> USB: serial: make remove callback return void

All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold <johan@kernel.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 5a0e3ad6 Wed Mar 24 02:04:11 MDT 2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
diff 5a0e3ad6 Wed Mar 24 02:04:11 MDT 2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
H A Daircable.cdiff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 5a0e3ad6 Wed Mar 24 02:04:11 MDT 2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
diff 5a0e3ad6 Wed Mar 24 02:04:11 MDT 2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/linux-master/drivers/tty/serial/jsm/
H A Djsm_tty.cdiff 8ca31ba8 Fri Dec 22 09:31:38 MST 2017 Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> tty: serial: jsm: Remove unnecessary NULL checks

After inspection made by Markus using Coccinelle software, he
observed that we could possibly be triggering a NULL pointer
dereference in 2 functions [0].

After discussion in mailing list, it was observed in fact
we have two unnecessary checks for NULL pointer, and they
were leading to Coccinelle warn. So, instead of reworking
the code as proposed by him, we hereby remove the
unnecessary checks, and also some unneeded extra lines in
the code.

These two unnecessary NULL checks were tracked in the call
chain as never NULL, so they can be safely removed.
No functional changes are intended.

[0] https://lkml.org/lkml/2017/11/29/705

Suggested-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e67c950 Tue Nov 07 04:41:07 MST 2017 Colin Ian King <colin.king@canonical.com> tty: serial: jsm: remove redundant pointer ts

Pointer ts is assigned a value that is never read, ts is therefore
redundant and can be removed. Cleans up clang warning:

drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e67c950 Tue Nov 07 04:41:07 MST 2017 Colin Ian King <colin.king@canonical.com> tty: serial: jsm: remove redundant pointer ts

Pointer ts is assigned a value that is never read, ts is therefore
redundant and can be removed. Cleans up clang warning:

drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff adc8d746 Sat Jul 14 08:31:47 MDT 2012 Alan Cox <alan@linux.intel.com> tty: move the termios object into the tty

This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 9d898966 Wed Aug 24 10:14:22 MDT 2011 Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> jsm: remove buggy write queue

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root@hostname ~]$ cat /dev/ttyn1 > cascardo/dump &
[1] 2658
[root@hostname ~]$ cat /proc/tty/drivers > /dev/ttyn0
[root@hostname ~]$ cat /proc/tty/drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
jsm /dev/ttyn 250 0-31 serial
serial /dev/ttyS 4 64-95 serial
hvc /dev/hvc 229 0-7 system
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
[root@hostname ~]$ cat cascardo/dump
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaste[root@hostname ~]$

This patch drops the driver write queue entirely, using the circular
buffer from uart_core only.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff 9d898966 Wed Aug 24 10:14:22 MDT 2011 Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> jsm: remove buggy write queue

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root@hostname ~]$ cat /dev/ttyn1 > cascardo/dump &
[1] 2658
[root@hostname ~]$ cat /proc/tty/drivers > /dev/ttyn0
[root@hostname ~]$ cat /proc/tty/drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
jsm /dev/ttyn 250 0-31 serial
serial /dev/ttyS 4 64-95 serial
hvc /dev/hvc 229 0-7 system
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
[root@hostname ~]$ cat cascardo/dump
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaste[root@hostname ~]$

This patch drops the driver write queue entirely, using the circular
buffer from uart_core only.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/linux-master/include/linux/
H A Dtty_flip.hdiff 2ce2983c Tue Aug 15 16:55:26 MDT 2023 Jiri Slaby (SUSE) <jirislaby@kernel.org> tty: tty_buffer: let tty_prepare_flip_string() return size_t

The same as in the previous patch, tty_prepare_flip_string() accepts
size_t as an size argument. It returns the same size (or less). It is
unexpected that it returns a signed value and can confuse users to check
for negative values.

Instead, return the same size_t as accepted to make clear we return
values >= 0, where zero in fact means failure.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230816105530.3335-7-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e2b4b89 Wed Oct 19 04:55:03 MDT 2022 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> tty: Convert tty_buffer flags to bool

The struct tty_buffer has flags which is only used for storing TTYB_NORMAL.
There is also a few quite confusing operations for checking the presense
of TTYB_NORMAL. Simplify things by converting flags to bool.

Despite the name remaining the same, the meaning of "flags" is altered
slightly by this change. Previously it referred to flags of the buffer
(only TTYB_NORMAL being used as a flag). After this change, flags tell
whether the buffer contains/should be allocated with flags array along
with character data array. It is much more suitable name that
TTYB_NORMAL was for this purpose, thus the name remains.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019105504.16800-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff b2441318 Wed Nov 01 08:07:57 MDT 2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org> License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff b2441318 Wed Nov 01 08:07:57 MDT 2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org> License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2f693357 Thu Jan 03 07:53:02 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: convert more flipping functions

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flags

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/linux-master/drivers/ipack/devices/
H A Dipoctal.cdiff 2f982313 Wed Dec 06 00:36:58 MST 2023 Jiri Slaby (SUSE) <jirislaby@kernel.org> tty: ipoctal: convert to u8 and size_t

Switch character types to u8 and sizes to size_t. To conform to
characters/sizes in the rest of the tty layer.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: industrypack-devel@lists.sourceforge.net
Link: https://lore.kernel.org/r/20231206073712.17776-14-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 515be7ba Tue Jan 17 02:03:47 MST 2023 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> tty: Cleanup tty_port_set_initialized() bool parameter

Make callers pass true/false consistently for bool val.

Reviewed-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230117090358.4796-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff cd20d592 Fri Sep 17 05:46:19 MDT 2021 Johan Hovold <johan@kernel.org> ipack: ipoctal: fix tty-registration error handling

Registration of the ipoctal tty devices is unlikely to fail, but if it
ever does, make sure not to deregister a never registered tty device
(and dereference a NULL pointer) when the driver is later unbound.

Fixes: 2afb41d9d30d ("Staging: ipack/devices/ipoctal: Check tty_register_device return value.")
Cc: stable@vger.kernel.org # 3.7
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210917114622.5412-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff a89936cc Fri Sep 17 05:46:17 MDT 2021 Johan Hovold <johan@kernel.org> ipack: ipoctal: fix stack information leak

The tty driver name is used also after registering the driver and must
specifically not be allocated on the stack to avoid leaking information
to user space (or triggering an oops).

Drivers should not try to encode topology information in the tty device
name but this one snuck in through staging without anyone noticing and
another driver has since copied this malpractice.

Fixing the ABI is a separate issue, but this at least plugs the security
hole.

Fixes: ba4dc61fe8c5 ("Staging: ipack: add support for IP-OCTAL mezzanine board")
Cc: stable@vger.kernel.org # 3.5
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210917114622.5412-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff b886d83c Sat Jun 01 02:08:55 MDT 2019 Thomas Gleixner <tglx@linutronix.de> treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation version 2 of the license

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 315 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Armijn Hemel <armijn@tjaldur.nl>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/linux-master/drivers/tty/ipwireless/
H A Dtty.cdiff b2441318 Wed Nov 01 08:07:57 MDT 2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org> License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff b2441318 Wed Nov 01 08:07:57 MDT 2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org> License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff a9c3f68f Sat Feb 22 05:31:21 MST 2014 Peter Hurley <peter@hurleysoftware.com> tty: Fix low_latency BUG

The user-settable knob, low_latency, has been the source of
several BUG reports which stem from flush_to_ldisc() running
in interrupt context. Since 3.12, which added several sleeping
locks (termios_rwsem and buf->lock) to the input processing path,
the frequency of these BUG reports has increased.

Note that changes in 3.12 did not introduce this regression;
sleeping locks were first added to the input processing path
with the removal of the BKL from N_TTY in commit
a88a69c91256418c5907c2f1f8a0ec0a36f9e6cc,
'n_tty: Fix loss of echoed characters and remove bkl from n_tty'
and later in commit 38db89799bdf11625a831c5af33938dcb11908b6,
'tty: throttling race fix'. Since those changes, executing
flush_to_ldisc() in interrupt_context (ie, low_latency set), is unsafe.

However, since most devices do not validate if the low_latency
setting is appropriate for the context (process or interrupt) in
which they receive data, some reports are due to misconfiguration.
Further, serial dma devices for which dma fails, resort to
interrupt receiving as a backup without resetting low_latency.

Historically, low_latency was used to force wake-up the reading
process rather than wait for the next scheduler tick. The
effect was to trim multiple milliseconds of latency from
when the process would receive new data.

Recent tests [1] have shown that the reading process now receives
data with only 10's of microseconds latency without low_latency set.

Remove the low_latency rx steering from tty_flip_buffer_push();
however, leave the knob as an optional hint to drivers that can
tune their rx fifos and such like. Cleanup stale code comments
regarding low_latency.

[1] https://lkml.org/lkml/2014/2/20/434

"Yay.. thats an annoying historical pain in the butt gone."
-- Alan Cox

Reported-by: Beat Bolli <bbolli@ewanet.ch>
Reported-by: Pavel Roskin <proski@gnu.org>
Acked-by: David Sterba <dsterba@suse.cz>
Cc: Grant Edwards <grant.b.edwards@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Hal Murray <murray+fedora@ip-64-139-1-69.sjc.megapath.net>
Cc: <stable@vger.kernel.org> # 3.12.x+
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2f16669d Mon Mar 05 06:51:52 MST 2012 Jiri Slaby <jirislaby@kernel.org> TTY: remove re-assignments to tty_driver members

All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.

pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/linux-master/arch/parisc/kernel/
H A Dpdc_cons.cdiff 1a59d1b8 Mon May 27 00:55:05 MDT 2019 Thomas Gleixner <tglx@linutronix.de> treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 2e124b4a Thu Jan 03 07:53:06 MST 2013 Jiri Slaby <jirislaby@kernel.org> TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff 4a8a0788 Thu May 10 15:08:17 MDT 2012 Rolf Eike Beer <eike-kernel@sf-tec.de> parisc: move definition of PAGE0 to asm/page.h

This was defined in asm/pdc.h which needs to include asm/page.h for
__PAGE_OFFSET. This leads to an include loop so that page.h eventually will
include pdc.h again. While this is no problem because of header guards, it is
a problem because some symbols may be undefined. Such an error is this:

In file included from include/linux/bitops.h:35:0,
from include/asm-generic/getorder.h:7,
from arch/parisc/include/asm/page.h:162,
from arch/parisc/include/asm/pdc.h:346,
from arch/parisc/include/asm/processor.h:16,
from arch/parisc/include/asm/spinlock.h:6,
from arch/parisc/include/asm/atomic.h:20,
from include/linux/atomic.h:4,
from include/linux/sysfs.h:20,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/eisa.h:5,
from arch/parisc/kernel/pci.c:11:
arch/parisc/include/asm/bitops.h: In function ‘set_bit’:
arch/parisc/include/asm/bitops.h:82:2: error: implicit declaration of function ‘_atomic_spin_lock_irqsave’ [-Werror=implicit-function-declaration]
arch/parisc/include/asm/bitops.h:84:2: error: implicit declaration of function ‘_atomic_spin_unlock_irqrestore’ [-Werror=implicit-function-declaration]

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff 4a8a0788 Thu May 10 15:08:17 MDT 2012 Rolf Eike Beer <eike-kernel@sf-tec.de> parisc: move definition of PAGE0 to asm/page.h

This was defined in asm/pdc.h which needs to include asm/page.h for
__PAGE_OFFSET. This leads to an include loop so that page.h eventually will
include pdc.h again. While this is no problem because of header guards, it is
a problem because some symbols may be undefined. Such an error is this:

In file included from include/linux/bitops.h:35:0,
from include/asm-generic/getorder.h:7,
from arch/parisc/include/asm/page.h:162,
from arch/parisc/include/asm/pdc.h:346,
from arch/parisc/include/asm/processor.h:16,
from arch/parisc/include/asm/spinlock.h:6,
from arch/parisc/include/asm/atomic.h:20,
from include/linux/atomic.h:4,
from include/linux/sysfs.h:20,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/eisa.h:5,
from arch/parisc/kernel/pci.c:11:
arch/parisc/include/asm/bitops.h: In function ‘set_bit’:
arch/parisc/include/asm/bitops.h:82:2: error: implicit declaration of function ‘_atomic_spin_lock_irqsave’ [-Werror=implicit-function-declaration]
arch/parisc/include/asm/bitops.h:84:2: error: implicit declaration of function ‘_atomic_spin_unlock_irqrestore’ [-Werror=implicit-function-declaration]

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Completed in 1247 milliseconds

12345