lkml.org 
[lkml]   [2017]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 04/23] mtd: nand: denali: avoid hard-coding ECC step, strength, bytes
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?

\
 
 \ /
  Last update: 2017-06-12 00:59    [W:0.120 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site