Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mtd@lists.infradead.org,
	Artem Bityutskiy <dedekind1@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Maxime Bizon <mbizon@freebox.fr>,
	Kevin Cernekee <cernekee@gmail.com>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH 2/3] MIPS: BCM63XX: export PSI size from nvram
Date: Sat, 23 Mar 2013 14:39:00 +0100	[thread overview]
Message-ID: <201303231439.00694.florian@openwrt.org> (raw)
In-Reply-To: <1364044070-10486-3-git-send-email-jogo@openwrt.org>

Hello Jonas,

A few minor comments below:

Le samedi 23 mars 2013 14:07:48, Jonas Gorski a écrit :
> Signed-off-by: Jonas Gorski <jogo@openwrt.org>
> ---
>  arch/mips/bcm63xx/nvram.c                          |   11 +++++++++++
>  arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h |    2 ++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/mips/bcm63xx/nvram.c b/arch/mips/bcm63xx/nvram.c
> index 6206116..44af608 100644
> --- a/arch/mips/bcm63xx/nvram.c
> +++ b/arch/mips/bcm63xx/nvram.c
> @@ -35,6 +35,8 @@ struct bcm963xx_nvram {
>  	u32	checksum_high;
>  };
> 
> +#define BCM63XX_DEFAULT_PSI_SIZE	64
> +
>  static struct bcm963xx_nvram nvram;
>  static int mac_addr_used;
> 
> @@ -105,3 +107,12 @@ int bcm63xx_nvram_get_mac_address(u8 *mac)
>  	return 0;
>  }
>  EXPORT_SYMBOL(bcm63xx_nvram_get_mac_address);
> +
> +int bcm63xx_nvram_get_psi_size(void)
> +{
> +	if (nvram.psi_size > 0)
> +		return nvram.psi_size;
> +
> +	return BCM63XX_DEFAULT_PSI_SIZE;

I wonder if it would not be better to return a size in KBytes here instead of 
a multiple of KBytes?

> +}
> +EXPORT_SYMBOL(bcm63xx_nvram_get_psi_size);
> diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
> b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h index
> 62d6a3b..d76a486 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
> @@ -32,4 +32,6 @@ u8 *bcm63xx_nvram_get_name(void);
>   */
>  int bcm63xx_nvram_get_mac_address(u8 *mac);
> 
> +int bcm63xx_nvram_get_psi_size(void);

You could use an unsigned int here.
-- 
Florian

  reply	other threads:[~2013-03-23 13:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 13:07 [PATCH 0/3] fix NVRAM partition size if larger than expected Jonas Gorski
2013-03-23 13:07 ` [PATCH 1/3] MTD: bcm63xxpart: use size macro for CFE block size Jonas Gorski
2013-03-23 13:07 ` [PATCH 2/3] MIPS: BCM63XX: export PSI size from nvram Jonas Gorski
2013-03-23 13:39   ` Florian Fainelli [this message]
2013-05-10 12:36   ` Artem Bityutskiy
2013-05-12 10:48     ` Jonas Gorski
2013-05-12 14:52       ` Florian Fainelli
2013-03-23 13:07 ` [PATCH 3/3] MTD: bcm63xxpart: use nvram for PSI size Jonas Gorski
2013-03-23 13:39 ` [PATCH 0/3] fix NVRAM partition size if larger than expected Florian Fainelli
2013-05-10 12:35 ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201303231439.00694.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=cernekee@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jogo@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mbizon@freebox.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox