[PATCH] mtd: rawnand: Fix misuses of of_match_node()

Florian Fainelli f.fainelli at gmail.com
Thu Jan 27 10:00:38 PST 2022



On 1/27/2022 3:08 AM, Miquel Raynal wrote:
> On non-OF enabled platforms (CONFIG_OF is not set), of_match_node() will
> expand to NULL. The of_device_id array pointed by the macro will then be
> left unused. Let's mark the array __maybe_unused in this case to prevent
> compiler warnings.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> ---
>   drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +-
>   drivers/mtd/nand/raw/atmel/pmecc.c           | 2 +-
>   drivers/mtd/nand/raw/brcmnand/brcmnand.c     | 2 +-

Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-- 
Florian



More information about the linux-mtd mailing list