* [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*()
@ 2014-03-11 10:11 Geert Uytterhoeven
2014-03-11 10:11 ` [PATCH 2/4] serial: sh-sci: Remove useless casts Geert Uytterhoeven
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2014-03-11 10:11 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Simon Horman, Laurent Pinchart, linux-serial, linux-sh,
linux-kernel, Geert Uytterhoeven
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Make banner const while we're at it
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
drivers/tty/serial/sh-sci.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7958115e6a51..24ec6ef67984 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -428,7 +428,7 @@ static int sci_probe_regmap(struct plat_sci_port *cfg)
cfg->regtype = SCIx_HSCIF_REGTYPE;
break;
default:
- printk(KERN_ERR "Can't probe register map for given port\n");
+ pr_err("Can't probe register map for given port\n");
return -EINVAL;
}
@@ -2389,8 +2389,7 @@ static inline int sci_probe_earlyprintk(struct platform_device *pdev)
#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
-static char banner[] __initdata =
- KERN_INFO "SuperH (H)SCI(F) driver initialized\n";
+static const char banner[] __initconst = "SuperH (H)SCI(F) driver initialized";
static struct uart_driver sci_uart_driver = {
.owner = THIS_MODULE,
@@ -2616,7 +2615,7 @@ static int __init sci_init(void)
{
int ret;
- printk(banner);
+ pr_info("%s\n", banner);
ret = uart_register_driver(&sci_uart_driver);
if (likely(ret == 0)) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/4] serial: sh-sci: Remove useless casts 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven @ 2014-03-11 10:11 ` Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 3/4] serial: sh-sci: Add more register documentation Geert Uytterhoeven ` (3 subsequent siblings) 4 siblings, 0 replies; 10+ messages in thread From: Geert Uytterhoeven @ 2014-03-11 10:11 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Simon Horman, Laurent Pinchart, linux-serial, linux-sh, linux-kernel, Geert Uytterhoeven From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> --- drivers/tty/serial/sh-sci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 24ec6ef67984..4529dbca2287 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2423,25 +2423,25 @@ struct sci_port_info { static const struct of_device_id of_sci_match[] = { { .compatible = "renesas,scif", - .data = (void *)&(const struct sci_port_info) { + .data = &(const struct sci_port_info) { .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_REGTYPE, }, }, { .compatible = "renesas,scifa", - .data = (void *)&(const struct sci_port_info) { + .data = &(const struct sci_port_info) { .type = PORT_SCIFA, .regtype = SCIx_SCIFA_REGTYPE, }, }, { .compatible = "renesas,scifb", - .data = (void *)&(const struct sci_port_info) { + .data = &(const struct sci_port_info) { .type = PORT_SCIFB, .regtype = SCIx_SCIFB_REGTYPE, }, }, { .compatible = "renesas,hscif", - .data = (void *)&(const struct sci_port_info) { + .data = &(const struct sci_port_info) { .type = PORT_HSCIF, .regtype = SCIx_HSCIF_REGTYPE, }, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] serial: sh-sci: Add more register documentation 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 2/4] serial: sh-sci: Remove useless casts Geert Uytterhoeven @ 2014-03-11 10:11 ` Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 4/4] serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF Geert Uytterhoeven ` (2 subsequent siblings) 4 siblings, 0 replies; 10+ messages in thread From: Geert Uytterhoeven @ 2014-03-11 10:11 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Simon Horman, Laurent Pinchart, linux-serial, linux-sh, linux-kernel, Geert Uytterhoeven From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> --- drivers/tty/serial/sh-sci.c | 28 +++++++------ include/linux/serial_sci.h | 93 +++++++++++++++++++++++++++---------------- 2 files changed, 73 insertions(+), 48 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 4529dbca2287..e0c7db0027b7 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -911,7 +911,7 @@ static irqreturn_t sci_rx_interrupt(int irq, void *ptr) /* Disable future Rx interrupts */ if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) { disable_irq_nosync(irq); - scr |= 0x4000; + scr |= SCSCR_RDRQE; } else { scr &= ~SCSCR_RIE; } @@ -1200,7 +1200,9 @@ static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl) */ reg = sci_getreg(port, SCFCR); if (reg->size) - serial_port_out(port, SCFCR, serial_port_in(port, SCFCR) | 1); + serial_port_out(port, SCFCR, + serial_port_in(port, SCFCR) | + SCFCR_LOOP); } } @@ -1496,9 +1498,9 @@ static void sci_start_tx(struct uart_port *port) if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) { u16 new, scr = serial_port_in(port, SCSCR); if (s->chan_tx) - new = scr | 0x8000; + new = scr | SCSCR_TDRQE; else - new = scr & ~0x8000; + new = scr & ~SCSCR_TDRQE; if (new != scr) serial_port_out(port, SCSCR, new); } @@ -1525,7 +1527,7 @@ static void sci_stop_tx(struct uart_port *port) ctrl = serial_port_in(port, SCSCR); if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) - ctrl &= ~0x8000; + ctrl &= ~SCSCR_TDRQE; ctrl &= ~SCSCR_TIE; @@ -1539,7 +1541,7 @@ static void sci_start_rx(struct uart_port *port) ctrl = serial_port_in(port, SCSCR) | port_rx_irq_mask(port); if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) - ctrl &= ~0x4000; + ctrl &= ~SCSCR_RDRQE; serial_port_out(port, SCSCR, ctrl); } @@ -1551,7 +1553,7 @@ static void sci_stop_rx(struct uart_port *port) ctrl = serial_port_in(port, SCSCR); if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) - ctrl &= ~0x4000; + ctrl &= ~SCSCR_RDRQE; ctrl &= ~port_rx_irq_mask(port); @@ -1614,7 +1616,7 @@ static void rx_timer_fn(unsigned long arg) u16 scr = serial_port_in(port, SCSCR); if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) { - scr &= ~0x4000; + scr &= ~SCSCR_RDRQE; enable_irq(s->irqs[SCIx_RXI_IRQ]); } serial_port_out(port, SCSCR, scr | SCSCR_RIE); @@ -1871,13 +1873,13 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, smr_val = serial_port_in(port, SCSMR) & 3; if ((termios->c_cflag & CSIZE) == CS7) - smr_val |= 0x40; + smr_val |= SCSMR_CHR; if (termios->c_cflag & PARENB) - smr_val |= 0x20; + smr_val |= SCSMR_PE; if (termios->c_cflag & PARODD) - smr_val |= 0x30; + smr_val |= SCSMR_PE | SCSMR_ODD; if (termios->c_cflag & CSTOPB) - smr_val |= 0x08; + smr_val |= SCSMR_STOP; uart_update_timeout(port, termios->c_cflag, baud); @@ -1885,7 +1887,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, __func__, smr_val, cks, t, s->cfg->scscr); if (t >= 0) { - serial_port_out(port, SCSMR, (smr_val & ~3) | cks); + serial_port_out(port, SCSMR, (smr_val & ~SCSMR_CKS) | cks); serial_port_out(port, SCBRR, t); reg = sci_getreg(port, HSSRR); if (reg->size) diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 22b3640c9424..6c5e3bb282b0 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -10,45 +10,59 @@ #define SCIx_NOT_SUPPORTED (-1) -#define SCSCR_TIE (1 << 7) -#define SCSCR_RIE (1 << 6) -#define SCSCR_TE (1 << 5) -#define SCSCR_RE (1 << 4) -#define SCSCR_REIE (1 << 3) /* not supported by all parts */ -#define SCSCR_TOIE (1 << 2) /* not supported by all parts */ -#define SCSCR_CKE1 (1 << 1) -#define SCSCR_CKE0 (1 << 0) - -/* SCxSR SCI */ -#define SCI_TDRE 0x80 -#define SCI_RDRF 0x40 -#define SCI_ORER 0x20 -#define SCI_FER 0x10 -#define SCI_PER 0x08 -#define SCI_TEND 0x04 +/* SCSMR (Serial Mode Register) */ +#define SCSMR_CHR (1 << 6) /* 7-bit Character Length */ +#define SCSMR_PE (1 << 5) /* Parity Enable */ +#define SCSMR_ODD (1 << 4) /* Odd Parity */ +#define SCSMR_STOP (1 << 3) /* Stop Bit Length */ +#define SCSMR_CKS 0x0003 /* Clock Select */ + +/* Serial Control Register (@ = not supported by all parts) */ +#define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */ +#define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */ +#define SCSCR_TE (1 << 5) /* Transmit Enable */ +#define SCSCR_RE (1 << 4) /* Receive Enable */ +#define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */ +#define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */ +#define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */ +#define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */ +/* SCIFA/SCIFB only */ +#define SCSCR_TDRQE (1 << 15) /* Tx Data Transfer Request Enable */ +#define SCSCR_RDRQE (1 << 14) /* Rx Data Transfer Request Enable */ + +/* SCxSR (Serial Status Register) on SCI */ +#define SCI_TDRE 0x80 /* Transmit Data Register Empty */ +#define SCI_RDRF 0x40 /* Receive Data Register Full */ +#define SCI_ORER 0x20 /* Overrun Error */ +#define SCI_FER 0x10 /* Framing Error */ +#define SCI_PER 0x08 /* Parity Error */ +#define SCI_TEND 0x04 /* Transmit End */ #define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER) -/* SCxSR SCIF, HSCIF */ -#define SCIF_ER 0x0080 -#define SCIF_TEND 0x0040 -#define SCIF_TDFE 0x0020 -#define SCIF_BRK 0x0010 -#define SCIF_FER 0x0008 -#define SCIF_PER 0x0004 -#define SCIF_RDF 0x0002 -#define SCIF_DR 0x0001 +/* SCxSR (Serial Status Register) on SCIF, HSCIF */ +#define SCIF_ER 0x0080 /* Receive Error */ +#define SCIF_TEND 0x0040 /* Transmission End */ +#define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */ +#define SCIF_BRK 0x0010 /* Break Detect */ +#define SCIF_FER 0x0008 /* Framing Error */ +#define SCIF_PER 0x0004 /* Parity Error */ +#define SCIF_RDF 0x0002 /* Receive FIFO Data Full */ +#define SCIF_DR 0x0001 /* Receive Data Ready */ #define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) -/* SCSPTR, optional */ -#define SCSPTR_RTSIO (1 << 7) -#define SCSPTR_CTSIO (1 << 5) -#define SCSPTR_SPB2IO (1 << 1) -#define SCSPTR_SPB2DT (1 << 0) +/* SCFCR (FIFO Control Register) */ +#define SCFCR_LOOP (1 << 0) /* Loopback Test */ + +/* SCSPTR (Serial Port Register), optional */ +#define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */ +#define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */ +#define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */ +#define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */ /* HSSRR HSCIF */ -#define HSCIF_SRE 0x8000 +#define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */ enum { SCIx_PROBE_REGTYPE, @@ -73,10 +87,19 @@ enum { * Not all registers will exist on all parts. */ enum { - SCSMR, SCBRR, SCSCR, SCxSR, - SCFCR, SCFDR, SCxTDR, SCxRDR, - SCLSR, SCTFDR, SCRFDR, SCSPTR, - HSSRR, + SCSMR, /* Serial Mode Register */ + SCBRR, /* Bit Rate Register */ + SCSCR, /* Serial Control Register */ + SCxSR, /* Serial Status Register */ + SCFCR, /* FIFO Control Register */ + SCFDR, /* FIFO Data Count Register */ + SCxTDR, /* Transmit (FIFO) Data Register */ + SCxRDR, /* Receive (FIFO) Data Register */ + SCLSR, /* Line Status Register */ + SCTFDR, /* Transmit FIFO Data Count Register */ + SCRFDR, /* Receive FIFO Data Count Register */ + SCSPTR, /* Serial Port Register */ + HSSRR, /* Sampling Rate Register */ SCIx_NR_REGS, }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 2/4] serial: sh-sci: Remove useless casts Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 3/4] serial: sh-sci: Add more register documentation Geert Uytterhoeven @ 2014-03-11 10:11 ` Geert Uytterhoeven 2014-03-11 10:30 ` [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Laurent Pinchart 2014-03-11 14:27 ` Joe Perches 4 siblings, 0 replies; 10+ messages in thread From: Geert Uytterhoeven @ 2014-03-11 10:11 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Simon Horman, Laurent Pinchart, linux-serial, linux-sh, linux-kernel, Geert Uytterhoeven From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> --- drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e0c7db0027b7..cceaaee2b585 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1955,7 +1955,7 @@ static void sci_pm(struct uart_port *port, unsigned int state, struct sci_port *sci_port = to_sci_port(port); switch (state) { - case 3: + case UART_PM_STATE_OFF: sci_port_disable(sci_port); break; default: -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven ` (2 preceding siblings ...) 2014-03-11 10:11 ` [PATCH 4/4] serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF Geert Uytterhoeven @ 2014-03-11 10:30 ` Laurent Pinchart 2014-03-13 1:47 ` Simon Horman 2014-03-11 14:27 ` Joe Perches 4 siblings, 1 reply; 10+ messages in thread From: Laurent Pinchart @ 2014-03-11 10:30 UTC (permalink / raw) To: Geert Uytterhoeven, linux-serial Cc: Greg Kroah-Hartman, Simon Horman, linux-sh, linux-kernel, Geert Uytterhoeven Hi Geert, Thank you for the patches. I had patches similar to 3/4 and 4/4 in my tree, that's a sign you're going in the right direction (or at least the direction I consider to be right :-)). For the whole series, Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> On Tuesday 11 March 2014 11:11:17 Geert Uytterhoeven wrote: > From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > > Make banner const while we're at it > > Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > --- > drivers/tty/serial/sh-sci.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c > index 7958115e6a51..24ec6ef67984 100644 > --- a/drivers/tty/serial/sh-sci.c > +++ b/drivers/tty/serial/sh-sci.c > @@ -428,7 +428,7 @@ static int sci_probe_regmap(struct plat_sci_port *cfg) > cfg->regtype = SCIx_HSCIF_REGTYPE; > break; > default: > - printk(KERN_ERR "Can't probe register map for given port\n"); > + pr_err("Can't probe register map for given port\n"); > return -EINVAL; > } > > @@ -2389,8 +2389,7 @@ static inline int sci_probe_earlyprintk(struct > platform_device *pdev) > > #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ > > -static char banner[] __initdata = > - KERN_INFO "SuperH (H)SCI(F) driver initialized\n"; > +static const char banner[] __initconst = "SuperH (H)SCI(F) driver > initialized"; > > static struct uart_driver sci_uart_driver = { > .owner = THIS_MODULE, > @@ -2616,7 +2615,7 @@ static int __init sci_init(void) > { > int ret; > > - printk(banner); > + pr_info("%s\n", banner); > > ret = uart_register_driver(&sci_uart_driver); > if (likely(ret == 0)) { -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() 2014-03-11 10:30 ` [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Laurent Pinchart @ 2014-03-13 1:47 ` Simon Horman 0 siblings, 0 replies; 10+ messages in thread From: Simon Horman @ 2014-03-13 1:47 UTC (permalink / raw) To: Laurent Pinchart Cc: Geert Uytterhoeven, linux-serial, Greg Kroah-Hartman, linux-sh, linux-kernel, Geert Uytterhoeven On Tue, Mar 11, 2014 at 11:30:52AM +0100, Laurent Pinchart wrote: > Hi Geert, > > Thank you for the patches. > > I had patches similar to 3/4 and 4/4 in my tree, that's a sign you're going in > the right direction (or at least the direction I consider to be right :-)). > For the whole series, > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Simon Horman <horms@verge.net.au> Greg, could you pick up this series? > On Tuesday 11 March 2014 11:11:17 Geert Uytterhoeven wrote: > > From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > > > > Make banner const while we're at it > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > > --- > > drivers/tty/serial/sh-sci.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c > > index 7958115e6a51..24ec6ef67984 100644 > > --- a/drivers/tty/serial/sh-sci.c > > +++ b/drivers/tty/serial/sh-sci.c > > @@ -428,7 +428,7 @@ static int sci_probe_regmap(struct plat_sci_port *cfg) > > cfg->regtype = SCIx_HSCIF_REGTYPE; > > break; > > default: > > - printk(KERN_ERR "Can't probe register map for given port\n"); > > + pr_err("Can't probe register map for given port\n"); > > return -EINVAL; > > } > > > > @@ -2389,8 +2389,7 @@ static inline int sci_probe_earlyprintk(struct > > platform_device *pdev) > > > > #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ > > > > -static char banner[] __initdata = > > - KERN_INFO "SuperH (H)SCI(F) driver initialized\n"; > > +static const char banner[] __initconst = "SuperH (H)SCI(F) driver > > initialized"; > > > > static struct uart_driver sci_uart_driver = { > > .owner = THIS_MODULE, > > @@ -2616,7 +2615,7 @@ static int __init sci_init(void) > > { > > int ret; > > > > - printk(banner); > > + pr_info("%s\n", banner); > > > > ret = uart_register_driver(&sci_uart_driver); > > if (likely(ret == 0)) { > > -- > Regards, > > Laurent Pinchart > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven ` (3 preceding siblings ...) 2014-03-11 10:30 ` [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Laurent Pinchart @ 2014-03-11 14:27 ` Joe Perches 2014-03-11 17:10 ` [PATCH] serial: sh-sci: Neaten dev_<level> uses Joe Perches 4 siblings, 1 reply; 10+ messages in thread From: Joe Perches @ 2014-03-11 14:27 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Greg Kroah-Hartman, Simon Horman, Laurent Pinchart, linux-serial, linux-sh, linux-kernel, Geert Uytterhoeven On Tue, 2014-03-11 at 11:11 +0100, Geert Uytterhoeven wrote: > From: Geert Uytterhoeven <geert+renesas@linux-m68k.org> > > Make banner const while we're at it One thing to consider is to add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt before any #include to make sure all messages are appropriately prefixed by subsystem name. One day, I'd very much like to avoid this by making it the default. http://comments.gmane.org/gmane.linux.kernel/1052288 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] serial: sh-sci: Neaten dev_<level> uses 2014-03-11 14:27 ` Joe Perches @ 2014-03-11 17:10 ` Joe Perches 2014-03-12 18:55 ` Geert Uytterhoeven 0 siblings, 1 reply; 10+ messages in thread From: Joe Perches @ 2014-03-11 17:10 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Greg Kroah-Hartman, Simon Horman, Laurent Pinchart, linux-serial, linux-sh, linux-kernel, Geert Uytterhoeven Add missing newlines and coalesce formats. Realign arguments. Signed-off-by: Joe Perches <joe@perches.com> --- drivers/tty/serial/sh-sci.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 0cb5237..eee159c 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -788,7 +788,7 @@ static int sci_handle_errors(struct uart_port *port) if (tty_insert_flip_char(tport, 0, TTY_OVERRUN)) copied++; - dev_notice(port->dev, "overrun error"); + dev_notice(port->dev, "overrun error\n"); } if (status & SCxSR_FER(port)) { @@ -830,7 +830,7 @@ static int sci_handle_errors(struct uart_port *port) if (tty_insert_flip_char(tport, 0, TTY_PARITY)) copied++; - dev_notice(port->dev, "parity error"); + dev_notice(port->dev, "parity error\n"); } if (copied) @@ -1290,7 +1290,8 @@ static void sci_dma_rx_complete(void *arg) unsigned long flags; int count; - dev_dbg(port->dev, "%s(%d) active #%d\n", __func__, port->line, s->active_rx); + dev_dbg(port->dev, "%s(%d) active #%d\n", + __func__, port->line, s->active_rx); spin_lock_irqsave(&port->lock, flags); @@ -1366,8 +1367,8 @@ static void sci_submit_rx(struct sci_port *s) sci_rx_dma_release(s, true); return; } - dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n", __func__, - s->cookie_rx[i], i); + dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n", + __func__, s->cookie_rx[i], i); } s->active_rx = s->cookie_rx[0]; @@ -1426,8 +1427,8 @@ static void work_fn_rx(struct work_struct *work) s->active_rx = s->cookie_rx[!new]; - dev_dbg(port->dev, "%s: cookie %d #%d, new active #%d\n", __func__, - s->cookie_rx[new], new, s->active_rx); + dev_dbg(port->dev, "%s: cookie %d #%d, new active #%d\n", + __func__, s->cookie_rx[new], new, s->active_rx); } static void work_fn_tx(struct work_struct *work) @@ -1480,8 +1481,8 @@ static void work_fn_tx(struct work_struct *work) return; } - dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n", __func__, - xmit->buf, xmit->tail, xmit->head, s->cookie_tx); + dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n", + __func__, xmit->buf, xmit->tail, xmit->head, s->cookie_tx); dma_async_issue_pending(chan); } @@ -1600,8 +1601,8 @@ static bool filter(struct dma_chan *chan, void *slave) { struct sh_dmae_slave *param = slave; - dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__, - param->shdma_slave.slave_id); + dev_dbg(chan->device->dev, "%s: slave ID %d\n", + __func__, param->shdma_slave.slave_id); chan->private = ¶m->shdma_slave; return true; @@ -1630,8 +1631,7 @@ static void sci_request_dma(struct uart_port *port) dma_cap_mask_t mask; int nent; - dev_dbg(port->dev, "%s: port %d\n", __func__, - port->line); + dev_dbg(port->dev, "%s: port %d\n", __func__, port->line); if (s->cfg->dma_slave_tx <= 0 || s->cfg->dma_slave_rx <= 0) return; @@ -1659,7 +1659,8 @@ static void sci_request_dma(struct uart_port *port) if (!nent) sci_tx_dma_release(s, false); else - dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n", __func__, + dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n", + __func__, sg_dma_len(&s->sg_tx), port->state->xmit.buf, &sg_dma_address(&s->sg_tx)); @@ -1933,8 +1934,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, if (s->chan_rx) { s->rx_timeout = (port->timeout - HZ / 50) * s->buf_len_rx * 3 / port->fifosize / 2; - dev_dbg(port->dev, - "DMA Rx t-out %ums, tty t-out %u jiffies\n", + dev_dbg(port->dev, "DMA Rx t-out %ums, tty t-out %u jiffies\n", s->rx_timeout * 1000 / HZ, port->timeout); if (s->rx_timeout < msecs_to_jiffies(20)) s->rx_timeout = msecs_to_jiffies(20); @@ -2502,11 +2502,9 @@ static int sci_probe_single(struct platform_device *dev, /* Sanity check */ if (unlikely(index >= SCI_NPORTS)) { - dev_notice(&dev->dev, "Attempting to register port " - "%d when only %d are available.\n", + dev_notice(&dev->dev, "Attempting to register port %d when only %d are available\n", index+1, SCI_NPORTS); - dev_notice(&dev->dev, "Consider bumping " - "CONFIG_SERIAL_SH_SCI_NR_UARTS!\n"); + dev_notice(&dev->dev, "Consider bumping CONFIG_SERIAL_SH_SCI_NR_UARTS!\n"); return -EINVAL; } ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] serial: sh-sci: Neaten dev_<level> uses 2014-03-11 17:10 ` [PATCH] serial: sh-sci: Neaten dev_<level> uses Joe Perches @ 2014-03-12 18:55 ` Geert Uytterhoeven 2014-03-13 1:48 ` Simon Horman 0 siblings, 1 reply; 10+ messages in thread From: Geert Uytterhoeven @ 2014-03-12 18:55 UTC (permalink / raw) To: Joe Perches Cc: Greg Kroah-Hartman, Simon Horman, Laurent Pinchart, linux-serial, Linux-sh list, linux-kernel@vger.kernel.org, Geert Uytterhoeven Hi Joe, On Tue, Mar 11, 2014 at 6:10 PM, Joe Perches <joe@perches.com> wrote: > Add missing newlines and coalesce formats. > Realign arguments. Thanks! > Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] serial: sh-sci: Neaten dev_<level> uses 2014-03-12 18:55 ` Geert Uytterhoeven @ 2014-03-13 1:48 ` Simon Horman 0 siblings, 0 replies; 10+ messages in thread From: Simon Horman @ 2014-03-13 1:48 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Joe Perches, Greg Kroah-Hartman, Laurent Pinchart, linux-serial, Linux-sh list, linux-kernel@vger.kernel.org, Geert Uytterhoeven On Wed, Mar 12, 2014 at 07:55:50PM +0100, Geert Uytterhoeven wrote: > Hi Joe, > > On Tue, Mar 11, 2014 at 6:10 PM, Joe Perches <joe@perches.com> wrote: > > Add missing newlines and coalesce formats. > > Realign arguments. > > Thanks! > > > Signed-off-by: Joe Perches <joe@perches.com> > > Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Greg, could you pick up this one too? ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-03-13 1:48 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-11 10:11 [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 2/4] serial: sh-sci: Remove useless casts Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 3/4] serial: sh-sci: Add more register documentation Geert Uytterhoeven 2014-03-11 10:11 ` [PATCH 4/4] serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF Geert Uytterhoeven 2014-03-11 10:30 ` [PATCH 1/4] serial: sh-sci: Replace printk() by pr_*() Laurent Pinchart 2014-03-13 1:47 ` Simon Horman 2014-03-11 14:27 ` Joe Perches 2014-03-11 17:10 ` [PATCH] serial: sh-sci: Neaten dev_<level> uses Joe Perches 2014-03-12 18:55 ` Geert Uytterhoeven 2014-03-13 1:48 ` Simon Horman
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).