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] [day] [month] [year] [list]
Message-ID: <20141105222913.GX23619@ld-irv-0074>
Date:	Wed, 5 Nov 2014 14:29:13 -0800
From:	Brian Norris <computersforpeace@...il.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
	David Woodhouse <dwmw2@...radead.org>,
	Josh Wu <Josh.wu@...el.com>, Jingoo Han <jg1.han@...sung.com>,
	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	Mark Brown <broonie@...aro.org>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Herve Codina <Herve.CODINA@...ad.com>,
	Bo Shen <voice.shen@...el.com>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Grzeschik <m.grzeschik@...gutronix.de>,
	Josh Triplett <josh@...htriplett.org>,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	Huang Shijie <shijie8@...il.com>,
	Michael Opdenacker <michael.opdenacker@...e-electrons.com>
Subject: Re: [PATCH 2/2] mtd: mxc_nand: use __iowrite32_copy for 32 bit copy

On Mon, Oct 20, 2014 at 09:36:13PM +0530, Vinod Koul wrote:
> The driver was also using own method to do 32bit copy, turns out
> we have a kernel API so use that instead
> 
> Signed-off-by: Vinod Koul <vinod.koul@...el.com>
> ---
>  drivers/mtd/nand/mxc_nand.c |   10 +++-------
>  1 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index dba262b..3794cd7 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -280,14 +280,10 @@ static void memcpy32_fromio(void *trg, const void __iomem  *src, size_t size)
>  		*t++ = __raw_readl(s++);
>  }
>  
> -static void memcpy32_toio(void __iomem *trg, const void *src, int size)
> +static inline void memcpy32_toio(void __iomem *trg, const void *src, int size)
>  {
> -	int i;
> -	u32 __iomem *t = trg;
> -	const u32 *s = src;
> -
> -	for (i = 0; i < (size >> 2); i++)
> -		__raw_writel(*s++, t++);
> +	/* __iowrite32_copy use 32bit size values so divide by 4 */
> +	__iowrite32_copy(trg, src, size/4);

Fixed up the spacing around the division, and pushed to l2-mtd.git.

>  }
>  
>  static int check_int_v3(struct mxc_nand_host *host)

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