From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 5/6] mtd: nand: omap_gpmc: rename struct nand_bch_priv to struct omap_nand_info
Date: Thu, 10 Apr 2014 13:05:10 +0200 [thread overview]
Message-ID: <53467AE6.9000409@denx.de> (raw)
In-Reply-To: <1397122543-30074-6-git-send-email-pekon@ti.com>
On 10.04.2014 11:35, Pekon Gupta wrote:
> This patch renames 'struct nand_bch_priv' which currently holds private data only
> for BCH ECC schemes, into 'struct omap_nand_info' so that same can be used for
> all ECC schemes
>
> Signed-off-by: Pekon Gupta <pekon@ti.com>
> ---
> drivers/mtd/nand/omap_gpmc.c | 58 ++++++++++++++++++++------------------------
> 1 file changed, 26 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
> index 4bd296e..ae541c2 100644
> --- a/drivers/mtd/nand/omap_gpmc.c
> +++ b/drivers/mtd/nand/omap_gpmc.c
> @@ -148,9 +148,9 @@ static int __maybe_unused omap_correct_data(struct mtd_info *mtd, uint8_t *dat,
> }
>
> /*
> - * Generic BCH interface
> + * Driver configurations
> */
> -struct nand_bch_priv {
> +struct omap_nand_info {
> struct bch_control *control;
> enum omap_ecc ecc_scheme;
> };
> @@ -161,7 +161,7 @@ struct nand_bch_priv {
> * library).
> * When some users with other BCH strength will exists this have to change!
> */
> -static __maybe_unused struct nand_bch_priv bch_priv = {
> +static __maybe_unused struct omap_nand_info omap_nand_info = {
> .control = NULL
> };
>
> @@ -191,7 +191,7 @@ __maybe_unused
> static void omap_enable_hwecc(struct mtd_info *mtd, int32_t mode)
> {
> struct nand_chip *nand = mtd->priv;
> - struct nand_bch_priv *bch = nand->priv;
> + struct omap_nand_info *info = nand->priv;
> unsigned int dev_width = (nand->options & NAND_BUSWIDTH_16) ? 1 : 0;
> unsigned int ecc_algo = 0;
> unsigned int bch_type = 0;
> @@ -200,7 +200,7 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int32_t mode)
> u32 ecc_config_val = 0;
>
> /* configure GPMC for specific ecc-scheme */
> - switch (bch->ecc_scheme) {
> + switch (info->ecc_scheme) {
> case OMAP_ECC_HAM1_CODE_SW:
> return;
> case OMAP_ECC_HAM1_CODE_HW:
> @@ -262,11 +262,11 @@ static int omap_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat,
> uint8_t *ecc_code)
> {
> struct nand_chip *chip = mtd->priv;
> - struct nand_bch_priv *bch = chip->priv;
> + struct omap_nand_info *info = chip->priv;
> uint32_t *ptr, val = 0;
> int8_t i = 0, j;
Nitpicking:
This seems to be the only variable declaration with a tab for
indentation. As the others are not aligned via tab's I suggest to use
one space here as well. There are other places in this source where this
indentation is inconsistent. Please re-check.
Other than this:
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
next prev parent reply other threads:[~2014-04-10 11:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 9:35 [U-Boot] [PATCH v1 0/6] mtd: nand: omap: clean up of omap_elm and omap_gpmc driver Pekon Gupta
2014-04-10 9:35 ` [U-Boot] [PATCH v1 1/6] mtd: nand: omap_elm: remove #include omap_gpmc.h Pekon Gupta
2014-04-10 10:56 ` Stefan Roese
2014-04-10 9:35 ` [U-Boot] [PATCH v1 2/6] mtd: nand: omap_elm: use bch_type instead of nibble count to differentiate between BCH4/BCH8/BCH16 Pekon Gupta
2014-04-10 11:00 ` Stefan Roese
2014-04-10 11:07 ` Gupta, Pekon
2014-04-10 9:35 ` [U-Boot] [PATCH v1 3/6] mtd: nand: omap_elm: use macros for register definitions Pekon Gupta
2014-04-10 11:00 ` Stefan Roese
2014-04-10 9:35 ` [U-Boot] [PATCH v1 4/6] mtd: nand: omap_gpmc: remove unused members of 'struct nand_bch_priv' Pekon Gupta
2014-04-10 11:01 ` Stefan Roese
2014-04-10 9:35 ` [U-Boot] [PATCH v1 5/6] mtd: nand: omap_gpmc: rename struct nand_bch_priv to struct omap_nand_info Pekon Gupta
2014-04-10 11:05 ` Stefan Roese [this message]
2014-04-10 9:35 ` [U-Boot] [PATCH v1 6/6] mtd: nand: omap_gpmc: minor cleanup of omap_correct_data_bch Pekon Gupta
2014-04-10 11:18 ` Stefan Roese
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=53467AE6.9000409@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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