Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1304347 > unrolled thread
| Started by | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| First post | 2016-01-08 11:30 +0100 |
| Last post | 2016-01-08 11:30 +0100 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 00/12] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel <anton.wuerfel@fau.de> - 2016-01-08 11:30 +0100
[PATCH v3 11/12] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro Anton Wuerfel <anton.wuerfel@fau.de> - 2016-01-08 11:30 +0100
Re: [PATCH v3 11/12] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro kbuild test robot <lkp@intel.com> - 2016-01-08 12:00 +0100
[PATCH v3 07/12] tty: serial: 8250: Fix line continuation warning Anton Wuerfel <anton.wuerfel@fau.de> - 2016-01-08 11:30 +0100
[PATCH v3 06/12] tty: serial: 8250: Move EXPORT_SYMBOL to function Anton Wuerfel <anton.wuerfel@fau.de> - 2016-01-08 11:30 +0100
[PATCH v3 08/12] tty: serial: 8250: Add parentheses to macro Anton Wuerfel <anton.wuerfel@fau.de> - 2016-01-08 11:30 +0100
| From | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| Date | 2016-01-08 11:30 +0100 |
| Subject | [PATCH v3 00/12] tty: serial: 8250: Fix checkpatch warnings |
| Message-ID | <qOCsV-5li-3@gated-at.bofh.it> |
Hello Peter and Andy, sorry for the long delay - we were very busy during christmas holidays. We tried to incorporate your suggestions. Regards, Anton Wuerfel Phillip Raffeck This patch set fixes several checkpatch warnings in tty/serial/8250. Patch 1/12: Adds missing spaces (mainly to function/macro headers) Patch 2/12: Replace spaces with tabs wherever possible Patch 3/12: Slight patch which moves an opening curly brace Patch 4/12: Fixes multiline comment style Patch 5/12: Removes else blocks after return statements Patch 6/12: Slight patch which moves EXPORT_SYMBOL macro to correct position Patch 7/12: Slight patch which removes an unneccessary line continuation Patch 8/12: Slight patch which adds parentheses to a macro definition Patch 9/12: Merges user-visible multiline strings to a single line Patch 10/12: Replace printk by dev_* or pr_* where appropriate Patch 11/12: Remove orphaned debug macro Patch 12/12: Fixes code indentation Remaining checkpatch warnings after applying this patch series: -line over 80 characters This error mostly occurs in serial_cs.c, which contains long-lined macro calls. However, splitting these calls into multiple lines would not increase readability. -externs should be avoided in .c files This occurs in 8250_hp300.c. There is no corresponding header file the extern statement could be moved to. It could be moved to 8250.h but this would affect other .c files. -Use #include <linux/*.h> instead of <asm/*.h> This warning has been left open for more experienced kernel hackers. This patch series is about style issues. We do not intend to alter the code behavior. -struct uart_ops should normally be const This warning only occurs in 8250_core.c. The corresponding struct cannot be declared as const because it is altered in serial8250_isa_init_ports(). Maybe a checkpatch exception should be added for this particular warning. -quoted string split across lines These strings were ignored because they otherwise would exceed 80 characters in a single line. These particular strings use format specifiers, which break the ability to grep for them anyway. Anton Wuerfel (12): Phillip Raffeck (12): tty: serial: 8250: Fix whitespace errors tty: serial: 8250: Replace spaces with tabs tty: serial: 8250: Fix braces after struct tty: serial: 8250: Fix multiline comment style tty: serial: 8250: Remove else after return tty: serial: 8250: Move EXPORT_SYMBOL to function tty: serial: 8250: Fix line continuation warning tty: serial: 8250: Add parentheses to macro tty: serial: 8250: Fix multi-line strings tty: serial: 8250: Fix indentation warnings tty: serial: 8250: Suitably replace printk tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro drivers/tty/serial/8250/8250_accent.c | 2 +- drivers/tty/serial/8250/8250_acorn.c | 2 +- drivers/tty/serial/8250/8250_boca.c | 2 +- drivers/tty/serial/8250/8250_core.c | 15 ++--- drivers/tty/serial/8250/8250_exar_st16c554.c | 2 +- drivers/tty/serial/8250/8250_fourport.c | 2 +- drivers/tty/serial/8250/8250_gsc.c | 7 ++- drivers/tty/serial/8250/8250_hp300.c | 26 ++++---- drivers/tty/serial/8250/8250_hub6.c | 2 +- drivers/tty/serial/8250/8250_ingenic.c | 12 ++-- drivers/tty/serial/8250/8250_pci.c | 49 +++++++-------- drivers/tty/serial/8250/8250_pnp.c | 20 ++++--- drivers/tty/serial/8250/8250_port.c | 46 +++++++------- drivers/tty/serial/8250/serial_cs.c | 89 +++++++++++++++------------- 14 files changed, 145 insertions(+), 131 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| Date | 2016-01-08 11:30 +0100 |
| Subject | [PATCH v3 11/12] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro |
| Message-ID | <qOCsX-5li-41@gated-at.bofh.it> |
| In reply to | #1304347 |
From: Phillip Raffeck <phillip.raffeck@fau.de>
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 <phillip.raffeck@fau.de>
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
CC: linux-kernel@i4.cs.fau.de
---
v3: Remove orphaned macro as suggested by Andy
---
drivers/tty/serial/8250/8250_pnp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index ffa7354..5f852e8 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -464,11 +464,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
} else
return -ENODEV;
-#ifdef SERIAL_DEBUG_PNP
- printk(KERN_DEBUG
- "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
- uart.port.iobase, uart.port.mapbase, uart.port.irq, uart.port.iotype);
-#endif
+ dev_debug(&dev->dev,
+ "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
+ uart.port.iobase, uart.port.mapbase,
+ uart.port.irq, uart.port.iotype);
+
if (flags & CIR_PORT) {
uart.port.flags |= UPF_FIXED_PORT | UPF_FIXED_TYPE;
uart.port.type = PORT_8250_CIR;
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-01-08 12:00 +0100 |
| Subject | Re: [PATCH v3 11/12] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro |
| Message-ID | <qOCVY-5yb-27@gated-at.bofh.it> |
| In reply to | #1304348 |
[Multipart message — attachments visible in raw view] — view raw
Hi Phillip,
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on v4.4-rc8 next-20160108]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Anton-Wuerfel/tty-serial-8250-Fix-checkpatch-warnings/20160108-182908
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: x86_64-randconfig-i0-201601 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/tty/serial/8250/8250_pnp.c: In function 'serial_pnp_probe':
>> drivers/tty/serial/8250/8250_pnp.c:467:2: error: implicit declaration of function 'dev_debug' [-Werror=implicit-function-declaration]
dev_debug(&dev->dev,
^
cc1: some warnings being treated as errors
vim +/dev_debug +467 drivers/tty/serial/8250/8250_pnp.c
461 uart.port.mapbase = pnp_mem_start(dev, 0);
462 uart.port.iotype = UPIO_MEM;
463 uart.port.flags = UPF_IOREMAP;
464 } else
465 return -ENODEV;
466
> 467 dev_debug(&dev->dev,
468 "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
469 uart.port.iobase, uart.port.mapbase,
470 uart.port.irq, uart.port.iotype);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| Date | 2016-01-08 11:30 +0100 |
| Subject | [PATCH v3 07/12] tty: serial: 8250: Fix line continuation warning |
| Message-ID | <qOCsX-5li-33@gated-at.bofh.it> |
| In reply to | #1304347 |
Fixed checkpatch warning about an unnecessary line continuation in a multi-line variable assignment. Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> CC: linux-kernel@i4.cs.fau.de --- drivers/tty/serial/8250/8250_hp300.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c index 5e1b464..cf566bb 100644 --- a/drivers/tty/serial/8250/8250_hp300.c +++ b/drivers/tty/serial/8250/8250_hp300.c @@ -248,8 +248,8 @@ static int __init hp300_8250_init(void) /* Memory mapped I/O */ uart.port.iotype = UPIO_MEM; - uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ \ - | UPF_BOOT_AUTOCONF; + uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ + | UPF_BOOT_AUTOCONF; /* XXX - no interrupt support yet */ uart.port.irq = 0; uart.port.uartclk = HPAPCI_BAUD_BASE * 16; -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| Date | 2016-01-08 11:30 +0100 |
| Subject | [PATCH v3 06/12] tty: serial: 8250: Move EXPORT_SYMBOL to function |
| Message-ID | <qOCsX-5li-37@gated-at.bofh.it> |
| In reply to | #1304347 |
This patch moves EXPORT_SYMBOL macros directly after the definition of
the corresponding symbol to remove checkpatch warnings.
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
CC: linux-kernel@i4.cs.fau.de
---
drivers/tty/serial/8250/8250_core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 3912646..15082ae 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -763,6 +763,7 @@ void serial8250_suspend_port(int line)
uart_suspend_port(&serial8250_reg, port);
}
+EXPORT_SYMBOL(serial8250_suspend_port);
/**
* serial8250_resume_port - resume one serial port
@@ -788,6 +789,7 @@ void serial8250_resume_port(int line)
}
uart_resume_port(&serial8250_reg, port);
}
+EXPORT_SYMBOL(serial8250_resume_port);
/*
* Register a set of serial devices attached to a platform device. The
@@ -1167,9 +1169,6 @@ static void __exit serial8250_exit(void)
module_init(serial8250_init);
module_exit(serial8250_exit);
-EXPORT_SYMBOL(serial8250_suspend_port);
-EXPORT_SYMBOL(serial8250_resume_port);
-
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic 8250/16x50 serial driver");
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Anton Wuerfel <anton.wuerfel@fau.de> |
|---|---|
| Date | 2016-01-08 11:30 +0100 |
| Subject | [PATCH v3 08/12] tty: serial: 8250: Add parentheses to macro |
| Message-ID | <qOCsX-5li-39@gated-at.bofh.it> |
| In reply to | #1304347 |
This patch fixes a checkpatch warning caused by missing parentheses in the definition of a macro. Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> CC: linux-kernel@i4.cs.fau.de --- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 15082ae..d042ad5 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -686,7 +686,7 @@ static int __init univ8250_console_init(void) } console_initcall(univ8250_console_init); -#define SERIAL8250_CONSOLE &univ8250_console +#define SERIAL8250_CONSOLE (&univ8250_console) #else #define SERIAL8250_CONSOLE NULL #endif -- 1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web