From: Brian Norris <computersforpeace@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mtd@lists.infradead.org,
Richard Weinberger <richard@nod.at>,
linux-cris-kernel@axis.com, Jesper Nilsson <jespern@axis.com>
Subject: Re: [PATCH] mtd: don't WARN about overloaded users of mtd->reboot_notifier.notifier_call
Date: Fri, 6 Nov 2015 09:35:32 -0800 [thread overview]
Message-ID: <20151106173532.GD12143@google.com> (raw)
In-Reply-To: <20151106141537.GA25969@roeck-us.net>
On Fri, Nov 06, 2015 at 06:15:37AM -0800, Guenter Roeck wrote:
> On Tue, Nov 03, 2015 at 05:01:53PM -0800, Brian Norris wrote:
> > There are multiple types of users of mtd->reboot_notifier.notifier_call:
> >
> > (1) A while back, the cfi_cmdset_000{1,2} chip drivers implemented a
> > reboot notifier to (on a best effort basis) attempt to reset their flash
> > chips before rebooting.
> >
> > (2) More recently, we implemented a common _reboot() hook so that MTD
> > drivers (particularly, NAND flash) could better halt I/O operations
> > without having to reimplement the same notifier boilerplate.
> >
> > Currently, the WARN_ONCE() condition here was written to handle (2), but
> > at the same time it mis-diagnosed case (1) as an already-registered MTD.
> > Let's fix this by having the WARN_ONCE() condition better imitate the
> > condition that immediately follows it. (Wow, I don't know how I missed
> > that one.)
> >
> > (Side note: Unfortunately, we can't yet combine the reboot notifier code
> > for (1) and (2) with a patch like [1], because some users of (1) also
> > use mtdconcat, and so the mtd_info struct from cfi_cmdset_000{1,2} won't
> > actually get registered with mtdcore, and therefore their reboot
> > notifier won't get registered.)
> >
> > [1] http://patchwork.ozlabs.org/patch/417981/
> >
> > Suggested-by: Guenter Roeck <linux@roeck-us.net>
> > Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> > Cc: Jesper Nilsson <jespern@axis.com>
> > Cc: linux-cris-kernel@axis.com
>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
Thanks! Pushed to l2-mtd.git.
I'll be queueing up the 4.4-rc1 pull request soon.
Brian
prev parent reply other threads:[~2015-11-06 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 1:01 [PATCH] mtd: don't WARN about overloaded users of mtd->reboot_notifier.notifier_call Brian Norris
2015-11-04 12:01 ` Ezequiel Garcia
2015-11-05 20:40 ` Brian Norris
2015-11-06 14:15 ` Guenter Roeck
2015-11-06 17:35 ` 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=20151106173532.GD12143@google.com \
--to=computersforpeace@gmail.com \
--cc=jespern@axis.com \
--cc=linux-cris-kernel@axis.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=richard@nod.at \
/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 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.