From: Matthew Garrett <mjg@redhat.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, mikew@google.com,
tony.luck@intel.com, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 3/9] pstore: Make "part" unsigned
Date: Mon, 18 Jul 2011 16:30:27 -0400 [thread overview]
Message-ID: <1311021033-7483-4-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1311021033-7483-1-git-send-email-mjg@redhat.com>
We'll never have a negative part, so just make this an unsigned int.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/acpi/apei/erst.c | 8 ++++----
fs/pstore/platform.c | 3 ++-
include/linux/pstore.h | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 51cf7ba..2ca59dc 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -933,8 +933,8 @@ static int erst_open_pstore(struct pstore_info *psi);
static int erst_close_pstore(struct pstore_info *psi);
static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
struct timespec *time, struct pstore_info *psi);
-static u64 erst_writer(enum pstore_type_id type, int part, size_t size,
- struct pstore_info *psi);
+static u64 erst_writer(enum pstore_type_id type, unsigned int part,
+ size_t size, struct pstore_info *psi);
static int erst_clearer(enum pstore_type_id type, u64 id,
struct pstore_info *psi);
@@ -1040,8 +1040,8 @@ out:
return (rc < 0) ? rc : (len - sizeof(*rcd));
}
-static u64 erst_writer(enum pstore_type_id type, int part, size_t size,
- struct pstore_info *psi)
+static u64 erst_writer(enum pstore_type_id type, unsigned int part,
+ size_t size, struct pstore_info *psi)
{
struct cper_pstore_record *rcd = (struct cper_pstore_record *)
(erst_info.buf - sizeof(*rcd));
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 163bb40..49ff1de 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -67,7 +67,8 @@ static void pstore_dump(struct kmsg_dumper *dumper,
unsigned long size, total = 0;
char *dst, *why;
u64 id;
- int hsize, part = 1;
+ int hsize;
+ unsigned int part = 1;
if (reason < ARRAY_SIZE(reason_str))
why = reason_str[reason];
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 12be8f1..cc03bbf 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -39,7 +39,7 @@ struct pstore_info {
int (*close)(struct pstore_info *psi);
ssize_t (*read)(u64 *id, enum pstore_type_id *type,
struct timespec *time, struct pstore_info *psi);
- u64 (*write)(enum pstore_type_id type, int part,
+ u64 (*write)(enum pstore_type_id type, unsigned int part,
size_t size, struct pstore_info *psi);
int (*erase)(enum pstore_type_id type, u64 id,
struct pstore_info *psi);
--
1.7.6
next prev parent reply other threads:[~2011-07-18 20:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 20:30 Add an EFI pstore backend Matthew Garrett
2011-07-18 20:30 ` [PATCH 1/9] pstore: Extend API Matthew Garrett
2011-07-18 20:30 ` [PATCH 2/9] pstore: Add extra context for writes and erases Matthew Garrett
2011-07-18 20:30 ` Matthew Garrett [this message]
2011-07-18 20:30 ` [PATCH 4/9] pstore: Allow the user to explicitly choose a backend Matthew Garrett
2011-07-18 20:58 ` Tony Luck
2011-07-18 21:00 ` Matthew Garrett
2011-07-18 21:08 ` Tony Luck
2011-07-20 13:27 ` Konrad Rzeszutek Wilk
2011-07-20 14:29 ` Luck, Tony
2011-07-18 20:30 ` [PATCH 5/9] efi: Add support for using efivars as a pstore backend Matthew Garrett
2011-07-18 20:30 ` [PATCH 6/9] efivars: String functions Matthew Garrett
2011-07-18 20:30 ` [PATCH 7/9] efivars: introduce utf16_strncmp Matthew Garrett
2011-07-18 20:30 ` [PATCH 8/9] efivars: Use string functions in pstore_write Matthew Garrett
2011-07-18 20:30 ` [PATCH 9/9] efivars: Introduce PSTORE_EFI_ATTRIBUTES Matthew Garrett
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=1311021033-7483-4-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikew@google.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®