mtd: rawnand: Fix misuses of of_match_node()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Jan 2022 11:08:02 +0000 (12:08 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 31 Jan 2022 16:18:05 +0000 (17:18 +0100)
commite02dacd3a26d5e5d3913650d3d6d939ebf77fd5c
tree0a680372099acf46ddbd10f373a9c7c4f7faaaa3
parent3f26d1bf90ba9bf420e49ec9cdbe13d15c0df7cd
mtd: rawnand: Fix misuses of of_match_node()

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@bootlin.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/linux-mtd/20220127110802.1064963-1-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/atmel/nand-controller.c
drivers/mtd/nand/raw/atmel/pmecc.c
drivers/mtd/nand/raw/brcmnand/brcmnand.c