media: atomisp: Fix sh_css_config_input_network_2400() coding style
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Apr 2024 09:19:52 +0000 (10:19 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 Apr 2024 10:06:25 +0000 (11:06 +0100)
Fix the if (stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {} block
coding style. Specifically fix the weird declaration of variables split
over multiple lines.

While at it also split the multi-line width calculation at a more
logical place.

Reported-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/sh_css.c

index 6520a35b6e47ba180d331d020100c13fed1b53e0..42a69b26db013fc9c9a1cb8c4bc8519d961f74b4 100644 (file)
@@ -498,17 +498,15 @@ sh_css_config_input_network_2400(struct ia_css_stream *stream)
        }
 
        if (stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
-               unsigned int hblank_cycles = 100,
-               vblank_lines = 6,
-               width,
-               height,
-               vblank_cycles;
-               width  = (stream->config.input_config.input_res.width) / (1 +
-                       (stream->config.pixels_per_clock == 2));
+               unsigned int width, height, vblank_cycles;
+               const unsigned int hblank_cycles = 100;
+               const unsigned int vblank_lines = 6;
+
+               width = (stream->config.input_config.input_res.width) /
+                       (1 + (stream->config.pixels_per_clock == 2));
                height = stream->config.input_config.input_res.height;
                vblank_cycles = vblank_lines * (width + hblank_cycles);
-               sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
-                                            vblank_cycles);
+               sh_css_sp_configure_sync_gen(width, height, hblank_cycles, vblank_cycles);
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                            "sh_css_config_input_network() leave:\n");