On Tue, 26 Feb 2013 16:55:57 +0800
Zhang Yanfei wrote:
> ___ 2013___02___26___ 16:53, Andrew Morton __:
> > On Tue, 26 Feb 2013 16:49:02 +0800 Zhang Yanfei
> > wrote:
> >
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> >>> []
> @@ -822,13 +822,9 @@ static int kimage_load_normal_
于 2013年02月26日 16:53, Andrew Morton 写道:
> On Tue, 26 Feb 2013 16:49:02 +0800 Zhang Yanfei
> wrote:
>
diff --git a/kernel/kexec.c b/kernel/kexec.c
>>> []
@@ -822,13 +822,9 @@ static int kimage_load_normal_segment(struct kimage
*image,
>>> []
+ mchunk = min_t(size_t, m
On Tue, 26 Feb 2013 16:49:02 +0800 Zhang Yanfei
wrote:
> >> diff --git a/kernel/kexec.c b/kernel/kexec.c
> > []
> >> @@ -822,13 +822,9 @@ static int kimage_load_normal_segment(struct kimage
> >> *image,
> > []
> >> + mchunk = min_t(size_t, mbytes,
> >> + (size_t
于 2013年02月26日 16:38, Joe Perches 写道:
> On Tue, 2013-02-26 at 13:30 +0800, Zhang Yanfei wrote:
>> This is just a tweak: using min_t to simplify logic of variable
>> assignments.
>>
>> v3:
>> - cast type of (PAGE_SIZE - (maddr & ~PAGE_MASK)) into size_t.
>
> Why? Isn't this just a redundant cast?
>
On Tue, 2013-02-26 at 13:30 +0800, Zhang Yanfei wrote:
> This is just a tweak: using min_t to simplify logic of variable
> assignments.
>
> v3:
> - cast type of (PAGE_SIZE - (maddr & ~PAGE_MASK)) into size_t.
Why? Isn't this just a redundant cast?
> diff --git a/kernel/kexec.c b/kernel/kexec.c
This is just a tweak: using min_t to simplify logic of variable
assignments.
v3:
- cast type of (PAGE_SIZE - (maddr & ~PAGE_MASK)) into size_t.
v2:
- Rewrite patch description as Simon suggested.
- Fix an inappropriate if test introduced by v1. Thanks Simon.
Cc: "Eric W. Biederman"
Cc: Andrew M