[PATCH 12/27] tty: hvc: convert to u8 and size_t

2023-12-05 Thread Jiri Slaby (SUSE)
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) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Amit Shah Cc: Arnd Bergmann Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou

Re: [PATCH] tty: synclink_gt: remove redundant initialization of variable count

2021-04-20 Thread Jiri Slaby
-by: Colin Ian King Reviewed-by: Jiri Slaby --- drivers/tty/synclink_gt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 994618618466..5523cf7bd1c2 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/syn

Re: [PATCH] tty: n_gsm: check error while registering tty devices

2021-04-06 Thread Jiri Slaby
it log when this happens? I only wonder how real this is. I assume you inject faults to allocations? Reported-and-tested-by: Hao Sun Cc: Jiri Slaby Use my MAINTAINERS e-mail please. Signed-off-by: Hillf Danton --- --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -2384,8 +2

Re: [PATCH v2 04/10] tty: tty_jobctrl: Fix coding style issues of block comments

2021-04-06 Thread Jiri Slaby
On 06. 04. 21, 13:24, Xiaofei Tan wrote: Fix coding style issues of block comments, reported by checkpatch.pl. Besides, do some expression optimization for the sentenses. Signed-off-by: Xiaofei Tan --- drivers/tty/tty_jobctrl.c | 16 ++-- 1 file changed, 10 insertions(+), 6

Re: [PATCH -next] tty: n_gsm: use DEFINE_SPINLOCK() for spinlock

2021-04-06 Thread Jiri Slaby
On 06. 04. 21, 13:56, Huang Guobin wrote: From: Guobin Huang spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Reviewed-by: Jiri Slaby --- drivers/tty/n_gsm.c | 4

Re: [PATCH -next] serial: 8250: Make symbol 'brcmuart_debugfs_root' static

2021-04-05 Thread Jiri Slaby
On 01. 04. 21, 9:49, Zucheng Zheng wrote: symbol 'brcmuart_debugfs_root' is not used outside of 8250_bcm7271.c, so this commit marks it static. Signed-off-by: Zucheng Zheng Reviewed-by: Jiri Slaby --- drivers/tty/serial/8250/8250_bcm7271.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] tty: use printk_safe context at tty_msg()

2021-04-05 Thread Jiri Slaby
On 03. 04. 21, 6:14, Tetsuo Handa wrote: syzbot is reporting circular locking dependency due to calling printk() with port lock held [1]. When this problem was reported, we worried whether printk_safe context will remain available in future kernels [2], and then this problem was forgotten. But

Re: [PATCH 04/10] tty: tty_jobctrl: Fix coding style issues of block comments

2021-04-05 Thread Jiri Slaby
On 05. 04. 21, 5:34, Xiaofei Tan wrote: Fix coding style issues of block comments, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/tty_jobctrl.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/tty/tty_jobctrl.c

Re: perf does not resolve plt symbols from libstdc++ right (.plt.sec problem)

2021-03-31 Thread Jiri Slaby
On 29. 03. 21, 15:10, H.J. Lu wrote: On Mon, Mar 29, 2021 at 6:06 AM Richard Biener wrote: On Mon, 29 Mar 2021, H.J. Lu wrote: On Mon, Mar 29, 2021 at 2:38 AM Richard Biener wrote: On Mon, 29 Mar 2021, Jiri Slaby wrote: Any ideas on this? On 11. 01. 21, 7:31, Jiri Slaby wrote: Hi

Re: perf does not resolve plt symbols from libstdc++ right (.plt.sec problem)

2021-03-29 Thread Jiri Slaby
Any ideas on this? On 11. 01. 21, 7:31, Jiri Slaby wrote: Hi, this e-mails is a follow-up of my report at: https://bugzilla.suse.com/show_bug.cgi?id=1180681 There is a problem with *@plt symbols in some libraries, they are unresolved by perf (memcmp@plt in this case): > 0.26%  ma

Re: [PATCH] media: videobuf2: Fix integer overrun in vb2_mmap

