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

Miquel Raynal miquel.raynal at bootlin.com
Mon Feb 7 07:39:27 PST 2022


On Fri, 2022-01-28 at 11:34:14 UTC, Miquel Raynal 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>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next.

Miquel



More information about the linux-mtd mailing list