From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759258AbcAKMiP (ORCPT ); Mon, 11 Jan 2016 07:38:15 -0500 Received: from mga01.intel.com ([192.55.52.88]:45770 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759165AbcAKMiM (ORCPT ); Mon, 11 Jan 2016 07:38:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,552,1444719600"; d="scan'208";a="888133867" Message-ID: <1452515914.26146.14.camel@linux.intel.com> Subject: Re: [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk From: Andy Shevchenko To: Anton Wuerfel , Greg Kroah-Hartman Cc: Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Peter Hurley , Heikki Krogerus , Qipeng Zha , Desmond Liu , Wang Long , Matt Redfearn , Paul Burton , Ralf Baechle , Krzysztof Kozlowski , Peter Hung , Soeren Grunewald , Adam Lee , "Maciej S. Szmigiero" , Mans Rullgard , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@i4.cs.fau.de, phillip.raffeck@fau.de Date: Mon, 11 Jan 2016 14:38:34 +0200 In-Reply-To: <1452275039-18787-11-git-send-email-anton.wuerfel@fau.de> References: <1452275039-18787-1-git-send-email-anton.wuerfel@fau.de> <1452275039-18787-11-git-send-email-anton.wuerfel@fau.de> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote: > From: Phillip Raffeck > > 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. > > --- a/drivers/tty/serial/8250/8250_hp300.c > +++ b/drivers/tty/serial/8250/8250_hp300.c > > @@ -141,13 +141,13 @@ int __init hp300_setup_serial_console(void) >   if (DIO_ID(pa + DIO_VIRADDRBASE) & 0x80) >   add_preferred_console("ttyS", port.line, > "9600n8"); >  #else > - printk(KERN_WARNING "Serial console is DCA but > support is disabled (CONFIG_HPDCA)!\n"); > + pr_warn("Serial console is DCA but support is > disabled (CONFIG_HPDCA)!\n"); >   return 0; >  #endif >   } >   >   if (early_serial_setup(&port) < 0) > - printk(KERN_WARNING "hp300_setup_serial_console(): > early_serial_setup() failed.\n"); > + pr_warn("hp300_setup_serial_console(): > early_serial_setup() failed.\n"); %s:…, __func__ ? >   return 0; >  } >  #endif /* CONFIG_SERIAL_8250_CONSOLE */ > @@ -179,8 +179,9 @@ static int hpdca_init_one(struct dio_dev *d, >   line = serial8250_register_8250_port(&uart); >   >   if (line < 0) { > - printk(KERN_NOTICE "8250_hp300: register_serial() > DCA scode %d" > -        " irq %d failed\n", d->scode, uart.port.irq); > + dev_notice(&d->dev, > +   "8250_hp300: register_serial() DCA scode > %d irq %d failed\n", > +   d->scode, uart.port.irq); >   return -ENOMEM; >   } >   > @@ -260,8 +261,8 @@ static int __init hp300_8250_init(void) >   line = serial8250_register_8250_port(&uart); >   >   if (line < 0) { > - printk(KERN_NOTICE "8250_hp300: > register_serial() APCI" > -        " %d irq %d failed\n", i, > uart.port.irq); > + pr_notice("8250_hp300: register_serial() > APCI %d irq %d failed\n", > +   i, uart.port.irq); Inconsistent with dev_notice() above. Choose one which is most suitable here. -- Andy Shevchenko Intel Finland Oy