media: rkisp1: Swap value and address arguments to rkisp1_write()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 3 Mar 2022 15:35:10 +0000 (15:35 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 27 Jun 2022 07:32:06 +0000 (08:32 +0100)
commit0ef7dc305bd44d1c8330baa403d36c5df38b1215
tree78caef9f52f7c849f4ac40aa100bd7f3ccd335fb
parent3b430c2cf0e44dcac8639a36332f45a8326721c7
media: rkisp1: Swap value and address arguments to rkisp1_write()

While writel() takes the value and address arguments in that order, most
write functions (including in the regmap API) use the opposite
convention. Having the value first is considered confusing, and often
leads to more difficult to read code compared to the opposite convention
where the write call and the register name often fit on a single line:

rkisp1_write(rkisp1, RKISP1_CIF_THE_REG_NAME,
     complicate_calculation + for / the_register
     value + goes | here);

Swap the arguments of the rkisp1_write() function, and use the following
semantic patch to update the callers:

@@
expression rkisp1, value, address;
@@

- rkisp1_write(rkisp1, value, address)
+ rkisp1_write(rkisp1, address, value)

This commit also includes a few additional line break cleanups in the
rkisp1_write() calls, but no other manual change.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c