2021-03-09 Thread Jiri Slaby
On 10. 03. 21, 8:40, Ricardo Ribalda wrote: The plane_length is an unsigned integer. So, if we have a size of 0x bytes we incorrectly allocate 0 bytes instead of 1 << 32. Suggested-by: Sergey Senozhatsky Cc: sta...@vger.kernel.org Fixes: 7f8414594e47 ("[media] media: videobuf2: fix the

Re: [PATCH] kbuild: dummy-tools: adjust to scripts/cc-version.sh

2021-03-09 Thread Jiri Slaby
On 09. 03. 21, 17:25, Masahiro Yamada wrote: Commit aec6c60a01d3 ("kbuild: check the minimum compiler version in Kconfig") changed how the script detects the compiler version. Get 'make CROSS_COMPILE=scripts/dummy-tools/' back working again. Fixes: aec6c60a01d3 ("kbuild: check the minimum

[PATCH] kbuild: dummy-tools, support MPROFILE_KERNEL checks for ppc

2021-03-07 Thread Jiri Slaby
ion marked as "notrace" should not produce "_mcount" So support this in dummy-tools' gcc, so that we have MPROFILE_KERNEL always true. Signed-off-by: Jiri Slaby Cc: Masahiro Yamada --- scripts/dummy-tools/gcc | 9 + 1 file changed, 9 insertions(+) diff --git a/scr

[tip: x86/vdso] x86/vdso: Use proper modifier for len's format specifier in extract()

2021-03-06 Thread tip-bot2 for Jiri Slaby
The following commit has been merged into the x86/vdso branch of tip: Commit-ID: 70c9d959226b7c5c48c119e2c1cfc1424f87b023 Gitweb: https://git.kernel.org/tip/70c9d959226b7c5c48c119e2c1cfc1424f87b023 Author:Jiri Slaby AuthorDate:Wed, 03 Mar 2021 07:43:57 +01:00 Committer

Re: [PATCH] x86/vdso: Use proper modifier for len's printf in extract

2021-03-04 Thread Jiri Slaby
On 04. 03. 21, 11:48, Borislav Petkov wrote: On Thu, Mar 04, 2021 at 06:18:25AM +0100, Jiri Slaby wrote: It's built with gcc 10 from tumbleweed and it's a standard config from kerncvs: https://github.com/openSUSE/kernel-source/blob/stable/config/i386/pae Nope, can't trigger with that one

[tip: x86/vdso] x86/vdso: Use proper modifier for len's format specifier in extract()

2021-03-04 Thread tip-bot2 for Jiri Slaby
The following commit has been merged into the x86/vdso branch of tip: Commit-ID: 6bdbe1760651484b0fe6f6d0cc3a2fe8741e6f87 Gitweb: https://git.kernel.org/tip/6bdbe1760651484b0fe6f6d0cc3a2fe8741e6f87 Author:Jiri Slaby AuthorDate:Wed, 03 Mar 2021 07:43:57 +01:00 Committer

Re: [V2][PATCH] vt: keyboard, fix uninitialized variables warning

2021-03-03 Thread Jiri Slaby
On 04. 03. 21, 4:10, Li Wang wrote: drivers/tty/vt/keyboard.c: In function 'vt_do_kdgkb_ioctl': drivers/tty/vt/keyboard.c: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] return ret; ^~~ drivers/tty/vt/keyboard.c: warning: 'kbs' may be used

Re: [PATCH] x86/vdso: Use proper modifier for len's printf in extract

2021-03-03 Thread Jiri Slaby
On 03. 03. 21, 19:36, Borislav Petkov wrote: On Wed, Mar 03, 2021 at 07:43:57AM +0100, Jiri Slaby wrote: Commit 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions") added a printf of len which is size_t. Compilers now complain on 32b: In file included from arch

[PATCH] kbuild: dummy-tools, fix inverted tests for gcc

2021-03-03 Thread Jiri Slaby
-off-by: Jiri Slaby Cc: Masahiro Yamada --- scripts/dummy-tools/gcc | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc index 5c113cad5601..0d0589cf8184 100755 --- a/scripts/dummy-tools/gcc +++ b/scripts/dummy-tools/gcc @@ -85,3 +85,8

Re: [PATCH v1 1/1] vt: keyboard, Fix typo in the doc for vt_get_shift_state()

2021-03-03 Thread Jiri Slaby
-by: Jiri Slaby --- drivers/tty/vt/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 77638629c562..5d2309742718 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -2186,7 +2186,7 @@ void

[PATCH] x86/vdso: Use proper modifier for len's printf in extract

2021-03-03 Thread Jiri Slaby
dso2c.h:38:52: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} So use proper modifier (%zu) for size_t. Signed-off-by: Jiri Slaby Fixes: 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions")

[PATCH 36/44] tty: localise ptychar and make it const

2021-03-02 Thread Jiri Slaby
ptychar was not const, so mark it as such. And move this variable to the only place where it's used. Signed-off-by: Jiri Slaby --- drivers/tty/tty_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index c8cbf08b6dcf

[PATCH 43/44] tty: make everyone's chars_in_buffer return >= 0

