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:	Tue, 28 Sep 2010 17:29:29 +0200
From:	Tobias Klauser <tklauser@...tanz.ch>
To:	Anton Vorontsov <cbouatmailru@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	Alan Cox <alan@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] altera_uart: Add support for different address
	strides

On 2010-09-28 at 15:35:37 +0200, Anton Vorontsov <cbouatmailru@...il.com> wrote:
> Some controllers implement registers with a stride, to support
> those we must implement the proper IO accessors.
> 
> Signed-off-by: Anton Vorontsov <cbouatmailru@...il.com>
> ---
>  drivers/serial/altera_uart.c |   59 +++++++++++++++++++++++++++---------------
>  include/linux/altera_uart.h  |    1 +
>  2 files changed, 39 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
> index 7686aaa..0a1a066 100644
> --- a/drivers/serial/altera_uart.c
> +++ b/drivers/serial/altera_uart.c
> @@ -78,13 +78,28 @@
>  struct altera_uart {
>  	struct uart_port port;
>  	struct timer_list tmr;
> +	int bus_shift;

This member is never used (only bus_shift from struct
altera_uart_platform_uart). Seems to be a leftover.

>  	unsigned int sigs;	/* Local copy of line sigs */
>  	unsigned short imr;	/* Local IMR mirror */
>  };
>  
> +static u32 altera_uart_readl(struct uart_port *port, int reg)
> +{
> +	struct altera_uart_platform_uart *platp = port->private_data;
> +
> +	return readl(port->membase + (reg << platp->bus_shift));
> +}
> +
> +static void altera_uart_writel(struct uart_port *port, u32 dat, int reg)
> +{
> +	struct altera_uart_platform_uart *platp = port->private_data;
> +
> +	writel(dat, port->membase + (reg << platp->bus_shift));
> +}

Why not make these inline?

Cheers,
  Tobias
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