On Wed Sep 30 14:41:36 2026 +0800, Hermes Wu wrote:
> Reorder the remaining declarations that don't follow reverse fir-tree
> order (struct/pointer types before plain scalars): the five register
> accessor helpers it6625_read_byte()/write_byte()/set_bits()/
> read_bytes()/write_bytes(), where a plain int was declared ahead of
> the struct device *dev pointer, and it6625_set_fmt()/it6625_s_edid(),
> where an initialized wider-type local was declared after a plain int.
> Swept the rest of the file for the same pattern; no other functions
> need it.
> 
> Signed-off-by: Hermes Wu <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/i2c/it6625.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

---

diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c
index 607e578761c4..a270bfda9f83 100644
--- a/drivers/media/i2c/it6625.c
+++ b/drivers/media/i2c/it6625.c
@@ -436,9 +436,9 @@ static int it6625_regmap_i2c_init(struct i2c_client *client,
 
 static int it6625_read_byte(struct it6625 *it6625, u8 reg)
 {
+       struct device *dev = it6625->dev;
        unsigned int val;
        int err;
-       struct device *dev = it6625->dev;
 
        err = regmap_read(it6625->it6625_regmap, reg, &val);
        if (err < 0) {
@@ -451,8 +451,8 @@ static int it6625_read_byte(struct it6625 *it6625, u8 reg)
 
 static int it6625_write_byte(struct it6625 *it6625, u8 reg, u8 val)
 {
-       int err;
        struct device *dev = it6625->dev;
+       int err;
 
        err = regmap_write(it6625->it6625_regmap, reg, val);
        if (err < 0) {
@@ -465,8 +465,8 @@ static int it6625_write_byte(struct it6625 *it6625, u8 reg, 
u8 val)
 
 static int it6625_set_bits(struct it6625 *it6625, u8 reg, u8 mask, u8 val)
 {
-       int err;
        struct device *dev = it6625->dev;
+       int err;
 
        err = regmap_update_bits(it6625->it6625_regmap, reg, mask, val);
        if (err < 0) {
@@ -479,8 +479,8 @@ static int it6625_set_bits(struct it6625 *it6625, u8 reg, 
u8 mask, u8 val)
 
 static int it6625_read_bytes(struct it6625 *it6625, u8 reg, u8 *buf, int len)
 {
-       int err;
        struct device *dev = it6625->dev;
+       int err;
 
        err = regmap_bulk_read(it6625->it6625_regmap, reg, buf, len);
        if (err < 0) {
@@ -493,8 +493,8 @@ static int it6625_read_bytes(struct it6625 *it6625, u8 reg, 
u8 *buf, int len)
 
 static int it6625_write_bytes(struct it6625 *it6625, u8 reg, u8 *buf, int len)
 {
-       int err;
        struct device *dev = it6625->dev;
+       int err;
 
        err = regmap_bulk_write(it6625->it6625_regmap, reg, buf, len);
        if (err < 0) {
@@ -1651,8 +1651,8 @@ static int it6625_set_fmt(struct v4l2_subdev *sd,
                          struct v4l2_subdev_format *format)
 {
        struct it6625 *it6625 = sd_to_6625(sd);
-       int ret;
        u32 mbus_fmt_code = format->format.code;
+       int ret;
 
        ret = it6625_get_fmt(sd, sd_state, format);
        format->format.code = mbus_fmt_code;
@@ -1732,8 +1732,8 @@ static int it6625_s_edid(struct v4l2_subdev *sd,
                         struct v4l2_subdev_edid *edid)
 {
        struct it6625 *it6625 = sd_to_6625(sd);
-       int err;
        u16 parent_pa = CEC_PHYS_ADDR_INVALID;
+       int err;
 
        if (edid->pad != 0) {
                v4l2_err(sd, "invalid pad %d", edid->pad);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to