[U-Boot] [PATCH v3 19/28] mtd: nand: add includes in NAND core to avoid warnings
Boris Brezillon
boris.brezillon at bootlin.com
Wed Dec 5 10:26:13 UTC 2018
On Wed, 5 Dec 2018 00:57:05 +0100
Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> Because of the include's game, when some files are compiled for a SPI
> NAND device, no warning appears. But when it is for a raw NAND device,
> GCC complains. Fix these warning by including <common.h>.
>
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon at bootlin.com>
> ---
> drivers/mtd/nand/bbt.c | 1 +
> drivers/mtd/nand/core.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c
> index 7e0ad3190c..f3d05e6757 100644
> --- a/drivers/mtd/nand/bbt.c
> +++ b/drivers/mtd/nand/bbt.c
> @@ -9,6 +9,7 @@
>
> #define pr_fmt(fmt) "nand-bbt: " fmt
>
> +#include <common.h>
> #include <linux/mtd/nand.h>
> #ifndef __UBOOT__
> #include <linux/slab.h>
> diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
> index 0b793695cc..3abaef23c5 100644
> --- a/drivers/mtd/nand/core.c
> +++ b/drivers/mtd/nand/core.c
> @@ -9,6 +9,7 @@
>
> #define pr_fmt(fmt) "nand: " fmt
>
> +#include <common.h>
> #ifndef __UBOOT__
> #include <linux/module.h>
> #endif
More information about the U-Boot
mailing list