public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd@lists.infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>, Han Xu <han.xu@nxp.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] mtd: rawnand: Kill cafe_nand_bug()
Date: Thu,  5 Jul 2018 12:27:26 +0200	[thread overview]
Message-ID: <20180705102733.29673-2-boris.brezillon@bootlin.com> (raw)
In-Reply-To: <20180705102733.29673-1-boris.brezillon@bootlin.com>

Leaving a function pointer to NULL should be enough to trigger a NULL
pointer exception, and anyway, if we want to BUG() when some missing
hooks are called, this should be done in the core, so let's drop the
cafe_nand_bug() dummy function.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/cafe_nand.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
index d721f489b38b..ac0be933a490 100644
--- a/drivers/mtd/nand/raw/cafe_nand.c
+++ b/drivers/mtd/nand/raw/cafe_nand.c
@@ -345,11 +345,6 @@ static irqreturn_t cafe_nand_interrupt(int irq, void *id)
 	return IRQ_HANDLED;
 }
 
-static void cafe_nand_bug(struct mtd_info *mtd)
-{
-	BUG();
-}
-
 static int cafe_nand_write_oob(struct mtd_info *mtd,
 			       struct nand_chip *chip, int page)
 {
@@ -760,9 +755,6 @@ static int cafe_nand_probe(struct pci_dev *pdev,
 	cafe->nand.ecc.size = mtd->writesize;
 	cafe->nand.ecc.bytes = 14;
 	cafe->nand.ecc.strength = 4;
-	cafe->nand.ecc.hwctl  = (void *)cafe_nand_bug;
-	cafe->nand.ecc.calculate = (void *)cafe_nand_bug;
-	cafe->nand.ecc.correct  = (void *)cafe_nand_bug;
 	cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel;
 	cafe->nand.ecc.write_oob = cafe_nand_write_oob;
 	cafe->nand.ecc.read_page = cafe_nand_read_page;
-- 
2.14.1

  reply	other threads:[~2018-07-05 10:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 10:27 [PATCH 0/8] mtd: rawnand: Bunch of cleanup Boris Brezillon
2018-07-05 10:27 ` Boris Brezillon [this message]
2018-07-05 10:27 ` [PATCH 2/8] mtd: rawnand: Remove nand_do_read() prototype from rawnand.h Boris Brezillon
2018-07-05 10:27 ` [PATCH 3/8] mtd: rawnand: Remove forward declaration of mtd_info Boris Brezillon
2018-07-05 10:27 ` [PATCH 4/8] mtd: rawnand: Remove forward declaration of device_node Boris Brezillon
2018-07-05 10:27 ` [PATCH 5/8] mtd: rawnand: Rename nand_default_bbt() into nand_create_bbt() Boris Brezillon
2018-07-05 10:27 ` [PATCH 6/8] mtd: rawnand: Kill the chip->scan_bbt() hook Boris Brezillon
2018-07-05 10:27 ` [PATCH 7/8] mtd: rawnand: orion_nand: Kill orion_nand_data.dev_ready() Boris Brezillon
2018-07-05 10:27 ` [PATCH 8/8] mtd: rawnand: plat_nand: Kill pdata->ctrl.{hwcontrol, read_byte}() Boris Brezillon
2018-07-05 19:32   ` Robert Jarzmik
2018-07-08 21:58 ` [PATCH 0/8] mtd: rawnand: Bunch of cleanup Miquel Raynal

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=20180705102733.29673-2-boris.brezillon@bootlin.com \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=daniel@zonque.org \
    --cc=dwmw2@infradead.org \
    --cc=han.xu@nxp.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robert.jarzmik@free.fr \
    /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