public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Dan Carpenter <error27@gmail.com>,
	Amerigo Wang <amwang@redhat.com>,
	linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	akpm@linux-foundation.org, Andi Kleen <andi@firstfloor.org>,
	Neil Horman <nhorman@redhat.com>
Subject: Re: [Resend Patch] kexec: allow to shrink reserved memory
Date: Tue, 24 Nov 2009 16:50:50 +0800	[thread overview]
Message-ID: <4B0B9E6A.2000000@redhat.com> (raw)
In-Reply-To: <20091124075813.GA14488@bicker>

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

Dan Carpenter wrote:
> On Mon, Nov 23, 2009 at 04:37:02AM -0500, Amerigo Wang wrote:
> [snip]
>> +size_t crash_get_memory_size(void);
> [snip]
>> +static ssize_t kexec_crash_size_show(struct kobject *kobj,
>> +				       struct kobj_attribute *attr, char *buf)
>> +{
>> +	return sprintf(buf, "%lu\n", crash_get_memory_size());
>> +}
> 
>   CC      kernel/ksysfs.o
> kernel/ksysfs.c: In function ‘kexec_crash_size_show’:
> kernel/ksysfs.c:106: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’
> 

Patch below fixes this.

Andrew, could you please fold it in? Thanks!


[-- Attachment #2: kexec-free-reserved-memory-delta-fix.diff --]
[-- Type: text/plain, Size: 507 bytes --]

diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 5b9276b..3feaf5a 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -103,7 +103,7 @@ KERNEL_ATTR_RO(kexec_crash_loaded);
 static ssize_t kexec_crash_size_show(struct kobject *kobj,
 				       struct kobj_attribute *attr, char *buf)
 {
-	return sprintf(buf, "%lu\n", crash_get_memory_size());
+	return sprintf(buf, "%zu\n", crash_get_memory_size());
 }
 static ssize_t kexec_crash_size_store(struct kobject *kobj,
 				   struct kobj_attribute *attr,

      parent reply	other threads:[~2009-11-24  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23  9:37 [Resend Patch] kexec: allow to shrink reserved memory Amerigo Wang
2009-11-23 19:41 ` Eric W. Biederman
2009-11-24  7:58 ` Dan Carpenter
2009-11-24  8:37   ` Cong Wang
2009-11-24  8:50   ` Cong Wang [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=4B0B9E6A.2000000@redhat.com \
    --to=amwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=ebiederm@xmission.com \
    --cc=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox