From: Brian Norris <computersforpeace@gmail.com>
To: Eunbong Song <eunb.song@samsung.com>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: nand: make more readable panic_nand_wait_ready() and nand_wait_ready()
Date: Mon, 20 Jan 2014 11:19:08 -0800 [thread overview]
Message-ID: <20140120191908.GK8919@ld-irv-0074> (raw)
In-Reply-To: <19226555.341201389136795005.JavaMail.weblogic@epml09>
On Tue, Jan 07, 2014 at 11:19:56PM +0000, Eunbong Song wrote:
>
> panic_nand_wait_ready() and nand_wait_ready() calls dev_ready() without checking if it exists.
There are many occasions where we call a function pointer without
(locally) checking that it is non-NULL. That is by design.
If you see a problem with this behavior, please fix this properly rather
than covering it up. This patch will just make faulty drivers spin for
20ms rather than hitting a bug. Instead, you should aim to fix buggy
drivers that call dev_ready() without assigning it; or even better,
defensively improve nand_base to detect those drivers which are
utilizing nand_command_lp() or nand_command() without assigning
dev_ready().
> This patch add check routine dev_ready() before run dev_ready()
> and this makes the code more readable
This patch does not make the code more readable, nor does it improve the
state of the original code much. Please solve and document a real
problem.
Thanks,
Brian
prev parent reply other threads:[~2014-01-20 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 23:19 [PATCH] mtd: nand: make more readable panic_nand_wait_ready() and nand_wait_ready() Eunbong Song
2014-01-20 19:19 ` Brian Norris [this message]
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=20140120191908.GK8919@ld-irv-0074 \
--to=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=eunb.song@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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).