Skip to content

Commit 53b4817

Browse files
committed
drivers: tty: serial: cpm_uart: fix logging calls
Fix checkpatch warnings by using pr_err(): WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:109: + printk(KERN_ERR WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... torvalds#128: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:128: + printk(KERN_ERR WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... + printk(KERN_ERR WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... + printk(KERN_ERR Signed-off-by: Enrico Weigelt <[email protected]>
1 parent eeddfb2 commit 53b4817

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
7171
dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
7272
dp_offset = cpm_dpalloc(dpmemsz, 8);
7373
if (IS_ERR_VALUE(dp_offset)) {
74-
printk(KERN_ERR
75-
"cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
74+
pr_err("cpm_uart_cpm1.c: could not allocate buffer descriptors\n");
7675
return -ENOMEM;
7776
}
7877
dp_mem = cpm_dpram_addr(dp_offset);
@@ -90,8 +89,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
9089

9190
if (mem_addr == NULL) {
9291
cpm_dpfree(dp_offset);
93-
printk(KERN_ERR
94-
"cpm_uart_cpm1.c: could not allocate coherent memory\n");
92+
pr_err("cpm_uart_cpm1.c: could not allocate coherent memory\n");
9593
return -ENOMEM;
9694
}
9795

drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
106106
dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos);
107107
dp_offset = cpm_dpalloc(dpmemsz, 8);
108108
if (IS_ERR_VALUE(dp_offset)) {
109-
printk(KERN_ERR
110-
"cpm_uart_cpm.c: could not allocate buffer descriptors\n");
109+
pr_err("cpm_uart_cpm.c: could not allocate buffer descriptors\n");
111110
return -ENOMEM;
112111
}
113112

@@ -125,8 +124,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
125124

126125
if (mem_addr == NULL) {
127126
cpm_dpfree(dp_offset);
128-
printk(KERN_ERR
129-
"cpm_uart_cpm.c: could not allocate coherent memory\n");
127+
pr_err("cpm_uart_cpm.c: could not allocate coherent memory\n");
130128
return -ENOMEM;
131129
}
132130

0 commit comments

Comments
 (0)