linux-mips
[Top] [All Lists]

Re: [PATCH 1/2] octeon: flash_setup blows on !MTD_COMPLEX_MAPPINGS and !

To: Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH 1/2] octeon: flash_setup blows on !MTD_COMPLEX_MAPPINGS and !MTD_MAP_BANK_WIDTH_1
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 22 Jun 2009 15:31:19 +0100
Cc: linux-mips@linux-mips.org, David Daney <ddaney@caviumnetworks.com>
In-reply-to: <200906221115.23628.florian@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200906221115.23628.florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jun 22, 2009 at 11:15:23AM +0200, Florian Fainelli wrote:

> diff --git a/arch/mips/cavium-octeon/flash_setup.c 
> b/arch/mips/cavium-octeon/flash_setup.c
> index 008f657..894edbb 100644
> --- a/arch/mips/cavium-octeon/flash_setup.c
> +++ b/arch/mips/cavium-octeon/flash_setup.c
> @@ -41,6 +41,7 @@ static int __init flash_init(void)
>        */
>       union cvmx_mio_boot_reg_cfgx region_cfg;
>       region_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(0));
> +#if defined (CONFIG_MTD_COMPLEX_MAPPINGS) && (CONFIG_MTD_MAP_BANK_WIDTH_1)
              ^
              no space
                                                ^^^
                                  This should be defined(CONFIG_MTD_...)

Or bad things may happen.

The parenthesis in this expression are unnecessary.

>       if (region_cfg.s.en) {
>               /*
>                * The bootloader always takes the flash and sets its
> @@ -78,6 +79,7 @@ static int __init flash_init(void)
>                       pr_err("Failed to register MTD device for flash\n");
>               }
>       }
> +#endif /* (CONFIG_MTD_COMPLEX_MAPPINGS) && (CONFIG_MTD_MAP_BANK_WIDTH_1) */
>       return 0;
>  }

  Ralf

<Prev in Thread] Current Thread [Next in Thread>