[PATCH] memory: renesas-rpc-if: Simplify single/double data register access

Wolfram Sang wsa+renesas at sang-engineering.com
Tue Apr 12 02:42:11 PDT 2022


On Mon, Apr 11, 2022 at 02:55:29PM +0200, Geert Uytterhoeven wrote:
> For manual write and read, factor out the common access to the first
> data register by keeping track of the current data pointer.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>

Works fine with reading/writing on a V3U, so:

Tested-by: Wolfram Sang <wsa+renesas at sang-engineering.com>

I agree the code is more concise. I am not sure, though, if it is really
more readable. But I don't mind very much, so except for a small nit:

Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>

> +			if (nbytes == 8)
> +				regmap_write(rpc->regmap, RPCIF_SMWDR1, *p++);
> +			regmap_write(rpc->regmap, RPCIF_SMWDR0, *p++);

Last '++' can be omitted?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20220412/3c556223/attachment.sig>


More information about the linux-mtd mailing list