RFC on large number of hacks in mtd core files

Brian Norris computersforpeace at gmail.com
Fri Jan 22 19:16:35 PST 2016


On Fri, Jan 22, 2016 at 04:34:58PM +0100, Mason wrote:
> Hello everyone,
> 
> As I've mentioned in a previous thread, I'm supposed to port a NAND
> controller driver from 3.4 to 4.4. But this is complicated by the
> fact that several core files have been modified along the way.
> 
> Here's the full picture:
> 
> $ git diff --stat v3.4.39 custom-3.4 drivers/mtd
>  drivers/mtd/Kconfig                 |   15 +-
>  drivers/mtd/chips/cfi_cmdset_0002.c |  129 ++-
>  drivers/mtd/devices/Kconfig         |    6 +
>  drivers/mtd/devices/Makefile        |    3 +-
>  drivers/mtd/devices/m25p80.c        |  100 +-
>  drivers/mtd/devices/spiflash.c      | 2131 +++++++++++++++++++++++++++++++++++
>  drivers/mtd/maps/Kconfig            |   11 +-
>  drivers/mtd/maps/physmap.c          |  202 +++-
>  drivers/mtd/mtdchar.c               |   54 +
>  drivers/mtd/mtdcore.c               |   63 +-
>  drivers/mtd/mtdpart.c               |    9 +
>  drivers/mtd/nand/Kconfig            |   46 +-
>  drivers/mtd/nand/Makefile           |   11 +-
>  drivers/mtd/nand/monza_nand.c       |  614 ++++++++++
>  drivers/mtd/nand/nand_base.c        | 1226 +++++++++++++++++++-
>  drivers/mtd/nand/nand_bch_ecc.c     |  311 +++++
>  drivers/mtd/nand/nand_bch_ecc.h     |   11 +
>  drivers/mtd/nand/nand_ids.c         |  253 ++++-
>  drivers/mtd/nand/nandsim.c          |    2 +-
>  drivers/mtd/nand/smp8xxx_nand.c     | 2009 +++++++++++++++++++++++++++++++++
>  drivers/mtd/ubi/misc.c              |    7 +
>  21 files changed, 7164 insertions(+), 49 deletions(-)

^^ This doesn't make sense. You've changed over 7000 lines, but your
entire email is less than 3000 lines. From that alone, I can see you
haven't given us the whole diff...

And just looking at the diff stat, you might want to clear up a few
things:

(1) Are you really just talking about supporting a *NAND* driver? If so,
then you probably don't need your new drivers/mtd/devices/spiflash.c.
You also probably don't need to touch most things outside of
drivers/mtd/nand/, like drivers/mtd/chips/cfi_cmdset_0002.c,
drivers/mtd/maps/physmap.c, drivers/mtd/devices/m25p80.c, etc.

(2) How many NAND drivers do you actually have? I see two "new" NAND
drivers: drivers/mtd/nand/smp8xxx_nand.c and
drivers/mtd/nand/monza_nand.c.

> 
> 
> Here's the actual diff, with non-core changes omitted.

Ah, I see why the diffstat vs diff discrepancy.

Others may feel more inclined to humor you, but by omitting the drivers
themselves, it's hard to really get the whole picture.

[snip the rest]

Brian



More information about the linux-mtd mailing list