[PATCH 1/2] serial: sh-sci: HSCIF support
Arnd Bergmann
arnd at arndb.de
Mon Jun 17 08:54:48 EDT 2013
On Monday 17 June 2013, Simon Horman wrote:
> - if (likely(baud && port->uartclk))
> - t = sci_scbrr_calc(s->cfg->scbrr_algo_id, baud, port->uartclk);
> + if (likely(baud && port->uartclk)) {
> + if (s->cfg->scbrr_algo_id == SCBRR_ALGO_6) {
> + sci_baud_calc_hscif(baud, port->uartclk, &t, &srr,
> + &cks);
> + } else {
> + t = sci_scbrr_calc(s->cfg->scbrr_algo_id, baud,
> + port->uartclk);
> + for (cks = 0; t >= 256 && cks <= 3; cks++)
> + t >>= 2;
> + }
> + }
This hunk causes build warnings in linux-next now:
/git/arm-soc/drivers/tty/serial/sh-sci.c: In function 'sci_set_termios':
/git/arm-soc/drivers/tty/serial/sh-sci.c:1942:37: warning: 'srr' may be used uninitialized in this function [-Wmaybe-uninitialized]
serial_port_out(port, HSSRR, srr | HSCIF_SRE);
^
/git/arm-soc/drivers/tty/serial/sh-sci.c:1892:15: note: 'srr' was declared here
unsigned int srr;
^
/git/arm-soc/drivers/tty/serial/sh-sci.c:1938:47: warning: 'cks' may be used uninitialized in this function [-Wmaybe-uninitialized]
serial_port_out(port, SCSMR, (smr_val & ~3) | cks);
^
/git/arm-soc/drivers/tty/serial/sh-sci.c:1890:40: note: 'cks' was declared here
unsigned int baud, smr_val, max_baud, cks;
^
Arnd
More information about the linux-arm-kernel
mailing list