linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
To: linux-kernel@vger.kernel.org
Cc: lorenzo.pieralisi@arm.com, linux-ia64@vger.kernel.org,
	linux-serial@vger.kernel.org, andrew@aj.id.au,
	gregkh@linuxfoundation.org, sudeep.holla@arm.com,
	liviu.dudau@arm.com, linux-mips@vger.kernel.org, vz@mleia.com,
	linux@prisktech.co.nz, sparclinux@vger.kernel.org,
	khilman@baylibre.com, macro@linux-mips.org,
	slemieux.tyco@gmail.com, matthias.bgg@gmail.com,
	jacmet@sunsite.dk, linux-amlogic@lists.infradead.org,
	andriy.shevchenko@linux.intel.com, linuxppc-dev@lists.ozlabs.org,
	davem@davemloft.net
Subject: [PATCH 31/41] drivers: tty: serial: ioc4_serial: use pr_*() instead of printk()
Date: Sat, 27 Apr 2019 14:52:12 +0200	[thread overview]
Message-ID: <1556369542-13247-32-git-send-email-info@metux.net> (raw)
In-Reply-To: <1556369542-13247-1-git-send-email-info@metux.net>

This fixes a bunch of checkpatch warnings:

    WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
    #930: FILE: drivers/tty/serial/ioc4_serial.c:930:
    +		printk(KERN_ERR

    WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
    #945: FILE: drivers/tty/serial/ioc4_serial.c:945:
    +			printk(KERN_ERR

    WARNING: printk() should include KERN_<LEVEL> facility level
    #1028: FILE: drivers/tty/serial/ioc4_serial.c:1028:
    +		printk ("%s : %d : mem 0x%p sio_ir 0x%x sio_ies 0x%x "

    WARNING: space prohibited between function name and open parenthesis '('
    #1028: FILE: drivers/tty/serial/ioc4_serial.c:1028:
    +		printk ("%s : %d : mem 0x%p sio_ir 0x%x sio_ies 0x%x "

    WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
    #1064: FILE: drivers/tty/serial/ioc4_serial.c:1064:
    +	printk(KERN_INFO "IOC4 firmware revision %d\n", ioc4_revid);

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #1066: FILE: drivers/tty/serial/ioc4_serial.c:1066:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #1080: FILE: drivers/tty/serial/ioc4_serial.c:1080:
    +			printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #1870: FILE: drivers/tty/serial/ioc4_serial.c:1870:
    +			printk(KERN_WARNING "IOC4 serial: "

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2170: FILE: drivers/tty/serial/ioc4_serial.c:2170:
+			printk(KERN_WARNING "IOC4 serial: "

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2796: FILE: drivers/tty/serial/ioc4_serial.c:2796:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2804: FILE: drivers/tty/serial/ioc4_serial.c:2804:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2818: FILE: drivers/tty/serial/ioc4_serial.c:2818:
    +		printk(KERN_WARNING "ioc4_attach_one"

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2828: FILE: drivers/tty/serial/ioc4_serial.c:2828:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2861: FILE: drivers/tty/serial/ioc4_serial.c:2861:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2917: FILE: drivers/tty/serial/ioc4_serial.c:2917:
    +		printk(KERN_WARNING

    WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
    #2923: FILE: drivers/tty/serial/ioc4_serial.c:2923:
    +		printk(KERN_WARNING

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/tty/serial/ioc4_serial.c | 39 +++++++++++++++------------------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index 21c1b8f..4ab67f1 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -927,8 +927,7 @@ static void handle_dma_error_intr(void *arg, uint32_t other_ir)
 	writel(hooks->intr_dma_error, &port->ip_mem->other_ir.raw);
 
 	if (readl(&port->ip_mem->pci_err_addr_l.raw) & IOC4_PCI_ERR_ADDR_VLD) {
-		printk(KERN_ERR
-			"PCI error address is 0x%llx, "
+		pr_err("PCI error address is 0x%llx, "
 				"master is serial port %c %s\n",
 		     (((uint64_t)readl(&port->ip_mem->pci_err_addr_h)
 							 << 32)
@@ -942,8 +941,7 @@ static void handle_dma_error_intr(void *arg, uint32_t other_ir)
 
 		if (readl(&port->ip_mem->pci_err_addr_l.raw)
 						& IOC4_PCI_ERR_ADDR_MUL_ERR) {
-			printk(KERN_ERR
-				"Multiple errors occurred\n");
+			pr_err("Multiple errors occurred\n");
 		}
 	}
 	spin_unlock_irqrestore(&port->ip_lock, flags);
@@ -1025,7 +1023,7 @@ static irqreturn_t ioc4_intr(int irq, void *arg)
 		unsigned long flag;
 
 		spin_lock_irqsave(&soft->is_ir_lock, flag);
-		printk ("%s : %d : mem 0x%p sio_ir 0x%x sio_ies 0x%x "
+		pr_debug("%s : %d : mem 0x%p sio_ir 0x%x sio_ies 0x%x "
 				"other_ir 0x%x other_ies 0x%x mask 0x%x\n",
 		     __func__, __LINE__,
 		     (void *)mem, readl(&mem->sio_ir.raw),
@@ -1061,9 +1059,9 @@ static inline int ioc4_attach_local(struct ioc4_driver_data *idd)
 	/* IOC4 firmware must be at least rev 62 */
 	pci_read_config_word(pdev, PCI_COMMAND_SPECIAL, &ioc4_revid);
 
-	printk(KERN_INFO "IOC4 firmware revision %d\n", ioc4_revid);
+	pr_info("IOC4 firmware revision %d\n", ioc4_revid);
 	if (ioc4_revid < ioc4_revid_min) {
-		printk(KERN_WARNING
+		pr_warn(
 		    "IOC4 serial not supported on firmware rev %d, "
 				"please upgrade to rev %d or higher\n",
 				ioc4_revid, ioc4_revid_min);
@@ -1077,8 +1075,7 @@ static inline int ioc4_attach_local(struct ioc4_driver_data *idd)
 							port_number++) {
 		port = kzalloc(sizeof(struct ioc4_port), GFP_KERNEL);
 		if (!port) {
-			printk(KERN_WARNING
-				"IOC4 serial memory not available for port\n");
+			pr_warn("IOC4 serial memory not available for port\n");
 			goto free;
 		}
 		spin_lock_init(&port->ip_lock);
@@ -1867,7 +1864,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
 		uint32_t shadow;
 
 		if ( loop_counter-- <= 0 ) {
-			printk(KERN_WARNING "IOC4 serial: "
+			pr_warn("IOC4 serial: "
 					"possible hang condition/"
 					"port stuck on interrupt.\n");
 			break;
@@ -2167,7 +2164,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 		entry = (struct ring_entry *)((caddr_t)inring + cons_ptr);
 
 		if ( loop_counter-- <= 0 ) {
-			printk(KERN_WARNING "IOC4 serial: "
+			pr_warn("IOC4 serial: "
 					"possible hang condition/"
 					"port stuck on read.\n");
 			break;
@@ -2793,16 +2790,14 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 
 	if (!request_mem_region(tmp_addr1, sizeof(struct ioc4_serial),
 					"sioc4_uart")) {
-		printk(KERN_WARNING
-			"ioc4 (%p): unable to get request region for "
+		pr_warn("ioc4 (%p): unable to get request region for "
 				"uart space\n", (void *)idd->idd_pdev);
 		ret = -ENODEV;
 		goto out1;
 	}
 	serial = ioremap(tmp_addr1, sizeof(struct ioc4_serial));
 	if (!serial) {
-		printk(KERN_WARNING
-			 "ioc4 (%p) : unable to remap ioc4 serial register\n",
+		pr_warn("ioc4 (%p) : unable to remap ioc4 serial register\n",
 				(void *)idd->idd_pdev);
 		ret = -ENODEV;
 		goto out2;
@@ -2815,7 +2810,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 	control = kzalloc(sizeof(struct ioc4_control), GFP_KERNEL);
 
 	if (!control) {
-		printk(KERN_WARNING "ioc4_attach_one"
+		pr_warn("ioc4_attach_one"
 		       ": unable to get memory for the IOC4\n");
 		ret = -ENOMEM;
 		goto out2;
@@ -2825,8 +2820,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 	/* Allocate the soft structure */
 	soft = kzalloc(sizeof(struct ioc4_soft), GFP_KERNEL);
 	if (!soft) {
-		printk(KERN_WARNING
-		       "ioc4 (%p): unable to get memory for the soft struct\n",
+		pr_warn("ioc4 (%p): unable to get memory for the soft struct\n",
 		       (void *)idd->idd_pdev);
 		ret = -ENOMEM;
 		goto out3;
@@ -2858,8 +2852,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 				"sgi-ioc4serial", soft)) {
 		control->ic_irq = idd->idd_pdev->irq;
 	} else {
-		printk(KERN_WARNING
-		    "%s : request_irq fails for IRQ 0x%x\n ",
+		pr_warn("%s : request_irq fails for IRQ 0x%x\n ",
 			__func__, idd->idd_pdev->irq);
 	}
 	ret = ioc4_attach_local(idd);
@@ -2914,14 +2907,12 @@ static int __init ioc4_serial_init(void)
 
 	/* register with serial core */
 	if ((ret = uart_register_driver(&ioc4_uart_rs232)) < 0) {
-		printk(KERN_WARNING
-			"%s: Couldn't register rs232 IOC4 serial driver\n",
+		pr_warn("%s: Couldn't register rs232 IOC4 serial driver\n",
 			__func__);
 		goto out;
 	}
 	if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) {
-		printk(KERN_WARNING
-			"%s: Couldn't register rs422 IOC4 serial driver\n",
+		pr_warn("%s: Couldn't register rs422 IOC4 serial driver\n",
 			__func__);
 		goto out_uart_rs232;
 	}
-- 
1.9.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2019-04-27 12:54 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 12:51 serial drivers polishing Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 13:29   ` Greg KH
2019-04-29 14:11     ` Enrico Weigelt, metux IT consult
2019-04-29 14:23       ` Greg KH
2019-04-27 13:31   ` Greg KH
2019-04-29  7:23     ` Enrico Weigelt, metux IT consult
2019-04-29 12:37     ` Enrico Weigelt, metux IT consult
2019-04-29 13:12       ` Greg KH
2019-05-01  2:20         ` Maciej W. Rozycki
2019-04-27 12:51 ` [PATCH 02/41] drivers: tty: serial: dz: include <linux/io.h> instead of <asm/io.h> Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 03/41] drivers: tty: serial: dz: fix missing parentheses Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 04/41] drivers: tty: serial: dz: fix use fix bare 'unsigned' Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 05/41] drivers: tty: serial: dz: use pr_info() instead of incomplete printk() Enrico Weigelt, metux IT consult
2019-04-27 13:30   ` Greg KH
2019-04-27 12:51 ` [PATCH 06/41] drivers: tty: serial: sb1250-duart: use dev_err() instead of printk() Enrico Weigelt, metux IT consult
2019-05-01  2:29   ` Maciej W. Rozycki
2019-04-27 12:51 ` [PATCH 07/41] drivers: tty: serial: sb1250-duart: include <linux/io.h> instead of <asm/io.h> Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 08/41] drivers: tty: serial: sb1250-duart: fix checkpatch warning on printk() Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 09/41] drivers: tty: serial: sb1250-duart: fill mapsize and use it Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 10/41] drivers: tty: serial: sb1250-duart: fix missing parentheses Enrico Weigelt, metux IT consult
2019-04-27 13:32   ` Greg KH
2019-04-27 12:51 ` [PATCH 11/41] drivers: tty: serial: sb1250-duart: fix formatting error Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 12/41] drivers: tty: serial: uartlite: use dev_dbg() instead of pr_debug() Enrico Weigelt, metux IT consult
2019-04-29 15:26   ` Peter Korsgaard
2019-04-27 12:51 ` [PATCH 13/41] drivers: tty: serial: uartlite: fill mapsize and use it Enrico Weigelt, metux IT consult
2019-04-29 15:19   ` Peter Korsgaard
2019-04-29 18:26     ` Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 14/41] drivers: tty: serial: uartlite: remove unnecessary braces Enrico Weigelt, metux IT consult
2019-04-29 15:20   ` Peter Korsgaard
2019-04-27 12:51 ` [PATCH 15/41] drivers: tty: serial: uartlite: fix use fix bare 'unsigned' Enrico Weigelt, metux IT consult
2019-04-29 15:21   ` Peter Korsgaard
2019-04-27 12:51 ` [PATCH 16/41] drivers: tty: serial: uartlite: fix overlong lines Enrico Weigelt, metux IT consult
2019-04-29 15:24   ` Peter Korsgaard
2019-04-27 12:51 ` [PATCH 17/41] drivers: tty: serial: apbuart: fix logging calls Enrico Weigelt, metux IT consult
2019-04-27 12:51 ` [PATCH 18/41] drivers: tty: serial: apbuart: use dev_info() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 19/41] drivers: tty: serial: apbuart: fix code formatting Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 20/41] drivers: tty: serial: cpm_uart: use dev_err()/dev_warn() instead of printk() Enrico Weigelt, metux IT consult
2019-04-29 16:02   ` Christophe Leroy
2019-04-27 12:52 ` [PATCH 21/41] drivers: tty: serial: cpm_uart: fix includes Enrico Weigelt, metux IT consult
2019-04-29 16:02   ` Christophe Leroy
2019-04-27 12:52 ` [PATCH 22/41] drivers: tty: serial: cpm_uart: fix logging calls Enrico Weigelt, metux IT consult
2019-04-29 15:59   ` Christophe Leroy
2019-04-29 16:20     ` Enrico Weigelt, metux IT consult
2019-04-30 14:10     ` Andy Shevchenko
2019-04-27 12:52 ` [PATCH 23/41] drivers: tty: serial: cpm_uart: fix styling issues Enrico Weigelt, metux IT consult
2019-04-29 15:56   ` Christophe Leroy
2019-04-27 12:52 ` [PATCH 24/41] drivers: tty: serial: timbuart: use dev_err() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 25/41] drivers: tty: serial: timbuart: fix formatting issues Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 26/41] drivers: tty: serial: sunzilog: use dev_info() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 27/41] drivers: tty: serial: sunzilog: fix formatting issues Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 28/41] drivers: tty: serial: sunzilog: fix includes Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 29/41] drivers: tty: serial: sunzilog: cleanup logging Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 30/41] drivers: tty: serial: ioc4_serial: use dev_warn() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` Enrico Weigelt, metux IT consult [this message]
2019-04-27 12:52 ` [PATCH 32/41] drivers: tty: serial: 21285: define's for address/size, use mapsize field Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 33/41] drivers: tty: serial: zs: use dev_err() instead of printk() Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 34/41] drivers: tty: serial: zs: fill mapsize and use it Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 35/41] drivers: tty: serial: 8250: add mapsize to platform data Enrico Weigelt, metux IT consult
2019-04-29  7:06   ` Esben Haabendal
2019-04-27 12:52 ` [PATCH 36/41] drivers: tty: serial: 8250: store mmio resource size in port struct Enrico Weigelt, metux IT consult
2019-04-28 15:18   ` Andy Shevchenko
2019-04-29 14:55     ` Enrico Weigelt, metux IT consult
2019-04-29 15:39       ` Andy Shevchenko
2019-04-27 12:52 ` [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation Enrico Weigelt, metux IT consult
2019-04-27 13:03   ` John Paul Adrian Glaubitz
2019-04-29 15:58     ` Enrico Weigelt, metux IT consult
2019-04-28 15:21   ` Andy Shevchenko
2019-04-29  6:48     ` Enrico Weigelt, metux IT consult
2019-04-29 13:19       ` Andy Shevchenko
2019-04-27 12:52 ` [PATCH 38/41] drivers: tty: serial: xilinx_uartps: fill mapsize and use it Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 39/41] drivers: tty: serial: pmac_zilog: " Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 40/41] drivers: tty: serial: helper for setting mmio range Enrico Weigelt, metux IT consult
2019-04-28 15:39   ` Andy Shevchenko
2019-04-29 10:12     ` Enrico Weigelt, metux IT consult
2019-04-29 13:28       ` Andy Shevchenko
2019-04-29  6:57   ` Esben Haabendal
2019-04-29  7:03   ` Esben Haabendal
2019-04-29  9:43     ` Enrico Weigelt, metux IT consult
2019-04-27 12:52 ` [PATCH 41/41] drivers: tty: serial: lpc32xx_hs: fill mapsize and use it Enrico Weigelt, metux IT consult
2019-04-30 20:52   ` Vladimir Zapolskiy
2019-04-29 16:16 ` serial drivers polishing Christophe Leroy
2019-04-29 16:50   ` Enrico Weigelt, metux IT consult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1556369542-13247-32-git-send-email-info@metux.net \
    --to=info@metux.net \
    --cc=andrew@aj.id.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=macro@linux-mips.org \
    --cc=matthias.bgg@gmail.com \
    --cc=slemieux.tyco@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).