2021-03-02 Thread Jiri Slaby
The tty line disciplines don't expect tty_operations::chars_in_buffer to return negative values. Fix the two drivers which violate this. Signed-off-by: Jiri Slaby --- drivers/tty/n_gsm.c | 2 +- drivers/tty/vcc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 38/44] USB: serial/io_edgeport, drop unneeded forward declarations

2021-03-02 Thread Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby Cc: Johan Hovold --- drivers/usb

[PATCH 40/44] tty: hvc, drop unneeded forward declarations

2021-03-02 Thread Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby Cc: linuxppc-...@lists.ozlabs.org

[PATCH 41/44] tty: n_gsm, remove duplicates of parameters

2021-03-02 Thread Jiri Slaby
dp, f, and i are only duplicates of gsmld_receive_buf's parameters. Use the parameters directly (cp, fp, and count) and delete these local variables. Signed-off-by: Jiri Slaby --- drivers/tty/n_gsm.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/tty

[PATCH 42/44] tty: cleanup tty_chars_in_buffer

2021-03-02 Thread Jiri Slaby
There is no need for 'else' when the 'if' part already returned. This makes tty_chars_in_buffer similar to tty_write_room too. Signed-off-by: Jiri Slaby --- drivers/tty/tty_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty

[PATCH 44/44] tty: make everyone's write_room return >= 0

2021-03-02 Thread Jiri Slaby
The tty line disciplines don't expect tty_operations::write_room to return negative values. Fix the five drivers which violate this. Signed-off-by: Jiri Slaby --- drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/tty/ipwireless/tty.c | 4 ++-- drivers/tty/n_gsm.c | 2

[PATCH 39/44] tty: synclink_gt, drop unneeded forward declarations

2021-03-02 Thread Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby --- drivers/tty/synclink_gt.c | 57

[PATCH 37/44] USB: serial/keyspan, drop unneeded forward declarations

2021-03-02 Thread Jiri Slaby
Forward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use. Signed-off-by: Jiri Slaby Cc

[PATCH 35/44] tty: let tty_unregister_driver return void

2021-03-02 Thread Jiri Slaby
Now that noone checks the return value, switch the return type of tty_unregister_driver to void. We can do that as we always return zero. Generally, drivers are not allowed to call tty_unregister_driver while there are open devices. Signed-off-by: Jiri Slaby --- drivers/tty/tty_io.c | 9

[PATCH 24/44] tty: nozomi, remove useless debug prints

2021-03-02 Thread Jiri Slaby
These are either commented out or can be printed by tracing mechanisms. Signed-off-by: Jiri Slaby --- drivers/tty/nozomi.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 1ec975d66528..9a2d78ace49b 100644 --- a/drivers/tty

[PATCH 30/44] tty: xtensa/iss, don't reassign to tty->port

2021-03-02 Thread Jiri Slaby
We already do tty_port_link_device in rs_init, so we don't need to reassign a port to tty->port. It would be too late in tty::ops::open anyway. Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/platforms/iss/console.c | 1 - 1 f

[PATCH 32/44] tty: xtensa/iss, setup the timer statically

2021-03-02 Thread Jiri Slaby
Use DEFINE_TIMER and avoid runtime initialization of the serial_timer. Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/platforms/iss/console.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch

[PATCH 22/44] tty: nozomi, remove struct buffer

2021-03-02 Thread Jiri Slaby
It is unused. Signed-off-by: Jiri Slaby --- drivers/tty/nozomi.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 861e95043191..83490925a3e2 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c @@ -359,12 +359,6 @@ struct nozomi

[PATCH 27/44] tty: vcc, use name strings directly

2021-03-02 Thread Jiri Slaby
Do not define global variables for driver/device names, use the strings directly. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- drivers/tty/vcc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers

[PATCH 28/44] tty: vcc, remove useless tty checks

2021-03-02 Thread Jiri Slaby
All these functions are called with a valid tty pointer, no need to check that. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- drivers/tty/vcc.c | 45 - 1 file changed, 45 deletions(-) diff --git a/d

[PATCH 20/44] tty: con3215, remove tty->driver_data casts

2021-03-02 Thread Jiri Slaby
Casts of 'void *' pointer are superfluous. So remove them. Signed-off-by: Jiri Slaby Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux...@de.ibm.com Cc: linux-s...@vger.kernel.org --- drivers/s390/char/con3215.c | 32 +++- 1 file changed, 11 insertions(+), 21

[PATCH 25/44] tty: vcc, make globals static

