[PATCH 2/2 l2-mtd-2.6/dunno] NAND: fix almost all checkpatch warnings

Artem Bityutskiy dedekind1 at gmail.com
Thu Sep 2 13:44:35 EDT 2010


On Thu, 2010-09-02 at 13:56 +0200, Florian Fainelli wrote:
> -		aligned_pos = eccpos[start_step * chip->ecc.bytes] & ~(busw - 1);
> +		aligned_pos = eccpos[start_step * chip->ecc.bytes] &
> +								~(busw - 1);

> -		if (eccpos[(start_step + num_steps) * chip->ecc.bytes] & (busw - 1))
> +		if (eccpos[(start_step + num_steps) * chip->ecc.bytes] &
> +								(busw - 1))

> -				memcpy(buf, chip->buffers->databuf + col, bytes);
> +				memcpy(buf, chip->buffers->databuf + col,
> +									bytes);

Similar.

> -		chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 32 - 1;
> +		chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32))
> +								+ 32 - 1;

May be something like:

chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32));
chip->chip_shift += 32 - 1;

or similar?

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list