lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 23 Jan 2016 17:15:27 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	"Matwey V. Kornilov" <matwey@....msu.ru>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.com>,
	Peter Hurley <peter@...leysoftware.com>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
Subject: Re: [PATCH v7 2/3] tty: Add software emulated RS485 support for 8250

On Tue, Jan 19, 2016 at 10:33 PM, Matwey V. Kornilov <matwey@....msu.ru> wrote:
> Implementation of software emulation of RS485 direction handling is based
> on omap_serial driver.
> Before and after transmission RTS is set to the appropriate value.
>
> Note that before calling serial8250_em485_init the caller has to
> ensure that UART will interrupt when shift register empty. Otherwise,
> emultaion cannot be used.
>
> Both serial8250_em485_init and serial8250_em485_destroy are
> idempotent functions.

Seems you have issues with kernel-doc and commentary styles.

Functions in kernel doc are marked as func(), so don't forget parens.

Multi-line comment blocks are going in the style like:

/*
 * Text line 1.
 * Line 2. New sentence.
 */

You may notice the periods at the end of sentences. There is no need
to keep more heading spaces.

> +
> +static void serial8250_em485_handle_start_tx(unsigned long arg);
> +static void serial8250_em485_handle_stop_tx(unsigned long arg);
> +

And you need forward declarations because of some cyclic dependency?

> +static void serial8250_start_tx(struct uart_port *port)
> +{
> +       struct uart_8250_port *up = up_to_u8250p(port);
> +
> +       serial8250_rpm_get_tx(up);
> +

> +       if (up->em485 &&
> +           up->em485->active_timer == &up->em485->start_tx_timer)
> +               return;

struct uart_8250_em485 *em485 = up->em485;

if (em485 && em485->active_timer == &em485->start_tx_timer)

?

Same for the rest of code.

> +
> +       if (up->em485)
> +               start_tx_rs485(port);
> +       else
> +               __start_tx(port);
> +}

> +struct uart_8250_em485 {
> +       struct timer_list       start_tx_timer;

…/* "rs485 start tx" timer */

-> kernel-doc

> +       struct timer_list       stop_tx_timer;  /* "rs485 stop tx" timer */
> +       struct timer_list       *active_timer;  /* pointer to active timer */
> +};

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