2021-03-02 Thread Jiri Slaby
These are used only in this unit, so make them static. Signed-off-by: Jiri Slaby --- drivers/tty/vcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index e2d6205f83ce..50bf9011a0c4 100644 --- a/drivers/tty/vcc.c +++ b/drivers

[PATCH 26/44] tty: vcc, drop version dump

2021-03-02 Thread Jiri Slaby
The version number is artificial, no need to dump it to logs during initialization. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: --- drivers/tty/vcc.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/v

[PATCH 17/44] net: nfc: nci: drop nci_uart_default_recv

2021-03-02 Thread Jiri Slaby
nci_uart_register returns -EINVAL immediately when nu->ops.recv is not set. So the same 'if' later never triggers so nci_uart_default_recv is never used. Drop it. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.kernel.org --- net/nfc/nc

[PATCH 19/44] tty: con3215, remove unneeded tty checks

2021-03-02 Thread Jiri Slaby
There is no need to check tty in these functions as it's always non-NULL. So remove the tests. Signed-off-by: Jiri Slaby Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux...@de.ibm.com Cc: linux-s...@vger.kernel.org --- drivers/s390/char/con3215.c | 4 1 file changed, 4 deletions

[PATCH 34/44] tty: do not check tty_unregister_driver's return value

2021-03-02 Thread Jiri Slaby
. Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org Cc: Jiri Kosina Cc: David Sterba --- arch/xtensa/platforms/iss/console.c | 6 +- drivers/tty/amiserial.c | 8 ++-- drivers/tty/ipwireless/tty.c| 7 +-- drivers/tty

[PATCH 31/44] tty: xtensa/iss, remove stale comments

2021-03-02 Thread Jiri Slaby
These are likely taken over from amiserial. iss doesn't do anything of that. Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/platforms/iss/console.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/arch/xtensa

[PATCH 33/44] tty: xtensa/iss, make rs_init static

2021-03-02 Thread Jiri Slaby
To fix the warning: warning: no previous prototype for 'rs_init' Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/platforms/iss/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/platforms/iss

[PATCH 16/44] net: nfc: nci: drop nci_uart_ops::recv_buf

2021-03-02 Thread Jiri Slaby
There is noone setting nci_uart_ops::recv_buf, so the default one (nci_uart_default_recv_buf) is always used. So drop this hook, move nci_uart_default_recv_buf before the use in nci_uart_tty_receive and remove unused parameter flags. Signed-off-by: Jiri Slaby Cc: "David S. Miller"

[PATCH 29/44] tty: xtensa/iss, drop serial_version & serial_name

2021-03-02 Thread Jiri Slaby
There is no need to print the information during module load. Neither to print some artificial version. So drop these strings and a print. Signed-off-by: Jiri Slaby Cc: Chris Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org --- arch/xtensa/platforms/iss/console.c | 7 +-- 1 file

[PATCH 23/44] tty: nozomi, remove init/exit messages

2021-03-02 Thread Jiri Slaby
Remove useless prints from init and exit functions. The version is artificial anyway. Signed-off-by: Jiri Slaby --- drivers/tty/nozomi.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 83490925a3e2..1ec975d66528

[PATCH 21/44] tty: jsm_tty, make char+error handling readable

2021-03-02 Thread Jiri Slaby
The code for char+error handling in jsm_input was complete mess of letters. Introduce 3 new local variables and use them with care. Signed-off-by: Jiri Slaby --- drivers/tty/serial/jsm/jsm_tty.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git

[PATCH 18/44] tty: con3215, remove tasklet for tty_wakeup

2021-03-02 Thread Jiri Slaby
tty_wakeup is safe to be called from all contexts. No need to schedule a tasklet for that. Let us call it directly like in other drivers. And delete the tasklet completely. Signed-off-by: Jiri Slaby Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux...@de.ibm.com Cc: linux-s

[PATCH 15/44] net: nfc: nci: remove memset of nci_uart_drivers

2021-03-02 Thread Jiri Slaby
nci_uart_drivers is a global definition, so there is no need to initialize its memory to zero during module load. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.kernel.org --- net/nfc/nci/uart.c | 1 - 1 file changed, 1 deletion(-) diff --git a/n

[PATCH 06/44] tty: isicom, remove this orphan

2021-03-02 Thread Jiri Slaby
The Isicom driver was orphaned by commit d86b3001a1a6 (MAINTAINERS: orphan isicom) 10 years ago. Noone stepped up to take care of them and to fix all the issues the driver has. So it's time to drop the driver with all its traces. Signed-off-by: Jiri Slaby --- Documentation/admin-guide

[PATCH 14/44] net: caif: inline register_ldisc

