From: Boris Brezillon <boris.brezillon@free-electrons.com> To: Boris Brezillon <boris.brezillon@free-electrons.com>, Richard Weinberger <richard@nod.at>, linux-mtd@lists.infradead.org, Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com>, linux-gpio@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>, Dan Williams <dan.j.williams@intel.com>, dmaengine@vger.kernel.org, Nicolas Ferre <nicolas.ferre@atmel.com>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, Wenyou Yang <wenyou.yang@atmel.com>, Josh Wu <rainyfeeling@outlook.com>, Haavard Skinnemoen <hskinnemoen@gmail.com>, Hans-Christian Egtvedt <egtvedt@samfundet.no>, linux-kernel@vger.kernel.org Cc: David Woodhouse <dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>, Marek Vasut <marek.vasut@gmail.com>, Cyrille Pitchen <cyrille.pitchen@atmel.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] mtd: nand: Remove unused chip->write_page() hook Date: Fri, 27 Jan 2017 17:34:06 +0100 [thread overview] Message-ID: <1485534846-28111-6-git-send-email-boris.brezillon@free-electrons.com> (raw) In-Reply-To: <1485534846-28111-1-git-send-email-boris.brezillon@free-electrons.com> The last/only user of the chip->write_page() hook (the Atmel NAND controller driver) has been reworked and is no longer specifying a custom ->write_page() implementation. Drop this hook before someone else start abusing it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 10 ++++------ include/linux/mtd/nand.h | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ec1c28aaaf23..c8894f31392e 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2839,9 +2839,10 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, /* We still need to erase leftover OOB data */ memset(chip->oob_poi, 0xff, mtd->oobsize); } - ret = chip->write_page(mtd, chip, column, bytes, wbuf, - oob_required, page, cached, - (ops->mode == MTD_OPS_RAW)); + + ret = nand_write_page(mtd, chip, column, bytes, wbuf, + oob_required, page, cached, + (ops->mode == MTD_OPS_RAW)); if (ret) break; @@ -4623,9 +4624,6 @@ int nand_scan_tail(struct mtd_info *mtd) } } - if (!chip->write_page) - chip->write_page = nand_write_page; - /* * Check ECC mode, default to software if 3byte/512byte hardware ECC is * selected and we have 256 byte pagesize fallback to software ECC diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c5f3a012ae62..9d51dee53be4 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -818,7 +818,6 @@ nand_get_sdr_timings(const struct nand_data_interface *conf) * @errstat: [OPTIONAL] hardware specific function to perform * additional error status checks (determine if errors are * correctable). - * @write_page: [REPLACEABLE] High-level page write function */ struct nand_chip { @@ -843,9 +842,6 @@ struct nand_chip { int (*scan_bbt)(struct mtd_info *mtd); int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); - int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, - uint32_t offset, int data_len, const uint8_t *buf, - int oob_required, int page, int cached, int raw); int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip, int feature_addr, uint8_t *subfeature_para); int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: boris.brezillon@free-electrons.com (Boris Brezillon) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] mtd: nand: Remove unused chip->write_page() hook Date: Fri, 27 Jan 2017 17:34:06 +0100 [thread overview] Message-ID: <1485534846-28111-6-git-send-email-boris.brezillon@free-electrons.com> (raw) In-Reply-To: <1485534846-28111-1-git-send-email-boris.brezillon@free-electrons.com> The last/only user of the chip->write_page() hook (the Atmel NAND controller driver) has been reworked and is no longer specifying a custom ->write_page() implementation. Drop this hook before someone else start abusing it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 10 ++++------ include/linux/mtd/nand.h | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ec1c28aaaf23..c8894f31392e 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2839,9 +2839,10 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, /* We still need to erase leftover OOB data */ memset(chip->oob_poi, 0xff, mtd->oobsize); } - ret = chip->write_page(mtd, chip, column, bytes, wbuf, - oob_required, page, cached, - (ops->mode == MTD_OPS_RAW)); + + ret = nand_write_page(mtd, chip, column, bytes, wbuf, + oob_required, page, cached, + (ops->mode == MTD_OPS_RAW)); if (ret) break; @@ -4623,9 +4624,6 @@ int nand_scan_tail(struct mtd_info *mtd) } } - if (!chip->write_page) - chip->write_page = nand_write_page; - /* * Check ECC mode, default to software if 3byte/512byte hardware ECC is * selected and we have 256 byte pagesize fallback to software ECC diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c5f3a012ae62..9d51dee53be4 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -818,7 +818,6 @@ nand_get_sdr_timings(const struct nand_data_interface *conf) * @errstat: [OPTIONAL] hardware specific function to perform * additional error status checks (determine if errors are * correctable). - * @write_page: [REPLACEABLE] High-level page write function */ struct nand_chip { @@ -843,9 +842,6 @@ struct nand_chip { int (*scan_bbt)(struct mtd_info *mtd); int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); - int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, - uint32_t offset, int data_len, const uint8_t *buf, - int oob_required, int page, int cached, int raw); int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip, int feature_addr, uint8_t *subfeature_para); int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, -- 2.7.4
next prev parent reply other threads:[~2017-01-27 16:34 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-27 16:34 [PATCH 0/5] mtd: nand: Rework/cleanup the Atmel NAND driver Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon 2017-01-27 16:34 ` [PATCH 1/5] gpio: Add the devm_get_index_gpiod_from_child() helper Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon 2017-01-30 9:49 ` Linus Walleij 2017-01-30 9:49 ` Linus Walleij 2017-01-30 9:49 ` Linus Walleij 2017-01-30 9:49 ` Linus Walleij 2017-01-30 10:19 ` Boris Brezillon 2017-01-30 10:19 ` Boris Brezillon 2017-01-30 10:19 ` Boris Brezillon 2017-01-30 10:19 ` Boris Brezillon 2017-01-27 16:34 ` [PATCH 2/5] dmaengine: Provide a wrapper for memcpy operations Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon 2017-01-27 16:34 ` [PATCH 3/5] mtd: nand: Cleanup/rework the atmel_nand driver Boris Brezillon 2017-01-27 16:34 ` [PATCH 4/5] mtd: nand: atmel: Document the new DT bindings Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon 2017-01-27 16:34 ` Boris Brezillon [this message] 2017-01-27 16:34 ` [PATCH 5/5] mtd: nand: Remove unused chip->write_page() hook 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=1485534846-28111-6-git-send-email-boris.brezillon@free-electrons.com \ --to=boris.brezillon@free-electrons.com \ --cc=alexandre.belloni@free-electrons.com \ --cc=computersforpeace@gmail.com \ --cc=cyrille.pitchen@atmel.com \ --cc=dan.j.williams@intel.com \ --cc=dmaengine@vger.kernel.org \ --cc=dwmw2@infradead.org \ --cc=egtvedt@samfundet.no \ --cc=gnurou@gmail.com \ --cc=hskinnemoen@gmail.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=marek.vasut@gmail.com \ --cc=nicolas.ferre@atmel.com \ --cc=rainyfeeling@outlook.com \ --cc=richard@nod.at \ --cc=vinod.koul@intel.com \ --cc=wenyou.yang@atmel.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.