Re: [PATCH v5] staging: media: av7110: fix coding style
From: Andy Shevchenko
Date: Tue Mar 24 2026 - 08:10:31 EST
On Tue, Mar 24, 2026 at 12:38:19AM +0530, Chethan C wrote:
> Fixed Indentation, Alignment issues reported by checkpatch.pl.
>
> Rename enum av7110_rec_play_state, av7110_type_rec_play_format and
> av7110_encoder_command to follow the kernel naming style.
>
> Rename wssData to wss_data to avoid CamelCase identifiers.
...
> u16 wssMode;
> - u16 wssData;
> + u16 wss_data;
Now these two are in inconsistent state.
...
> - ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode);
> + ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, AV7110_LOAD_VID_CODE,
> + 1, mode);
Also rethink about more logical split. As far as I can see this API does some
variadic arguments processing while the first two are mandatory ones. With
that taken into account I would do it as
ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER,
AV7110_LOAD_VID_CODE, 1, mode);
Also check the entire patch for this kind of amendments.
...
> - rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 1, av7110->wssData);
> + rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, AV7110_SET_WSS_CONFIG, 2,
> + 1, av7110->wss_data);
> return (rc < 0) ? rc : count;
This can also be improved a bit as
if (rc)
return rc;
return count;
but strictly speaking it's out of the scope of this patch.
--
With Best Regards,
Andy Shevchenko