[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241025082128.60034-1-412574090@163.com>
Date: Fri, 25 Oct 2024 16:21:25 +0800
From: 412574090@....com
To: sudipm.mukherjee@...il.com
Cc: linux-kernel@...r.kernel.org,
xiongxin@...inos.cn,
weiyufeng <weiyufeng@...inos.cn>
Subject: [PATCH 1/4] parport: use standard kernel printing functions
From: weiyufeng <weiyufeng@...inos.cn>
change printk to standard kernel printing functions.
Signed-off-by: weiyufeng <weiyufeng@...inos.cn>
---
drivers/net/hamradio/baycom_epp.c | 8 ++++----
drivers/net/hamradio/baycom_par.c | 6 +++---
drivers/parport/parport_pc.c | 12 ++++++------
drivers/parport/procfs.c | 2 +-
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 9e366f275406..1b7fd6d49a96 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -828,13 +828,13 @@ static int epp_open(struct net_device *dev)
}
#if 0
if (pp->irq < 0) {
- printk(KERN_ERR "%s: parport at 0x%lx has no irq\n", bc_drvname, pp->base);
+ pr_err("%s: parport at 0x%lx has no irq\n", bc_drvname, pp->base);
parport_put_port(pp);
return -ENXIO;
}
#endif
if ((~pp->modes) & (PARPORT_MODE_TRISTATE | PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT)) {
- printk(KERN_ERR "%s: parport at 0x%lx cannot be used\n",
+ pr_err("%s: parport at 0x%lx cannot be used\n",
bc_drvname, pp->base);
parport_put_port(pp);
return -EIO;
@@ -857,11 +857,11 @@ static int epp_open(struct net_device *dev)
bc->pdev = parport_register_dev_model(pp, dev->name, &par_cb, i);
parport_put_port(pp);
if (!bc->pdev) {
- printk(KERN_ERR "%s: cannot register parport at 0x%lx\n", bc_drvname, pp->base);
+ pr_err("%s: cannot register parport at 0x%lx\n", bc_drvname, pp->base);
return -ENXIO;
}
if (parport_claim(bc->pdev)) {
- printk(KERN_ERR "%s: parport at 0x%lx busy\n", bc_drvname, pp->base);
+ pr_err("%s: parport at 0x%lx busy\n", bc_drvname, pp->base);
parport_unregister_device(bc->pdev);
return -EBUSY;
}
diff --git a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
index 00ebc25d0b22..4b57874c2463 100644
--- a/drivers/net/hamradio/baycom_par.c
+++ b/drivers/net/hamradio/baycom_par.c
@@ -307,12 +307,12 @@ static int par96_open(struct net_device *dev)
return -ENXIO;
}
if (pp->irq < 0) {
- printk(KERN_ERR "baycom_par: parport at 0x%lx has no irq\n", pp->base);
+ pr_err("baycom_par: parport at 0x%lx has no irq\n", pp->base);
parport_put_port(pp);
return -ENXIO;
}
if ((~pp->modes) & (PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT)) {
- printk(KERN_ERR "baycom_par: parport at 0x%lx cannot be used\n", pp->base);
+ pr_err("baycom_par: parport at 0x%lx cannot be used\n", pp->base);
parport_put_port(pp);
return -ENXIO;
}
@@ -339,7 +339,7 @@ static int par96_open(struct net_device *dev)
return -ENXIO;
}
if (parport_claim(bc->pdev)) {
- printk(KERN_ERR "baycom_par: parport at 0x%lx busy\n", pp->base);
+ pr_err("baycom_par: parport at 0x%lx busy\n", pp->base);
parport_unregister_device(bc->pdev);
return -EBUSY;
}
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index f33b5d1ddfc1..609c10d4bc31 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -1609,7 +1609,7 @@ static int parport_ECP_supported(struct parport *pb)
priv->fifo_depth = i;
if (verbose_probing)
- printk(KERN_DEBUG "0x%lx: FIFO is %d bytes\n", pb->base, i);
+ pr_debug("0x%lx: FIFO is %d bytes\n", pb->base, i);
/* Find out writeIntrThreshold */
frob_econtrol(pb, 1<<2, 1<<2);
@@ -1623,7 +1623,7 @@ static int parport_ECP_supported(struct parport *pb)
if (i <= priv->fifo_depth) {
if (verbose_probing)
- printk(KERN_DEBUG "0x%lx: writeIntrThreshold is %d\n",
+ pr_debug("0x%lx: writeIntrThreshold is %d\n",
pb->base, i);
} else
/* Number of bytes we know we can write if we get an
@@ -1676,16 +1676,16 @@ static int parport_ECP_supported(struct parport *pb)
priv->pword = pword;
if (verbose_probing) {
- printk(KERN_DEBUG "0x%lx: PWord is %d bits\n",
+ pr_debug("0x%lx: PWord is %d bits\n",
pb->base, 8 * pword);
- printk(KERN_DEBUG "0x%lx: Interrupts are ISA-%s\n",
+ pr_debug("0x%lx: Interrupts are ISA-%s\n",
pb->base, config & 0x80 ? "Level" : "Pulses");
configb = inb(CONFIGB(pb));
- printk(KERN_DEBUG "0x%lx: ECP port cfgA=0x%02x cfgB=0x%02x\n",
+ pr_debug("0x%lx: ECP port cfgA=0x%02x cfgB=0x%02x\n",
pb->base, config, configb);
- printk(KERN_DEBUG "0x%lx: ECP settings irq=", pb->base);
+ pr_debug("0x%lx: ECP settings irq=", pb->base);
if ((configb >> 3) & 0x07)
pr_cont("%d", intrline[(configb >> 3) & 0x07]);
else
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 3880460e67f2..3f809fff317b 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -128,7 +128,7 @@ static int do_hardware_base_addr(const struct ctl_table *table, int write,
if (write) /* permissions prevent this anyway */
return -EACCES;
- len += scnprintf (buffer, sizeof(buffer), "%lu\t%lu\n", port->base, port->base_hi);
+ len += scnprintf(buffer, sizeof(buffer), "%lu\t%lu\n", port->base, port->base_hi);
if (len > *lenp)
len = *lenp;
--
2.25.1
Powered by blists - more mailing lists