[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140415111033.102bc5af@alan.etchedpixels.co.uk>
Date: Tue, 15 Apr 2014 11:10:33 +0100
From: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Stephen Warren <swarren@...dia.com>,
Jingoo Han <jg1.han@...sung.com>, linux-kernel@...r.kernel.org,
Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
linux-serial@...r.kernel.org, yrl.pp-manager.tt@...achi.com,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Aaron Sierra <asierra@...-inc.com>, Jiri Slaby <jslaby@...e.cz>
Subject: Re: [PATCH V5.1] serial/uart/8250: Add tunable RX interrupt trigger
I/F of FIFO buffers
> +static int convert_val2rxtrig(struct uart_8250_port *up, unsigned char val)
> +{
> + const struct serial8250_config *conf_type = &uart_config[up->port.type];
> + int i;
> +
> + if (!conf_type->rx_trig_byte[FCR_RX_TRIG_BITS(UART_FCR_R_TRIG_00)]) {
> + pr_info("Not support RX-trigger setting for this serial %s\n",
> + conf_type->name);
> + return -EOPNOTSUPP;
We don't want the pr_info here - otherwise users can flood the logs. The
err code is sufficient.
> + for (i = 1; i < FCR_RX_TRIG_MAX_STATE; i++) {
> + if (val < conf_type->rx_trig_byte[i])
> + /* Use the nearest lower value */
> + return (--i) << FCR_RX_TRIG_OFFSET;
Odd case here - your 16654 entry has a minimum of 8 so if I pass 1 then
it'll return -1 ? I guess for that case the best we can do is to set 8.
Other trivial thing to tweak - you have "uaser" in spot instead of "user".
With those two fixed it looks good to me.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists