Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755400AbbDGQF5 (ORCPT ); Tue, 7 Apr 2015 12:05:57 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:34087 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754108AbbDGQFu (ORCPT ); Tue, 7 Apr 2015 12:05:50 -0400 MIME-Version: 1.0 In-Reply-To: References: <1428080481-18591-1-git-send-email-mcoquelin.stm32@gmail.com> <1428080481-18591-11-git-send-email-mcoquelin.stm32@gmail.com> Date: Tue, 7 Apr 2015 18:05:47 +0200 Message-ID: Subject: Re: [PATCH v5 10/15] serial: stm32-usart: Add STM32 USART Driver From: Maxime Coquelin To: Andy Shevchenko Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Geert Uytterhoeven , Rob Herring , Philipp Zabel , Linus Walleij , Arnd Bergmann , Stefan Agner , Peter Meerwald , Paul Bolle , Peter Hurley , Chanwoo Choi , Russell King , Daniel Lezcano , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Joe Perches , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , Linux Documentation List , linux-arm Mailing List , "linux-kernel@vger.kernel.org" , devicetree , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Linux-Arch , "linux-api@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2551 Lines: 101 2015-04-04 0:04 GMT+02:00 Andy Shevchenko : > On Fri, Apr 3, 2015 at 8:01 PM, Maxime Coquelin > wrote: >> This drivers adds support to the STM32 USART controller, which is a >> standard serial driver. >> > > Few minor comments. > >> Tested-by: Chanwoo Choi >> Signed-off-by: Maxime Coquelin >> --- >> drivers/tty/serial/Kconfig | 17 + >> drivers/tty/serial/Makefile | 1 + >> drivers/tty/serial/stm32-usart.c | 736 +++++++++++++++++++++++++++++++++++++++ >> include/uapi/linux/serial_core.h | 3 + >> 4 files changed, 757 insertions(+) >> create mode 100644 drivers/tty/serial/stm32-usart.c >> >> diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c >> new file mode 100644 >> index 0000000..61e0e19 >> --- /dev/null >> +++ b/drivers/tty/serial/stm32-usart.c >> @@ -0,0 +1,736 @@ ... >> + >> +static unsigned int stm32_get_mctrl(struct uart_port *port) >> +{ >> + /* This routine is used to get signals of: DCD, DSR, RI, and CTS */ >> + return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS; >> +} >> + >> +/* Transmit stop */ >> +static void stm32_stop_tx(struct uart_port *port) >> +{ >> + stm32_clr_bits(port, USART_CR1, USART_CR1_TXEIE); >> +} >> + >> + > > Unneeded empty line. Right, will be removed. > ... >> + >> +static int stm32_startup(struct uart_port *port) >> +{ >> + const char *name = to_platform_device(port->dev)->name; >> + u32 val; >> + >> + if (request_irq(port->irq, stm32_interrupt, IRQF_NO_SUSPEND, >> + name, port)) { > > I think you have to propogate returned value, thus > ret = request_irq(); > if (ret < 0) > return ret; Exact, I will fix this. > ... >> + >> +static const char *stm32_type(struct uart_port *port) >> +{ >> + return (port->type == PORT_STM32) ? DRIVER_NAME : NULL; >> +} >> + >> +static void stm32_release_port(struct uart_port *port) >> +{ >> +} > > Doesn't core handle NULL-functions? If it does, remove such from the driver. No it does not. > >> + >> +static int stm32_request_port(struct uart_port *port) >> +{ >> + return 0; >> +} > > Ditto. Ditto. Thanks for the review, Maxime > > > > -- > With Best Regards, > Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/