From: Boris Brezillon <boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
To: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Rich Felker <dalias-8zAoT0mYgF4@public.gmane.org>,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>,
Mans Rullgard <mans-2StjZFpD7GcAvxtiuMwx3w@public.gmane.org>,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Miquel Raynal
<miquel.raynal-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
Maxime Ripard
<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Maxim Levitsky
<maximlevitsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Yoshinori Sato
<ysato-Rn4VEauK+AKRv+LV9MX5uooqe+aC9MnS@public.gmane.org>,
Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>,
Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>,
Gregory Clement
<gregory.clement-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Lukasz Majewski <lukma-ynQEQJNshbs@public.gmane.org>,
Neil Armstrong
<narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Subject: Re: [PATCH 08/23] mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks
Date: Mon, 20 Aug 2018 10:09:19 +0200 [thread overview]
Message-ID: <20180820100919.47f89927@bbrezillon> (raw)
In-Reply-To: <f75fc1c2e3c70cdb6c2f9ca2dbba3f2f-XLVq0VzYD2Y@public.gmane.org>
Hi Stefan,
On Mon, 20 Aug 2018 09:57:47 +0200
Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org> wrote:
> On 19.08.2018 13:26, Boris Brezillon wrote:
> > Hi Stefan,
> >
> > On Sat, 18 Aug 2018 10:30:13 +0200
> > Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org> wrote:
> >
> >> > diff --git a/drivers/mtd/nand/raw/tegra_nand.c
> >> > b/drivers/mtd/nand/raw/tegra_nand.c
> >> > index 5dcee20e2a8c..bcc3a2888c4f 100644
> >> > --- a/drivers/mtd/nand/raw/tegra_nand.c
> >> > +++ b/drivers/mtd/nand/raw/tegra_nand.c
> >> > @@ -615,10 +615,10 @@ static int tegra_nand_page_xfer(struct mtd_info
> >> > *mtd, struct nand_chip *chip,
> >> > return ret;
> >> > }
> >> >
> >> > -static int tegra_nand_read_page_raw(struct mtd_info *mtd,
> >> > - struct nand_chip *chip, u8 *buf,
> >> > +static int tegra_nand_read_page_raw(struct nand_chip *chip, u8 *buf,
> >> > int oob_required, int page)
> >> > {
> >> > + struct mtd_info *mtd = nand_to_mtd(chip);
> >> > void *oob_buf = oob_required ? chip->oob_poi : NULL;
> >> >
> >> > return tegra_nand_page_xfer(mtd, chip, buf, oob_buf,
> >>
> >> Since mtd is only required to pass it to tegra_nand_page_xfer, it would
> >> be better to change tegra_nand_page_xfer to only take chip.
> >
> > For sure, but that's the sort of cleanups I'll leave to NAND controller
> > driver maintainers (in this case you ;-)). I only take care of the NAND
> > API here and try to make things as simple as possible to ease review and
> > avoid breaking drivers.
>
> Understand, but that change makes your patch simpler... Or did create
> those patches automatically? In that case it makes sense to avoid manual
> changes.
I could have written a coccinelle script, but every time I tried it
took me more time than using git grep + manual patching :-).
>
> I can send a follow up patch no problem, but if you do a v2 and did the
> chagnes manually anyway, I really think it can go into this patchset.
The thing is, if I do that for tegra, why not doing it for other
drivers, and then the patch becomes really hard to review. So yes, I'd
prefer to keep the changes as dumb as possible and let each maintainer
cleanup their driver (which basically means, stop passing mtd_info to
all internal functions, not only this one).
Regards,
Boris
next prev parent reply other threads:[~2018-08-20 8:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 16:08 [PATCH 00/23] mtd: rawnand: Stop passing mtd_info to drivers Boris Brezillon
2018-08-17 16:09 ` [PATCH 01/23] mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks Boris Brezillon
2018-08-19 10:13 ` Alexander Sverdlin
[not found] ` <20180817160922.6224-2-boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
2018-08-22 19:14 ` Robert Jarzmik
2018-08-22 19:24 ` Boris Brezillon
2018-08-17 16:09 ` [PATCH 02/23] mtd: rawnand: Pass a nand_chip object to nand_scan() & co Boris Brezillon
2018-08-17 16:09 ` [PATCH 03/23] mtd: rawnand: Pass a nand_chip object to nand_release() Boris Brezillon
2018-08-17 16:09 ` [PATCH 04/23] mtd: rawnand: Pass a nand_chip object to nand_wait_ready() Boris Brezillon
2018-08-17 16:09 ` [PATCH 05/23] mtd: rawnand: Pass a nand_chip object to ecc->hwctl() Boris Brezillon
2018-08-17 16:09 ` [PATCH 06/23] mtd: rawnand: Pass a nand_chip object to ecc->calculate() Boris Brezillon
2018-08-17 16:09 ` [PATCH 07/23] mtd: rawnand: Pass a nand_chip object to ecc->correct() Boris Brezillon
2018-08-17 16:09 ` [PATCH 08/23] mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks Boris Brezillon
[not found] ` <20180817160922.6224-9-boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
2018-08-18 8:30 ` Stefan Agner
2018-08-19 11:26 ` Boris Brezillon
2018-08-20 7:57 ` Stefan Agner
[not found] ` <f75fc1c2e3c70cdb6c2f9ca2dbba3f2f-XLVq0VzYD2Y@public.gmane.org>
2018-08-20 8:09 ` Boris Brezillon [this message]
2018-08-20 8:57 ` Stefan Agner
2018-08-17 16:09 ` [PATCH 09/23] mtd: rawnand: Pass a nand_chip object to ecc->write_xxx() hooks Boris Brezillon
2018-08-17 16:09 ` [PATCH 10/23] mtd: rawnand: Pass a nand_chip object to chip->read_xxx() hooks Boris Brezillon
2018-08-17 16:09 ` [PATCH 11/23] mtd: rawnand: Pass a nand_chip object to chip->write_xxx() hooks Boris Brezillon
2018-08-17 16:09 ` [PATCH 12/23] mtd: rawnand: Pass a nand_chip object to chip->select_chip() Boris Brezillon
2018-08-17 16:09 ` [PATCH 13/23] mtd: rawnand: Pass a nand_chip object to chip->block_xxx() hooks Boris Brezillon
2018-08-17 16:09 ` [PATCH 14/23] mtd: rawnand: Pass a nand_chip object to chip->cmd_ctrl() Boris Brezillon
2018-08-17 16:09 ` [PATCH 15/23] mtd: rawnand: Pass a nand_chip object to chip->dev_ready() Boris Brezillon
2018-08-17 16:09 ` [PATCH 16/23] mtd: rawnand: Pass a nand_chip object to chip->cmdfunc() Boris Brezillon
2018-08-17 16:09 ` [PATCH 17/23] mtd: rawnand: Pass a nand_chip object to chip->waitfunc() Boris Brezillon
2018-08-17 16:09 ` [PATCH 18/23] mtd: rawnand: Pass a nand_chip object to chip->erase() Boris Brezillon
2018-08-17 16:09 ` [PATCH 19/23] mtd: rawnand: Pass a nand_chip object to chip->{get, set}_features() Boris Brezillon
2018-08-17 16:09 ` [PATCH 20/23] mtd: rawnand: Pass a nand_chip object to chip->setup_read_retry() Boris Brezillon
2018-08-17 16:09 ` [PATCH 21/23] mtd: rawnand: Pass a nand_chip object to chip->setup_data_interface() Boris Brezillon
2018-08-17 16:09 ` [PATCH 22/23] mtd: rawnand: Pass a nand_chip object to all nand_xxx_bbt() helpers Boris Brezillon
2018-08-17 16:09 ` [PATCH 23/23] mtd: rawnand: Pass a nand_chip object nand_erase_nand() Boris Brezillon
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=20180820100919.47f89927@bbrezillon \
--to=boris.brezillon-ldxbnhwyfcjbdgjk7y7tuq@public.gmane.org \
--cc=aaro.koskinen-X3B1VOXEql0@public.gmane.org \
--cc=alexandre.belloni-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=dalias-8zAoT0mYgF4@public.gmane.org \
--cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
--cc=gregory.clement-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lukma-ynQEQJNshbs@public.gmane.org \
--cc=mans-2StjZFpD7GcAvxtiuMwx3w@public.gmane.org \
--cc=marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=maximlevitsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=miquel.raynal-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=richard-/L3Ra7n9ekc@public.gmane.org \
--cc=robert.jarzmik-GANU6spQydw@public.gmane.org \
--cc=stefan-XLVq0VzYD2Y@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.org \
--cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org \
--cc=ysato-Rn4VEauK+AKRv+LV9MX5uooqe+aC9MnS@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).