From: Brian Norris <computersforpeace@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
linux-mtd@lists.infradead.org, shijie8@gmail.com
Subject: Re: [PATCH v2] mtd: fsl-quadspi: Fix module unbound
Date: Wed, 7 Jan 2015 00:45:10 -0800 [thread overview]
Message-ID: <20150107084510.GK7112@brian-ubuntu> (raw)
In-Reply-To: <1420599927-32385-1-git-send-email-festevam@gmail.com>
On Wed, Jan 07, 2015 at 01:05:27AM -0200, Fabio Estevam wrote:
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 39763b9..8cdd73f 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
...
> @@ -661,7 +661,7 @@ MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);
>
> static void fsl_qspi_set_base_addr(struct fsl_qspi *q, struct spi_nor *nor)
> {
> - q->chip_base_addr = q->nor_size * (nor - q->nor);
> + q->chip_base_addr += (q->nor_size * 2);
This doesn't look right to me...
Recall there is one struct fsl_qspi that maps to several struct spi_nor.
This function gets called several times, so it'll be incrementing this
every time. It probably just happens to work once for you.
> }
>
> static int fsl_qspi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len)
Brian
prev parent reply other threads:[~2015-01-07 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 3:05 [PATCH v2] mtd: fsl-quadspi: Fix module unbound Fabio Estevam
2015-01-07 3:57 ` Huang Shijie
2015-01-07 8:45 ` Brian Norris [this message]
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=20150107084510.GK7112@brian-ubuntu \
--to=computersforpeace@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=shijie8@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).