All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Joe Perches <joe@perches.com>
Cc: Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	kernel@pengutronix.de, devicetree-discuss@lists.ozlabs.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v4] serial/efm32: add new driver
Date: Wed, 25 Jan 2012 09:41:08 +0100	[thread overview]
Message-ID: <20120125084108.GF6305@pengutronix.de> (raw)
In-Reply-To: <1327479959.21686.8.camel@joe2Laptop>

On Wed, Jan 25, 2012 at 12:25:59AM -0800, Joe Perches wrote:
> On Wed, 2012-01-25 at 09:05 +0100, Uwe Kleine-König wrote:
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> trivial comments below:
> 
> > diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
> []
> > @@ -0,0 +1,830 @@
> > +#if defined(CONFIG_SERIAL_EFM32_UART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
> > +#define SUPPORT_SYSRQ
> > +#endif
> 
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> 
> > +static void efm32_uart_rx_chars(struct efm32_uart_port *efm_port,
> > +		struct tty_struct *tty)
> > +{
> []
> > +		if ((rxdata & UARTn_RXDATAX_FERR) &&
> > +				!(rxdata & UARTn_RXDATAX_RXDATA__MASK)) {
> 
> Perhaps better as:
> 
> 		if ((rxdata & UARTn_RXDATAX_FERR) &&
> 		    !(rxdata & UARTn_RXDATAX_RXDATA__MASK)) {
This is how my editor does the indention. I'm sure this can be changed,
but I want the indention only to depend on the logical structure not on
where the opening parenthesis in the previous line is. This saves
context changes for future patches.
 
> and RXDATA__MASK with 2 underscores?  perhaps just one _?
Yeah, I like seperating the register bit field name from that fact that
the #define holds a mask.
 
> > +static int efm32_uart_console_setup(struct console *co, char *options)
> []
> > +		for (i = 0; i < ARRAY_SIZE(efm32_uart_ports); ++i) {
> > +			if (efm32_uart_ports[i]) {
> > +				pr_warn("efm32-console: fall back to console index %u (from %hhi)\n",
> > +						i, co->index);
> 
> 				pr_warn("fall back to ..."
> []
> > +	efm_port = efm32_uart_ports[co->index];
> > +	if (!efm_port) {
> > +		pr_warn("efm32-console: No port at %d\n", co->index);
> 
> 		pr_warn("No port at..."
I intentionally did that, as these two messages are related to the
console part of the serial driver while the rest of the messages are
about the serial/tty stuff. And I didn't like changing the definition of
pr_fmt in the middle of the file.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2012-01-25  8:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 15:05 [PATCH] serial/efm32: add new driver Uwe Kleine-König
2011-12-21 15:05 ` Uwe Kleine-König
2011-12-21 20:28 ` Alan Cox
2011-12-21 20:28   ` Alan Cox
2011-12-22  8:57   ` Uwe Kleine-König
     [not found]   ` <20111221202847.4ffeba10-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
2011-12-22 13:38     ` Uwe Kleine-König
2011-12-22 13:38       ` Uwe Kleine-König
2011-12-23 10:35       ` Arnd Bergmann
2011-12-23 10:35         ` Arnd Bergmann
2011-12-23 20:44         ` Uwe Kleine-König
     [not found]           ` <20111223204428.GI24496-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09  9:59             ` Kconfig option for compile time build coverage (Was: Re: [PATCH] serial/efm32: add new driver) Uwe Kleine-König
2012-01-09  9:59               ` Uwe Kleine-König
2012-01-25 16:16               ` Arnd Bergmann
2012-01-25 16:16                 ` Arnd Bergmann
2012-01-09 10:34           ` [PATCH] serial/efm32: add new driver Uwe Kleine-König
2012-01-25 16:56             ` Arnd Bergmann
2012-01-25 16:56               ` Arnd Bergmann
     [not found]       ` <1324561092-1945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09 16:44         ` [PATCH v3] " Uwe Kleine-König
2012-01-09 16:44           ` Uwe Kleine-König
2012-01-24 22:05           ` Greg KH
2012-01-24 22:05             ` Greg KH
2012-01-25  8:05             ` [PATCH v4] " Uwe Kleine-König
2012-01-25  8:05               ` Uwe Kleine-König
2012-01-25  8:25               ` Joe Perches
2012-01-25  8:25                 ` Joe Perches
2012-01-25  8:41                 ` Uwe Kleine-König [this message]
2012-01-25 15:52               ` Greg KH
2012-01-25 18:36                 ` Uwe Kleine-König
2012-01-25 18:36                   ` Uwe Kleine-König

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=20120125084108.GF6305@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alan@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=joe@perches.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.