diff mbox

[v3,11/12] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro

Message ID 1452248528-14023-12-git-send-email-anton.wuerfel@fau.de (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Anton Wuerfel Jan. 8, 2016, 10:22 a.m. UTC
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(-)

Comments

kernel test robot Jan. 8, 2016, 10:52 a.m. UTC | #1
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
diff mbox

Patch

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;