aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)AuthorFilesLines
2016-03-07serial: xuartps: Enable OF earlycon supportMichal Simek1-1/+3
Support early console setup via DT for all listed compatible strings. Remove EARLYCON_DECLARE which was done by: "Use common framework for earlycon declarations" (sha1: 2eaa790989e03900298ad24f77f1086dbbc1aebd) when OF_EARLYCON_DECLARE is defined. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07tty: sh-sci: Use ARCH_RENESASSimon Horman1-1/+1
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07serial: sh-sci: Remove redundant instances of EARLYCON_DECLARE()Geert Uytterhoeven1-5/+0
As of commit 2eaa790989e03900 ("earlycon: Use common framework for earlycon declarations") it is no longer needer to specify both EARLYCON_DECLARE() and OF_EARLYCON_DECLARE(). Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07tty: amba-pl011: don't dereference NULL platform dataRobin Murphy1-1/+1
When only a TX DMA channel is specified in DT, pl011_dma_probe() falls back to looking for the optional RX channel in platform data. What it doesn't do is check whether that platform data actually exists... Add the missing check to avoid crashing the kernel. Signed-off-by: Robin Murphy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07tty: serial: Use GFP_ATOMIC instead of GFP_KERNEL in serial8250_em485_init()Matwey V. Kornilov1-1/+1
serial8250_em485_init() is supposed to be protected with p->port.lock spinlock. This may lead to issues when kmalloc sleeps, so it is better to use GFP_ATOMIC in this spinlocked context. Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Reported-by: Ильяс Гасанов <[email protected]> Signed-off-by: Matwey V. Kornilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07tty: serial: 8250: Cleanup p->em485 in serial8250_unregister_portMatwey V. Kornilov1-0/+9
Formally, currently there is no memory leak, but if serial8250_ports[line] is reused with other 8250 driver, then em485 will be already activated and it will cause issues. Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250") Signed-off-by: Matwey V. Kornilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07tty: audit: remove unused variableSudip Mukherjee1-7/+1
While building with W=1 we were getting build warning: drivers/tty/tty_audit.c:149:16: warning: variable 'sessionid' set but not used The local variable sessionid was only assigned the value of current->sessionid but was never reused. On further inspection it turned out that there is no need of audit_get_loginuid() also. Signed-off-by: Sudip Mukherjee <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-07Revert "sc16is7xx: implemented get_mctrl"Greg Kroah-Hartman1-10/+4
This reverts commit a3f0b77f36ca5c5871fb8daf7e66fa409abe1ed5. Maarten writes: It appears to be wrong and I don't have a good idea how to fix it yet. Cc: Maarten Brock <[email protected]> Signed-off-by: Greg Kroah-Hartman [email protected]
2016-02-26hvc_xen: make early_printk work with HVM guestsStefano Stabellini1-11/+16
Refactor the existing code in xen_raw_console_write to get the generic early_printk console work with HVM guests. Take the opportunity to replace the outb loop with a single outsb call to reduce the number of vmexit. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]>
2016-02-26hvc_xen: fix xenboot for DomUsStefano Stabellini1-6/+26
The xenboot early console has been partially broken for DomU for a long time: the output would only go to the hypervisor via hypercall (HYPERVISOR_console_io), while it wouldn't actually go to the DomU console. The reason is that domU_write_console would return early as no xencons structs are configured for it. Add an appropriate xencons struct for xenboot from the xenboot setup callback. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]>
2016-02-26hvc_xen: add earlycon supportStefano Stabellini1-0/+16
Introduce EARLYCON support in hvc_xen, useful for early debugging on arm and arm64, where xen early_printk is not available. It is different from xenboot_write_console on x86 in two ways: - it does not return if !xen_pv_domain(), not only because ARM guests are xen_hvm_domain(), but also because we want to capture all the early boot messages, before xen support is discovered - it does not try to print to the domU console at all, because xen support will only be discovered at a later point Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]>
2016-02-14sc16is7xx: implemented get_mctrlMaarten Brock1-4/+10
Add support for manual getting the modem control lines. Signed-off-by: Maarten Brock <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14sc16is7xx: implemented set_mctrlMaarten Brock1-2/+10
Add support for manual setting the modem control lines. Signed-off-by: Maarten Brock <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14tty/serial: digicolor: Fix bad usage of IS_ERR_VALUEGuenter Roeck1-4/+5
IS_ERR_VALUE() assumes that its parameter is an unsigned long. It can not be used to check if an unsigned int reflects an error. Doing so can result in the following build warning. drivers/tty/serial/digicolor-usart.c: In function ‘digicolor_uart_probe’: include/linux/err.h:21:38: warning: comparison is always false due to limited range of data type drivers/tty/serial/digicolor-usart.c:485:6: note: in expansion of macro ‘IS_ERR_VALUE’ If that warning is seen, an error return from platform_get_irq() is missed. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Baruch Siach <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14serial: clps711x: Fix bad usage of IS_ERR_VALUEGuenter Roeck1-4/+6
IS_ERR_VALUE() assumes that its parameter is an unsigned long. It can not be used to check if an unsigned int reflects an error. Doing so can result in the following build warning. drivers/tty/serial/clps711x.c: In function ‘uart_clps711x_probe’: include/linux/err.h:21:38: warning: comparison is always false due to limited range of data type drivers/tty/serial/clps711x.c:471:6: note: in expansion of macro ‘IS_ERR_VALUE’ If that warning is seen, an error return from platform_get_irq() is missed. Use a temporary variable to check for errors from platform_get_irq(). Also don't use IS_ERR_VALUE() to check if an integer variable is < 0. The variable can be checked directly in that case. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14serial: bcm2835: fix unsigned int issue with irqMartin Sperl1-5/+5
Fixes error condition check when requesting the irq, that would not trigger because of uart_port.irq being defined as unsigned int. Reported by: Dan Carpenter <[email protected]> Signed-off-by: Martin Sperl <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14serial: 8250_early: Add earlycon support for TegraJon Hunter1-0/+1
Declare an OF early console for Tegra so that the early console device can be specified via the "stdout-path" property in device-tree. Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-148250: mediatek: mark PM functions as __maybe_unusedArnd Bergmann1-6/+4
The mtk8250_runtime_suspend function is not used when runtime PM is disabled, so we get a warning about an unused function: drivers/tty/serial/8250/8250_mtk.c:119:12: error: 'mtk8250_runtime_suspend' defined but not used [-Werror=unused-function] static int mtk8250_runtime_suspend(struct device *dev) This marks all the PM functions as __maybe_unused to avoid the warning, and removes the #ifdef around the PM_SLEEP functions for consistency. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Matthias Brugger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14tty: serial: meson: Add support for XTAL clock inputAndreas Färber1-1/+7
Fix the baudrate calculation for 24 MHz XTAL clock found on gxbb platforms. Signed-off-by: Andreas Färber <[email protected]> Acked-by: Carlo Caione <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-14Merge 4.5-rc4 into tty-nextGreg Kroah-Hartman4-5/+54
We want the fixes in here, and this resolves a merge error in tty_io.c Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-09xen/hvc: constify hv_ops structuresJulia Lawall1-2/+2
These hv_ops structures are never modified, so declare them as const. Most were const already. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-07Revert "8250: uniphier: allow modular build with 8250 console"Greg Kroah-Hartman1-1/+1
This reverts commit d56edd7ed0ed46a8043ee3040ededbd190818ccf, it shouldn't have been applied, it was fixed properly with commit 71f50c6d9a2276f3ec85384bffe2aee1962f4669 ("of: drop symbols declared by _OF_DECLARE() from modules") Reported-by: Masahiro Yamada <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-07tty: serial: jsm_tty: fixed redundant variable issue.Jakob Østergaard Jensen1-6/+4
The variable "len" gets assigned once and it's value copied to "n", which is then used for the rest of the function. This patch fixes the unnecessary variable reassignment by using "len" throughout the function instead. Signed-off-by: Jakob Østergaard Jensen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06pty: make sure super_block is still valid in final /dev/tty closeHerton R. Krzesinski1-3/+6
Considering current pty code and multiple devpts instances, it's possible to umount a devpts file system while a program still has /dev/tty opened pointing to a previosuly closed pty pair in that instance. In the case all ptmx and pts/N files are closed, umount can be done. If the program closes /dev/tty after umount is done, devpts_kill_index will use now an invalid super_block, which was already destroyed in the umount operation after running ->kill_sb. This is another "use after free" type of issue, but now related to the allocated super_block instance. To avoid the problem (warning at ida_remove and potential crashes) for this specific case, I added two functions in devpts which grabs additional references to the super_block, which pty code now uses so it makes sure the super block structure is still valid until pty shutdown is done. I also moved the additional inode references to the same functions, which also covered similar case with inode being freed before /dev/tty final close/shutdown. Signed-off-by: Herton R. Krzesinski <[email protected]> Cc: [email protected] # 2.6.29+ Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06pty: fix possible use after free of tty->driver_dataHerton R. Krzesinski1-1/+17
This change fixes a bug for a corner case where we have the the last release from a pty master/slave coming from a previously opened /dev/tty file. When this happens, the tty->driver_data can be stale, due to all ptmx or pts/N files having already been closed before (and thus the inode related to these files, which tty->driver_data points to, being already freed/destroyed). The fix here is to keep a reference on the opened master ptmx inode. We maintain the inode referenced until the final pty_unix98_shutdown, and only pass this inode to devpts_kill_index. Signed-off-by: Herton R. Krzesinski <[email protected]> Cc: <[email protected]> # 2.6.29+ Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: vt: initialize softcursor_original correctlyMelchior FRANZ1-1/+1
add_softcursor() stores the contents of the text buffer position in this variable before drawing the softcursor, whereas hide_softcursor() writes the value back. A value of -1 means that no cursor has been drawn and therefore no character is to be restored. softcursor_original, however, is only implicitly initialized with 0. Therefore, when hide_softcursor is called for the first time (console_init -> con_init -> redraw_screen -> hide_cursor), it wrongly writes 0x0000 in the top left corner of the text buffer. Normally, this is just as black as the rest of the screen (vc_video_erase_char) and can't be seen, but it appears as a black cursor rectangle on non-black backgrounds e.g. with boot option "vt.global_cursor_default=0 vt.color=0xf0". softcursor_original needs to be initialized with -1. Signed-off-by: Melchior FRANZ <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: hvc_xen: hide xen_console_remove when unusedArnd Bergmann1-1/+1
xencons_disconnect_backend() is only called from xen_console_remove(), which is conditionally compiled, so we get a harmless warning when CONFIG_HVC_XEN_FRONTEND is unset: hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function] This moves the function down into the same #ifdef section to silence the warning. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: cyclades: cyz_interrupt is only used for PCIArnd Bergmann1-1/+1
When CONFIG_PCI is not set, enabling CONFIG_CYZ_INTR has no practical effect other than generating a warning about an unused function: drivers/tty/cyclades.c:1184:20: warning: 'cyz_interrupt' defined but not used [-Wunused-function] static irqreturn_t cyz_interrupt(int irq, void *dev_id) This adds a dependency to avoid that warning. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: nozomi: avoid a harmless gcc warningArnd Bergmann1-1/+1
The nozomi wireless data driver has its own helper function to transfer data from a FIFO, doing an extra byte swap on big-endian architectures, presumably to bring the data back into byte-serial order after readw() or readl() perform their implicit byteswap. This helper function is used in the receive_data() function to first read the length into a 32-bit variable, which causes a compile-time warning: drivers/tty/nozomi.c: In function 'receive_data': drivers/tty/nozomi.c:857:9: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] The problem is that gcc is unsure whether the data was actually read or not. We know that it is at this point, so we can replace it with a single readl() to shut up that warning. I am leaving the byteswap in there, to preserve the existing behavior, even though this seems fishy: Reading the length of the data into a cpu-endian variable should normally not use a second byteswap on big-endian systems, unless the hardware is aware of the CPU endianess. There appears to be a lot more confusion about endianess in this driver, so it probably has not worked on big-endian systems in a long time, if ever, and I have no way to test it. It's well possible that this driver has not been used by anyone in a while, the last patch that looks like it was tested on the hardware is from 2008. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: constify tty_port_operations structsAya Mahfouz2-2/+2
Constifies tty_port_operations structures in the tty driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall <[email protected]> Signed-off-by: Aya Mahfouz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06TTY: n_hdlc, fix lockdep false positiveJiri Slaby1-15/+4
The class of 4 n_hdls buf locks is the same because a single function n_hdlc_buf_list_init is used to init all the locks. But since flush_tx_queue takes n_hdlc->tx_buf_list.spinlock and then calls n_hdlc_buf_put which takes n_hdlc->tx_free_buf_list.spinlock, lockdep emits a warning: ============================================= [ INFO: possible recursive locking detected ] 4.3.0-25.g91e30a7-default #1 Not tainted --------------------------------------------- a.out/1248 is trying to acquire lock: (&(&list->spinlock)->rlock){......}, at: [<ffffffffa01fd020>] n_hdlc_buf_put+0x20/0x60 [n_hdlc] but task is already holding lock: (&(&list->spinlock)->rlock){......}, at: [<ffffffffa01fdc07>] n_hdlc_tty_ioctl+0x127/0x1d0 [n_hdlc] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&list->spinlock)->rlock); lock(&(&list->spinlock)->rlock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by a.out/1248: #0: (&tty->ldisc_sem){++++++}, at: [<ffffffff814c9eb0>] tty_ldisc_ref_wait+0x20/0x50 #1: (&(&list->spinlock)->rlock){......}, at: [<ffffffffa01fdc07>] n_hdlc_tty_ioctl+0x127/0x1d0 [n_hdlc] ... Call Trace: ... [<ffffffff81738fd0>] _raw_spin_lock_irqsave+0x50/0x70 [<ffffffffa01fd020>] n_hdlc_buf_put+0x20/0x60 [n_hdlc] [<ffffffffa01fdc24>] n_hdlc_tty_ioctl+0x144/0x1d0 [n_hdlc] [<ffffffff814c25c1>] tty_ioctl+0x3f1/0xe40 ... Fix it by initializing the spin_locks separately. This removes also reduntand memset of a freshly kzallocated space. Signed-off-by: Jiri Slaby <[email protected]> Reported-by: Dmitry Vyukov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: synclinkmp: do not ignore errors in probe()Alexey Khoroshilov1-16/+28
synclinkmp_init_one() ignores all errors and does not release all resources if something fails. The patch adds returned code to device_init() and add_device() and proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty/vt/keyboard: use memdup_user to simplify codeSaurabh Sengar1-9/+5
use memdup_user rather than duplicating implementation. found by coccinelle Signed-off-by: Saurabh Sengar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06drivers/tty: make ehv_bytechan.c explicitly non-modularPaul Gortmaker1-37/+3
The Kconfig currently controlling compilation of this code is: drivers/tty/Kconfig:config PPC_EPAPR_HV_BYTECHAN drivers/tty/Kconfig: bool "ePAPR hypervisor byte channel driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06drivers/tty: make hvc/hvc_vio.c explicitly non-modularPaul Gortmaker1-25/+4
The Kconfig currently controlling compilation of this code is: drivers/tty/hvc/Kconfig:config HVC_CONSOLE drivers/tty/hvc/Kconfig: bool "pSeries Hypervisor Virtual Console support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. We don't replace module.h with init.h since the file already has that. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Anton Blanchard <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Add generic port init macroAnton Wuerfel5-62/+49
This patch removes redundant 8250 port initialization macros and replaces them by a single generic base-macro, which is specialized as needed. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix indentation warningsAnton Wuerfel3-13/+13
Checkpatch complains about incorrect indentation of switch/case statements. This patch fixes the corresponding warnings. Additionally some indentation is changed to match the correct format specified in the Linux Kernel Coding Style. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Merge duplicate conditionsAnton Wuerfel1-4/+4
This patch refactors a switch case statement by merging an if condition in the default case into an identical condition right after the switch statement. This comes with a slight change in behaviour: If pci_netmos_9900_numports returns 0, an additional warning is printed. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Correct conversion specifiersAnton Wuerfel1-2/+2
This patch fixes compiler warnings about wrong conversion specifiers used in a debug output in 8250_pnp.c. The precise warning is: drivers/tty/serial/8250/8250_pnp.c: In function ‘serial_pnp_probe’: include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument of [...] drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro ‘dev_dbg’ dev_dbg(&dev->dev, ^ include/linux/dynamic_debug.h:64:16: warning: format ‘%lx’ expects argument of [...] drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro ‘dev_dbg’ dev_dbg(&dev->dev, ^ Those warnings never got triggered, because the command was nested in an #ifdef, which is removed by a patch of this series. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Remove SERIAL_DEBUG_PNP macroPhillip Raffeck1-5/+5
This patch removes the macro SERIAL_DEBUG_PNP, which is used to enable debugging at compile time. As SERIAL_DEBUG_PNP is an orphan, the corresponding #ifdef is removed. To keep the ability to enable debugging at compile time, the call to printk(KERN_DEBUG ...) is replaced by a corresponding call to dev_dbg(), which is configurable via CONFIG_DYNAMIC_DEBUG. Signed-off-by: Phillip Raffeck <[email protected]> Signed-off-by: Anton Würfel <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Suitably replace printkPhillip Raffeck4-17/+18
This patch replaces printk by the corresponding variant of dev_* in order to fix checkpatch warnings. If no suitable device pointer is present, the corresponding pr_* variant is used. Signed-off-by: Phillip Raffeck <[email protected]> Signed-off-by: Anton Würfel <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix multi-line stringsAnton Wuerfel2-4/+3
Merged user-visible multi-line strings into a single line according to the Linux Kernel Coding Style, which allows user-visible strings to exceed the maximum line length of 80 characters. The main reason for this is to facilitate grepping for these strings. However, some strings were ignored in this patch, because the use of format specifiers breaks the ability to grep anyway. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Add parentheses to macroAnton Wuerfel2-2/+2
This patch fixes a checkpatch warning caused by missing parentheses in the definition of a macro. Furthermore redundant parentheses are removed in an assignment. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix line continuation warningAnton Wuerfel1-2/+2
Fixed checkpatch warning about an unnecessary line continuation in a multi-line variable assignment. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Move EXPORT_SYMBOL to functionAnton Wuerfel1-3/+2
This patch moves EXPORT_SYMBOL macros directly after the definition of the corresponding symbol to remove checkpatch warnings. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Remove else after returnAnton Wuerfel1-8/+8
This patch fixes checkpatch warnings about unnecessary else blocks after return statements. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix multiline comment styleAnton Wuerfel4-34/+50
Checkpatch outputs some warnings about incorrect comment style, which is fixed by this patch. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix braces after structAnton Wuerfel1-2/+1
This patch fixes a checkpatch warning by moving an opening curly brace to its correct position. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Replace spaces with tabsAnton Wuerfel2-8/+8
Indentation is changed to match the correct format of using tabs instead of spaces wherever possible. Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: 8250: Fix whitespace errorsAnton Wuerfel5-35/+39
This patch fixes whitespace errors reported by checkpatch to increase readability. Main focus is on missing spaces after commas in function headers and macros (like foo,bar edited to foo, bar). Signed-off-by: Anton Würfel <[email protected]> Signed-off-by: Phillip Raffeck <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>