2021-03-02 Thread Jiri Slaby
register_ldisc only calls tty_register_ldisc. Inline register_ldisc into the only caller of register_ldisc, i.e. caif_ser_init. Now, caif_ser_init is symmetric to caif_ser_exit in this regard. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.

[PATCH 08/44] tty: remove TTY_LDISC_MAGIC

2021-03-02 Thread Jiri Slaby
of this legacy. Signed-off-by: Jiri Slaby --- Documentation/process/magic-number.rst| 1 - Documentation/translations/it_IT/process/magic-number.rst | 1 - Documentation/translations/zh_CN/process/magic-number.rst | 1 - drivers/accessibility/speakup/spk_ttyio.c | 1

[PATCH 12/44] tty: 8250, cleanup em485 timers

2021-03-02 Thread Jiri Slaby
Initialize the variables directly by initializers in definitions. This is expected/usual for these kind of callback. Signed-off-by: Jiri Slaby --- drivers/tty/serial/8250/8250_port.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/8250

[PATCH 11/44] tty: 8250, use ms_to_ktime

2021-03-02 Thread Jiri Slaby
This really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10. Signed-off-by: Jiri Slaby --- drivers/tty/serial/8250/8250_port.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH 13/44] tty: 8250/serial_cs, propagate errors in simple_config

2021-03-02 Thread Jiri Slaby
The caller expects from the others (pfc_config and multi_config) to return standard error values. So do the same for simple_config too. We invert the if condition to handle the error case. Signed-off-by: Jiri Slaby --- drivers/tty/serial/8250/serial_cs.c | 12 ++-- 1 file changed, 6

[PATCH 09/44] tty: n_tty, set tty_ldisc_ops::owner

2021-03-02 Thread Jiri Slaby
Set tty_ldisc_ops::owner to THIS_MODULE. This has no effect currently as n_tty cannot be built as a module. If someone ever tries to modularize tty, we wouldn't manage module's reference count as in other ldiscs. So fix this just in case. Signed-off-by: Jiri Slaby --- drivers/tty/n_tty.c | 1

[PATCH 10/44] tty: imx, use ms_to_ktime

2021-03-02 Thread Jiri Slaby
This really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10. Signed-off-by: Jiri Slaby Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team --- drivers/tty

[PATCH 03/44] PCI: remove synclink entries from pci_ids

2021-03-02 Thread Jiri Slaby
The drivers were removed in a1f714b44e34 (tty: Remove redundant synclink driver) and 3d608a591b2b (tty: Remove redundant synclinkmp driver). So remove also the PCI ID entries. Signed-off-by: Jiri Slaby Cc: Bjorn Helgaas Cc: linux-...@vger.kernel.org --- include/linux/pci_ids.h | 2 -- 1 file

[PATCH 01/44] MAINTAINERS: orphan mxser

2021-03-02 Thread Jiri Slaby
I cannot maintain this driver for years due to missing HW. Let's orphan the entry in MAINTAINERS. And likely drop the driver later as these devices are likely gone from this world. Mxser provides different (out-of-tree) drivers for their current devices. Signed-off-by: Jiri Slaby

[PATCH 04/44] vgacon: comment on vga_rolled_over

2021-03-02 Thread Jiri Slaby
Long time ago, I figured out what this number is good for and documented that locally. But never submitted, so do it now. Signed-off-by: Jiri Slaby Cc: dri-de...@lists.freedesktop.org Cc: linux-fb...@vger.kernel.org --- drivers/video/console/vgacon.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 02/44] MAINTAINERS: drop cyclades.com reference

2021-03-02 Thread Jiri Slaby
cyclades.com is a dead domain. Signed-off-by: Jiri Slaby --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 24abc010d177..7bfca0e2d5ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4885,7 +4885,6 @@ F:include/uapi/linux/cyclades.h

Re: Linux 5.11.2

2021-02-26 Thread Jiri Slaby
On 26. 02. 21, 12:37, Jörg-Volker Peetz wrote: Jörg-Volker Peetz wrote on 26/02/2021 12.33: Greg KH wrote on 26/02/2021 12.02: On Fri, Feb 26, 2021 at 11:54:07AM +0100, Jörg-Volker Peetz wrote: Hi, thanks for the upgrade. There seems to be a dangling link in the git repository:

Re: [PATCH 17/20] vt: Manual replacement of the deprecated strlcpy() with return values

2021-02-26 Thread Jiri Slaby
On 22. 02. 21, 16:12, Romain Perier wrote: The strlcpy() reads the entire source buffer first, it is dangerous if the source buffer lenght is unbounded or possibility non NULL-terminated. "length" and it's NUL, not NULL in this case. It can lead to linear read overflows, crashes, etc... As

