Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1613761
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 13/37] mtd: nand: denali: avoid hard-coding ecc.strength and ecc.bytes |
| Date | 2017-03-31 11:10 +0200 |
| Message-ID | <tr0Jb-2AS-13@gated-at.bofh.it> (permalink) |
| References | <tqC49-2hn-3@gated-at.bofh.it> <tqCdQ-2l8-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 30 Mar 2017 15:45:59 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
> index 1681a30..c3bc333 100644
> --- a/drivers/mtd/nand/denali_dt.c
> +++ b/drivers/mtd/nand/denali_dt.c
> @@ -31,10 +31,12 @@ struct denali_dt {
>
> struct denali_dt_data {
> unsigned int revision;
> + unsigned long ecc_strength_avail;
Shouldn't you directly make sure that your driver will support
strengths > BITS_PER_LONG?
I would store the supported strength in a table to make it more
future-proof:
int *ecc_strength_avail;
int num_ecc_strengths;
> unsigned int caps;
> };
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 13/37] mtd: nand: denali: avoid hard-coding ecc.strength and ecc.bytes Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-30 09:00 +0200 Re: [PATCH v3 13/37] mtd: nand: denali: avoid hard-coding ecc.strength and ecc.bytes Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-03-31 11:10 +0200
csiph-web