From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] nand: atmel: Initialize pmecc smu with correct size
Date: Mon, 22 Oct 2018 13:25:37 -0400 [thread overview]
Message-ID: <20181022172537.GD1032@bill-the-cat> (raw)
In-Reply-To: <1538990864-26421-1-git-send-email-bmeng.cn@gmail.com>
On Mon, Oct 08, 2018 at 02:27:44AM -0700, Bin Meng wrote:
> Currently in pmecc_get_sigma(), the code tries to clear the memory
> pointed by smu with wrong size 'sizeof(int16_t) * ARRAY_SIZE(smu)'.
> Since smu is actually a pointer, not an array, so ARRAY_SIZE(smu)
> does not generate correct size to be cleared.
>
> In fact, GCC 8.1.0 reports a warning against it:
>
> error: division 'sizeof (int16_t * {aka short int *}) / sizeof (int16_t
> {aka short int})' does not compute the number of array elements
> [-Werror=sizeof-pointer-div]
>
> Fix it by using the correct size.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181022/87e0ef08/attachment.sig>
prev parent reply other threads:[~2018-10-22 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 9:27 [U-Boot] [PATCH] nand: atmel: Initialize pmecc smu with correct size Bin Meng
2018-10-09 7:47 ` Miquel Raynal
2018-10-22 10:06 ` Bin Meng
2018-10-22 17:25 ` Tom Rini [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=20181022172537.GD1032@bill-the-cat \
--to=trini@konsulko.com \
--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