[PATCH] media: atomisp: do not free kmalloc memory by vfree

2021-02-19 Thread Jiri Slaby
fw_minibuffer[i].buffer is allocated by kmalloc in sh_css_load_blob_info and by vmalloc in setup_binary. So use kvfree to decide which of those allocators to use for freeing. Also remove the useless cast. Signed-off-by: Jiri Slaby Cc: Mauro Carvalho Chehab --- drivers/staging/media/atomisp

Re: [PATCH v3 2/2] serial: 8250: Add new 8250-core based Broadcom STB driver

2021-02-19 Thread Jiri Slaby
On 12. 02. 21, 20:57, Al Cooper wrote: Add a UART driver for the new Broadcom 8250 based STB UART. The new UART is backward compatible with the standard 8250, but has some additional features. The new features include a high accuracy baud rate clock system and DMA support. The driver will use

Re: [PATCH v2] tty: fix when iov_iter_count() returns 0 in tty_write()

2021-02-19 Thread Jiri Slaby
On 17. 02. 21, 16:55, Sabyrzhan Tasbolatov wrote: syzbot found WARNING in iov_iter_revert[1] when iov_iter_count() returns 0, therefore INT_MAX is passed to iov_iter_revert() causing > MAX_RW_COUNT warning. static inline ssize_t do_tty_write() { .. size_t count = iov_iter_count(from);

[PATCH v2] perf tools: Resolve symbols against debug file first

2021-02-17 Thread Jiri Slaby
*text* nor to *data* (is_label && !elf_sec__filter(, secstrs) is true). Signed-off-by: Jiri Slaby Acked-by: Namhyung Kim Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa --- [v2] added a comment tools/perf/util

Re: Kernel version numbers after 4.9.255 and 4.4.255

2021-02-04 Thread Jiri Slaby
On 04. 02. 21, 9:51, Greg Kroah-Hartman wrote: It might work somewhere, but there are a lot of (X * 65536 + Y * 256 + Z) assumptions all around the world. So this doesn't look like a good idea. Ok, so what happens if we "wrap"? What will break with that? At first glance, I can't see anything

Re: Kernel version numbers after 4.9.255 and 4.4.255

2021-02-03 Thread Jiri Slaby
On 04. 02. 21, 7:20, Greg Kroah-Hartman wrote: On Thu, Feb 04, 2021 at 05:59:42AM +, Jari Ruusu wrote: Greg, I hope that your linux kernel release scripts are implemented in a way that understands that PATCHLEVEL= and SUBLEVEL= numbers in top-level linux Makefile are encoded as 8-bit

Re: [PATCH 1/3] serial: 8250: Handle UART without interrupt on TEMT using em485

2021-01-28 Thread Jiri Slaby
On 29. 01. 21, 0:36, Eric Tremblay wrote: The patch introduce the UART_CAP_TEMT capability which is by default assigned to all 8250 UART since the code assume that device has the interrupt on TEMT In the case where the device does not support it, we calculate the maximum of time it could take

Re: [PATCH] perf tools: Resolve symbols against debug file first

2021-01-28 Thread Jiri Slaby
On 13. 01. 21, 11:46, Jiri Olsa wrote: On Wed, Jan 13, 2021 at 09:01:28AM +0100, Jiri Slaby wrote: With LTO, there are symbols like these: /usr/lib/debug/usr/lib64/libantlr4-runtime.so.4.8-4.8-1.4.x86_64.debug 10305: 00955fa4 0 NOTYPE LOCAL DEFAULT 29 Predicate.cpp.2bc410e7

Re: [PATCH 1/6] tty: implement write_iter

2021-01-21 Thread Jiri Slaby
three: Reviewed-by: Jiri Slaby thanks, -- js

Re: [PATCH 1/6] tty: implement write_iter

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 22:09, Linus Torvalds wrote: On Thu, Jan 21, 2021 at 11:43 AM Greg Kroah-Hartman wrote: This works, thanks for these. I'll wait for Jiri to review them before applying them to my branches... Let's hope Jiri sees them, since he had some email issue earlier.. I'll add his

Re: [PATCH 2/6] tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 10:00, Greg Kroah-Hartman wrote: From: Linus Torvalds The tty line discipline .read() function was passed the final user pointer destination as an argument, which doesn't match the 'write()' function, and makes it very inconvenient to do a splice method for ttys. This is a

Re: [PATCH 3/6] tty: implement read_iter

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 10:00, Greg Kroah-Hartman wrote: From: Linus Torvalds Now that the ldisc read() function takes kernel pointers, it's fairly straightforward to make the tty file operations use .read_iter() instead of .read(). That automatically gives us vread() and friends, and also makes it

Re: [PATCH 1/6] tty: implement write_iter

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 10:00, Greg Kroah-Hartman wrote: From: Linus Torvalds This makes the tty layer use the .write_iter() function instead of the traditional .write() functionality. That allows writev(), but more importantly also makes it possible to enable .splice_write() for ttys, reinstating the

Re: tty splice branch (was "Re: Splicing to/from a tty")

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 9:50, Jiri Slaby wrote: Hm, I would like to review this first. I noticed the changes only because a new branch appeared when I grabbed your tree and the branch has "tty" in its name. Which is weird as you Cced me. Let me check what is wrong with my e-mail setup

Re: tty splice branch (was "Re: Splicing to/from a tty")

2021-01-21 Thread Jiri Slaby
On 21. 01. 21, 2:18, Linus Torvalds wrote: On Tue, Jan 19, 2021 at 8:44 PM Linus Torvalds wrote: I'll come back to this tomorrow and do the line-buffered icanon case too (unless pull requests pile up), and then I'll be happy with the tty changes, and I think I can submit this series for real

Re: [PATCH 3/3] tty: vcc: Drop impossible to hit WARN_ON

2021-01-15 Thread Jiri Slaby
ing that is never hit. Signed-off-by: Uwe Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/vcc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index d9b0dc6deae9..e2d6205f83ce 100644 --- a/drivers/tty/vcc.c +++ b/drivers/

Re: [PATCH 2/3] tty: vcc: Drop unnecessary if block

2021-01-15 Thread Jiri Slaby
Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/vcc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index 9ffd42e333b8..d9b0dc6deae9 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -681,9 +681,6 @@ static int vcc_remove(struct

Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-15 Thread Jiri Slaby
-by: Uwe Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/hvc/hvcs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 509d1042825a..3e0461285c34 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -825,9 +825,6

Re: [PATCH] perf tools: Resolve symbols against debug file first

2021-01-13 Thread Jiri Slaby
On 13. 01. 21, 11:46, Jiri Olsa wrote: On Wed, Jan 13, 2021 at 09:01:28AM +0100, Jiri Slaby wrote: With LTO, there are symbols like these: /usr/lib/debug/usr/lib64/libantlr4-runtime.so.4.8-4.8-1.4.x86_64.debug 10305: 00955fa4 0 NOTYPE LOCAL DEFAULT 29 Predicate.cpp.2bc410e7

[PATCH] perf tools: Resolve symbols against debug file first

2021-01-13 Thread Jiri Slaby
*text* nor to *data* (is_label && !elf_sec__filter(, secstrs) is true). Signed-off-by: Jiri Slaby Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim --- tools/perf/util/symbol-elf.c | 10 +-

Re: [PATCH v2 4/8] serial: stm32: add author

2021-01-11 Thread Jiri Slaby
On 06. 01. 21, 17:21, Erwan Le Ray wrote: Update email address add new author in authors list. Parsing error :). Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 717a97759928..938d2c4aeaed 100644 ---

Re: [PATCH v2 2/8] serial: stm32: fix code cleaning warnings and checks

2021-01-11 Thread Jiri Slaby
On 06. 01. 21, 17:21, Erwan Le Ray wrote: --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c ... @@ -973,18 +971,17 @@ static int stm32_init_port(struct stm32_port *stm32port, struct resource *res; int ret; + ret = platform_get_irq(pdev, 0); +

perf does not resolve plt symbols from libstdc++ right (.plt.sec problem)

2021-01-10 Thread Jiri Slaby
Hi, this e-mails is a follow-up of my report at: https://bugzilla.suse.com/show_bug.cgi?id=1180681 There is a problem with *@plt symbols in some libraries, they are unresolved by perf (memcmp@plt in this case): > 0.26% main2/usr/lib64/libstdc++.so.6.0.280xa51a0

Re: [PATCH v2 1/1] tty: serial: owl: Add support for kernel debugger

2021-01-07 Thread Jiri Slaby
On 07. 01. 21, 19:16, Cristian Ciocaltea wrote: Hi Greg, Thank you for the review! On Thu, Jan 07, 2021 at 04:20:55PM +0100, Greg Kroah-Hartman wrote: On Tue, Jan 05, 2021 at 07:02:02PM +0200, Cristian Ciocaltea wrote: Implement 'poll_put_char' and 'poll_get_char' callbacks in struct

[PATCH 06/12] 8250_tegra: clean up tegra_uart_handle_break

2021-01-05 Thread Jiri Slaby
* switch "do { A; } while (1)" to "while (1) { A; }" * switch "if (A) B; else break;" to "if (!A) break; B;" * remove unused assignment from p->serial_in() to status Objdump -d shows no difference. Signed-off-by: Jiri Slaby Cc: Thierry Reding Cc: Jo

[PATCH 10/12] tty: cpm_uart, use port->flags instead of low_latency

2021-01-05 Thread Jiri Slaby
This is the only in-kernel user of tty_port::low_latency. Switch this last one to test uport->flags directly as tty_port::low_latency is going away in the next patch. Signed-off-by: Jiri Slaby --- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deleti

[PATCH 12/12] tty: drop termiox user definitions

2021-01-05 Thread Jiri Slaby
/c1c9fc04-02eb-2260-195b-44c357f05...@kernel.org/t/#u Signed-off-by: Jiri Slaby --- include/uapi/linux/termios.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/uapi/linux/termios.h b/include/uapi/linux/termios.h index 33961d4e4de0..e6da9d4433d1 100644 --- a/include/uapi/linux

[PATCH 01/12] vt: move set_leds to keyboard.c

2021-01-05 Thread Jiri Slaby
set_leds and compute_shiftstate are called from a single place in vt.c. Let's combine these two into vt_set_leds_compute_shiftstate. This allows for making keyboard_tasklet local in the next patch. Signed-off-by: Jiri Slaby --- drivers/tty/vt/keyboard.c | 11 ++- drivers/tty/vt/vt.c

[PATCH 07/12] vt/consolemap: do font sum unsigned

2021-01-05 Thread Jiri Slaby
The constant 20 makes the font sum computation signed which can lead to sign extensions and signed wraps. It's not much of a problem as we build with -fno-strict-overflow. But if we ever decide not to, be ready, so switch the constant to unsigned. Signed-off-by: Jiri Slaby --- drivers/tty/vt

[PATCH 11/12] tty_port: drop last traces of low_latency

2021-01-05 Thread Jiri Slaby
there are no users. Signed-off-by: Jiri Slaby --- Documentation/networking/caif/caif.rst | 1 - drivers/char/pcmcia/synclink_cs.c | 2 -- drivers/net/caif/caif_serial.c | 3 +-- drivers/s390/char/con3215.c| 1 - drivers/s390/char/sclp_tty.c | 1 - drivers/s390/char

[PATCH 08/12] vt: drop old FONT ioctls

2021-01-05 Thread Jiri Slaby
and "struct consolefontdesc" in kd.h, but as it is a uapi header, I am not touching these. Signed-off-by: Jiri Slaby --- drivers/tty/vt/vt.c | 39 +- drivers/tty/vt/vt_ioctl.c | 151 -- include/linux/kd.h| 8 -- 3 files changed, 3

[PATCH 04/12] vt: keyboard, defkeymap.c_shipped, approach the unicode table

2021-01-05 Thread Jiri Slaby
to each other. Signed-off-by: Jiri Slaby --- drivers/tty/vt/defkeymap.c_shipped | 68 +++--- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/tty/vt/defkeymap.c_shipped b/drivers/tty/vt/defkeymap.c_shipped index cac1fcbd55c7..094d95bf0005 100644

[PATCH 09/12] vgacon: drop BROKEN_GRAPHICS_PROGRAMS

2021-01-05 Thread Jiri Slaby
for vga_font_is_default global as it is only set and never read. Signed-off-by: Jiri Slaby Cc: dri-de...@lists.freedesktop.org Cc: linux-fb...@vger.kernel.org --- drivers/video/console/vgacon.c | 19 --- include/linux/vt_kern.h| 12 2 files changed, 31 deletions

[PATCH 02/12] vt: keyboard, make keyboard_tasklet local

2021-01-05 Thread Jiri Slaby
Now that the last extern user of the tasklet (set_leds) is in keyboard.c, we can make keyboard_tasklet local to this unit too. Signed-off-by: Jiri Slaby --- drivers/tty/vt/keyboard.c | 5 +++-- include/linux/kbd_kern.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 05/12] tty: pty, remove BUG_ON from pty_close

2021-01-05 Thread Jiri Slaby
tty->ops->close is always called with a valid tty, so the BUG_ON cannot trigger. Signed-off-by: Jiri Slaby --- drivers/tty/pty.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index a59f1e062bc6..5e2374580e27 100644 --- a/drivers/tty/pty.c +++ b/d

  1   2   3   4   5   6   7   8   9   10   >