mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Stephen Warren <swarren@nvidia.com>,
	Jingoo Han <jg1.han@samsung.com>,
	linux-kernel@vger.kernel.org,
	Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	linux-serial@vger.kernel.org, yrl.pp-manager.tt@hitachi.com,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Aaron Sierra <asierra@xes-inc.com>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH V5.1] serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers
Date: Tue, 15 Apr 2014 11:10:33 +0100	[thread overview]
Message-ID: <20140415111033.102bc5af@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <20140415080649.19209.60645.stgit@yunodevel>


> +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

  reply	other threads:[~2014-04-15 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  5:52 [PATCH V5] " Yoshihiro YUNOMAE
2014-04-15  8:06 ` [PATCH V5.1] " Yoshihiro YUNOMAE
2014-04-15 10:10   ` One Thousand Gnomes [this message]
2014-04-16  1:06     ` Yoshihiro YUNOMAE
2014-04-15 17:39   ` Stephen Warren
2014-04-16  2:08     ` Yoshihiro YUNOMAE
2014-04-16 17:04       ` Stephen Warren
2014-04-17  2:38         ` Yoshihiro YUNOMAE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140415111033.102bc5af@alan.etchedpixels.co.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=asierra@xes-inc.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=jg1.han@samsung.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=swarren@nvidia.com \
    --cc=yoshihiro.yunomae.ez@hitachi.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®