[PATCH] mtd: mxc_nand: Fix sparse warning

Ezequiel Garcia elezegarcia at gmail.com
Mon Feb 11 21:39:30 EST 2013


Hi Fabio,

On Mon, Feb 11, 2013 at 12:51 PM, Fabio Estevam <festevam at gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
>
> Fix the following sparse warning:
>
> drivers/mtd/nand/mxc_nand.c:269:25: warning: duplicate const
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  drivers/mtd/nand/mxc_nand.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index 45204e4..37037cb 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -266,7 +266,7 @@ static struct nand_ecclayout nandv2_hw_eccoob_4k = {
>         }
>  };
>
> -static const char const *part_probes[] = {
> +static const char *part_probes[] = {
>         "cmdlinepart", "RedBoot", "ofpart", NULL };
>

Are you sure checkpatch.pl didn't complain about this patch?
I think it will complain, because it's expecting to see this instead:

  static const char * const part_probes[] = {

And then you'll probably have to cast part_probes to (const char **)
on the mtd_device_parse_register call to remove every warning.

Hope this helps,

-- 
    Ezequiel



More information about the linux-mtd mailing list