From: Arnd Bergmann <arnd@arndb.de>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Ben Gardner <bgardner@wabtec.com>,
Marco Stornelli <marco.stornelli@gmail.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH 1/2] ramoops: use pstore interface
Date: Thu, 17 Nov 2011 15:07:00 +0000 [thread overview]
Message-ID: <201111171507.00699.arnd@arndb.de> (raw)
In-Reply-To: <1321478739-8978-2-git-send-email-keescook@chromium.org>
On Wednesday 16 November 2011, Kees Cook wrote:
> Instead of using /dev/mem directly, use the common pstore infrastructure
> to handle Oops gathering and extraction.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
Sounds like a very good plan to me. It probably makes sense to move the
entire driver into fs/pstore after this. Otherwise, I have only trivial
style comments:
> +static int ramoops_pstore_open(struct pstore_info *psi);
> +static int ramoops_pstore_close(struct pstore_info *psi);
> +static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type,
> + struct timespec *time,
> + char **buf,
> + struct pstore_info *psi);
> +static int ramoops_pstore_write(enum pstore_type_id type,
> + enum kmsg_dump_reason reason, u64 *id,
> + unsigned int part,
> + size_t size, struct pstore_info *psi);
> +static int ramoops_pstore_erase(enum pstore_type_id type, u64 id,
> + struct pstore_info *psi);
Can you do it without forward declarations? Many people find code
more readable if it is structure in the natural order that avoids
these.
> +static int ramoops_pstore_close(struct pstore_info *psi)
> +{
> + return 0;
> +}
Do you actually have to provide this if it's empty?
If yes, it might make sense to change the pstore code so that
it works without a close function.
Arnd
next prev parent reply other threads:[~2011-11-17 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 21:25 [PATCH 0/2] ramoops: use pstore interface Kees Cook
2011-11-16 21:25 ` [PATCH 1/2] " Kees Cook
2011-11-17 5:35 ` Chen Gong
2011-11-17 18:10 ` Kees Cook
2011-11-18 2:47 ` Chen Gong
2011-11-17 15:07 ` Arnd Bergmann [this message]
2011-11-17 18:19 ` Kees Cook
2011-11-16 21:25 ` [PATCH 2/2] ramoops: remove module parameters Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2011-11-18 19:31 [PATCH 0/2 v2] ramoops: use pstore interface Kees Cook
2011-11-18 19:31 ` [PATCH 1/2] " Kees Cook
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=201111171507.00699.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=bgardner@wabtec.com \
--cc=gregkh@suse.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
--cc=nicolas.pitre@linaro.org \
--cc=paul.gortmaker@windriver.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: 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.