Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659427

Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step, strength, bytes

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step, strength, bytes
Date 2017-06-07 09:10 +0200
Message-ID <tPDgl-3om-5@gated-at.bofh.it> (permalink)
References <tP9BD-S3-7@gated-at.bofh.it> <tP9BF-S3-59@gated-at.bofh.it> <tPuPM-6gH-23@gated-at.bofh.it> <tPzw6-TK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 7 Jun 2017 12:09:31 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> >> +
> >> +static int denali_ecc_setup(struct mtd_info *mtd, struct nand_chip *chip,
> >> +                         struct denali_nand_info *denali)
> >> +{
> >> +     struct nand_ecc_caps caps;
> >> +     int ret;
> >> +
> >> +     caps.stepinfos = denali->stepinfo;
> >> +     caps.nstepinfos = 1;
> >> +     caps.calc_ecc_bytes = denali_calc_ecc_bytes;
> >> +     caps.oob_reserve_bytes = denali->bbtskipbytes;  
> >
> > If you get rid of this oob_reserve_bytes field, you can define caps as
> > a static const and even directly store ecc_caps in denali_nand_info.  
> 
> To make caps static const, denali_calc_ecc_bytes must be exported
> to be referenced from denali_dt/denali_pci.
> I am reluctant to do it.

You already duplicate other information in denali_dt.c and
denali_pci.c, so what prevents you from duplicating this one-line
function?

Also, denali core already exports 2 functions, I don't see the problem
in exporting the common nand_ecc_caps object. Why are you reluctant to
that?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 00/23] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
  [PATCH v4 11/23] mtd: nand: denali: rework interrupt handling Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
  [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step, strength, bytes Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
    Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step,  strength, bytes Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 00:10 +0200
      Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step,  strength, bytes Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-07 05:10 +0200
        Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step,  strength, bytes Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 09:10 +0200
          Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step,  strength, bytes Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-07 09:30 +0200
            Re: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step,  strength, bytes Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 09:50 +0200
  [PATCH v4 03/23] mtd: nand: add generic helpers to check, match, maximize ECC settings Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
    Re: [PATCH v4 03/23] mtd: nand: add generic helpers to check,  match, maximize ECC settings Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-06 23:50 +0200
      Re: [PATCH v4 03/23] mtd: nand: add generic helpers to check, match,  maximize ECC settings Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-07 03:50 +0200
        Re: [PATCH v4 03/23] mtd: nand: add generic helpers to check,  match, maximize ECC settings Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 08:20 +0200
  [PATCH v4 05/23] mtd: nand: denali: remove Toshiba and Hynix specific fixup code Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
  [PATCH v4 15/23] mtd: nand: denali: fix bank reset function to detect the number of chips Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:30 +0200
  [PATCH v4 06/23] mtd: nand: denali_dt: add compatible strings for UniPhier SoC variants Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:40 +0200
  [PATCH v4 16/23] mtd: nand: denali: use interrupt instead of polling for bank reset Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:40 +0200
  [PATCH v4 13/23] mtd: nand: denali: fix NAND_CMD_PARAM handling Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-06 01:40 +0200
  Re: [PATCH v4 00/23] mtd: nand: denali: Denali NAND IP patch bomb Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 00:10 +0200
    Re: [PATCH v4 00/23] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-07 03:30 +0200
      Re: [PATCH v4 00/23] mtd: nand: denali: Denali NAND IP patch bomb Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-07 09:30 +0200

csiph-web