[PATCH v2] mtd: Replace the expert mode symbols with a single helper

Geert Uytterhoeven geert at linux-m68k.org
Mon Feb 7 07:29:02 PST 2022


On Fri, Jan 28, 2022 at 12:34 PM Miquel Raynal
<miquel.raynal at bootlin.com> wrote:
> Reduce the number of exported symbols by replacing:
> - mtd_expert_analysis_warning (the error string)
> - mtd_expert_analysis_mode (the boolean)
> with a single helper:
> - mtd_check_expert_analysis_mode
>
> Calling this helper will both check/return the content of the internal
> boolean -which is not exported anymore- and as well conditionally
> WARN_ONCE() the user, like it was done before.
>
> While on this function, make the error string local to the helper and
> set it const. Only export this helper when CONFIG_DEBUG_FS is defined to
> limit the growth of the Linux kernel size only for a debug feature on
> production kernels.
>
> Mechanically update all the consumers.
>
> Suggested-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>

LGTM, so
Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-mtd mailing list