Re: [PATCH] staging: media: atomisp: Deduplicate and reformat atomisp_find_in_fmt_conv_by_atomisp_in_fmt()
From: Andy Shevchenko
Date: Wed Nov 18 2026 - 05:07:33 EST
On Wed, Nov 18, 2026 at 11:53 AM Shivani Patel
<patelshivani2283@xxxxxxxxx> wrote:
>
> atomisp_subdev.h contains duplicate declarations of
> atomisp_find_in_fmt_conv_by_atomisp_in_fmt() under ISP2400 and ISP2401
> comments. Both declare the exact same function with broken formatting
> (lines ending with open parenthesis, leading spaces, and awkward line
> breaks).
>
> Furthermore, the definition in atomisp_subdev.c uses the same broken
> formatting with leading spaces and a line ending with an open
> parenthesis.
>
> Remove the duplicate declaration in atomisp_subdev.h, place the return
> type on its own line, and shorten the parameter name to 'fmt' so that the
> prototype and definition adhere to the 80-character line limit and
> Linux coding style.
...
> +const struct atomisp_in_fmt_conv *
> +atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format fmt)
Can't we take one more step and drop the duplicate 'atomisp' in the
name? The quick suggestion (you can try find a better one) for the
name is atomisp_find_in_fmt_conv_by_enum() and also rename
atomisp_find_in_fmt_conv() to atomisp_find_in_fmt_conv_by_code().
Also drop stale declaration for atomisp_find_in_fmt_conv_compressed().
Altogether, make a series of the three patches:
- drop duplicate / unused declarations of atomisp_find_in_fmt_conv*() namespace
- rename atomisp_find_in_fmt_conv() to atomisp_find_in_fmt_conv_by_code()
- this patch that renames atomisp_find_in_fmt_conv_by_atomisp_in_fmt()
and fixes formatting
Don't forget to add a cover letter.
--
With Best Regards,
Andy Shevchenko