* [PATCH 1/1] of/fdt: simplify early_init_dt_verify
@ 2014-10-28 11:51 Zhen Lei
2014-11-04 16:20 ` Grant Likely
0 siblings, 1 reply; 6+ messages in thread
From: Zhen Lei @ 2014-10-28 11:51 UTC (permalink / raw)
To: Grant Likely, Rob Herring, devicetree, linux-kernel
Cc: Zefan Li, Xinwei Hu, Kefeng Wang, Zhen Lei
put off initial_boot_params = params; until all checks finished. If any check
failed, initial_boot_params is equal NULL, base upon bss segment initial value.
Signed-off-by: Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/of/fdt.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index d1ffca8..325c638 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -994,14 +994,12 @@ bool __init early_init_dt_verify(void *params)
if (!params)
return false;
- /* Setup flat device-tree pointer */
- initial_boot_params = params;
-
/* check device tree validity */
- if (fdt_check_header(params)) {
- initial_boot_params = NULL;
+ if (fdt_check_header(params))
return false;
- }
+
+ /* Setup flat device-tree pointer */
+ initial_boot_params = params;
return true;
}
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] of/fdt: simplify early_init_dt_verify
2014-10-28 11:51 [PATCH 1/1] of/fdt: simplify early_init_dt_verify Zhen Lei
@ 2014-11-04 16:20 ` Grant Likely
2014-11-04 17:03 ` Bjorn Helgaas
0 siblings, 1 reply; 6+ messages in thread
From: Grant Likely @ 2014-11-04 16:20 UTC (permalink / raw)
To: Rob Herring, devicetree, linux-kernel, Bjorn Helgaas
Cc: Zefan Li, Xinwei Hu, Kefeng Wang, Zhen Lei
On Tue, 28 Oct 2014 19:51:05 +0800
, Zhen Lei <thunder.leizhen@huawei.com>
wrote:
> put off initial_boot_params = params; until all checks finished. If any check
> failed, initial_boot_params is equal NULL, base upon bss segment initial value.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Interesting. I received exactly the same patch from Bjorn Helgaas. Were
the two of you working together, or is this merely a coincedence?
g.
> ---
> drivers/of/fdt.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index d1ffca8..325c638 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -994,14 +994,12 @@ bool __init early_init_dt_verify(void *params)
> if (!params)
> return false;
>
> - /* Setup flat device-tree pointer */
> - initial_boot_params = params;
> -
> /* check device tree validity */
> - if (fdt_check_header(params)) {
> - initial_boot_params = NULL;
> + if (fdt_check_header(params))
> return false;
> - }
> +
> + /* Setup flat device-tree pointer */
> + initial_boot_params = params;
>
> return true;
> }
> --
> 1.8.0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] of/fdt: simplify early_init_dt_verify
2014-11-04 16:20 ` Grant Likely
@ 2014-11-04 17:03 ` Bjorn Helgaas
[not found] ` <CAErSpo6Upf=QPn7=Cd=XDazXVnSPhb-9gDZjH9_CcY37-xUKLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2014-11-04 17:03 UTC (permalink / raw)
To: Grant Likely
Cc: Zhen Lei, Rob Herring, devicetree, linux-kernel, Zefan Li,
Xinwei Hu, Kefeng Wang
On Tue, Nov 4, 2014 at 9:20 AM, Grant Likely <grant.likely@linaro.org> wrote:
> On Tue, 28 Oct 2014 19:51:05 +0800
> , Zhen Lei <thunder.leizhen@huawei.com>
> wrote:
>> put off initial_boot_params = params; until all checks finished. If any check
>> failed, initial_boot_params is equal NULL, base upon bss segment initial value.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>
> Interesting. I received exactly the same patch from Bjorn Helgaas. Were
> the two of you working together, or is this merely a coincedence?
LOL, that's really funny. We're not working together, so it's a total
coincidence :)
>> ---
>> drivers/of/fdt.c | 10 ++++------
>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index d1ffca8..325c638 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -994,14 +994,12 @@ bool __init early_init_dt_verify(void *params)
>> if (!params)
>> return false;
>>
>> - /* Setup flat device-tree pointer */
>> - initial_boot_params = params;
>> -
>> /* check device tree validity */
>> - if (fdt_check_header(params)) {
>> - initial_boot_params = NULL;
>> + if (fdt_check_header(params))
>> return false;
>> - }
>> +
>> + /* Setup flat device-tree pointer */
>> + initial_boot_params = params;
>>
>> return true;
>> }
>> --
>> 1.8.0
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] of/fdt: simplify early_init_dt_verify
[not found] ` <CAErSpo6Upf=QPn7=Cd=XDazXVnSPhb-9gDZjH9_CcY37-xUKLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-11-05 0:49 ` leizhen
[not found] ` <5459740B.6000906-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: leizhen @ 2014-11-05 0:49 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Grant Likely, Rob Herring, devicetree, linux-kernel, Zefan Li,
Xinwei Hu, Kefeng Wang
On 2014/11/5 1:03, Bjorn Helgaas wrote:
> On Tue, Nov 4, 2014 at 9:20 AM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>> On Tue, 28 Oct 2014 19:51:05 +0800
>> , Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>> wrote:
>>> put off initial_boot_params = params; until all checks finished. If any check
>>> failed, initial_boot_params is equal NULL, base upon bss segment initial value.
>>>
>>> Signed-off-by: Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>
>> Interesting. I received exactly the same patch from Bjorn Helgaas. Were
>> the two of you working together, or is this merely a coincedence?
>
> LOL, that's really funny. We're not working together, so it's a total
> coincidence :)
>
Haha!!!
Hi, Bjorn Helgaas. Nice to meet you.
>>> ---
>>> drivers/of/fdt.c | 10 ++++------
>>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>>> index d1ffca8..325c638 100644
>>> --- a/drivers/of/fdt.c
>>> +++ b/drivers/of/fdt.c
>>> @@ -994,14 +994,12 @@ bool __init early_init_dt_verify(void *params)
>>> if (!params)
>>> return false;
>>>
>>> - /* Setup flat device-tree pointer */
>>> - initial_boot_params = params;
>>> -
>>> /* check device tree validity */
>>> - if (fdt_check_header(params)) {
>>> - initial_boot_params = NULL;
>>> + if (fdt_check_header(params))
>>> return false;
>>> - }
>>> +
>>> + /* Setup flat device-tree pointer */
>>> + initial_boot_params = params;
>>>
>>> return true;
>>> }
>>> --
>>> 1.8.0
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at http://www.tux.org/lkml/
>>
>
> .
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] of/fdt: simplify early_init_dt_verify
[not found] ` <5459740B.6000906-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2014-11-05 13:52 ` Grant Likely
[not found] ` <CACxGe6tkOWtqtt9nVk2R=NqsEVZBDCV-1deVhEXf1pAGS7YhFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Grant Likely @ 2014-11-05 13:52 UTC (permalink / raw)
To: leizhen
Cc: Bjorn Helgaas, Rob Herring, devicetree, linux-kernel, Zefan Li,
Xinwei Hu, Kefeng Wang
On Wed, Nov 5, 2014 at 12:49 AM, leizhen <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
> On 2014/11/5 1:03, Bjorn Helgaas wrote:
>> On Tue, Nov 4, 2014 at 9:20 AM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>>> On Tue, 28 Oct 2014 19:51:05 +0800
>>> , Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> wrote:
>>>> put off initial_boot_params = params; until all checks finished. If any check
>>>> failed, initial_boot_params is equal NULL, base upon bss segment initial value.
>>>>
>>>> Signed-off-by: Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>>
>>> Interesting. I received exactly the same patch from Bjorn Helgaas. Were
>>> the two of you working together, or is this merely a coincedence?
>>
>> LOL, that's really funny. We're not working together, so it's a total
>> coincidence :)
>>
> Haha!!!
>
> Hi, Bjorn Helgaas. Nice to meet you.
I've applied Bjorn's version, but since the diffstat is *identical*,
I've put both of your s-o-b lines into it.
BTW Lei, what prompted you to write this patch? Was there a bug you
were fixing, or did you just notice the inconsistency and decide to
fix it?
g.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] of/fdt: simplify early_init_dt_verify
[not found] ` <CACxGe6tkOWtqtt9nVk2R=NqsEVZBDCV-1deVhEXf1pAGS7YhFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-11-06 0:59 ` leizhen
0 siblings, 0 replies; 6+ messages in thread
From: leizhen @ 2014-11-06 0:59 UTC (permalink / raw)
To: Grant Likely
Cc: Bjorn Helgaas, Rob Herring, devicetree, linux-kernel, Zefan Li,
Xinwei Hu, Kefeng Wang
On 2014/11/5 21:52, Grant Likely wrote:
> On Wed, Nov 5, 2014 at 12:49 AM, leizhen <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
>> On 2014/11/5 1:03, Bjorn Helgaas wrote:
>>> On Tue, Nov 4, 2014 at 9:20 AM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>>>> On Tue, 28 Oct 2014 19:51:05 +0800
>>>> , Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>>> wrote:
>>>>> put off initial_boot_params = params; until all checks finished. If any check
>>>>> failed, initial_boot_params is equal NULL, base upon bss segment initial value.
>>>>>
>>>>> Signed-off-by: Zhen Lei <thunder.leizhen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>>>
>>>> Interesting. I received exactly the same patch from Bjorn Helgaas. Were
>>>> the two of you working together, or is this merely a coincedence?
>>>
>>> LOL, that's really funny. We're not working together, so it's a total
>>> coincidence :)
>>>
>> Haha!!!
>>
>> Hi, Bjorn Helgaas. Nice to meet you.
>
> I've applied Bjorn's version, but since the diffstat is *identical*,
> I've put both of your s-o-b lines into it.
>
> BTW Lei, what prompted you to write this patch? Was there a bug you
> were fixing, or did you just notice the inconsistency and decide to
> fix it?
>
> g.
>
> .
>
OK
The latter case. Just found it when I reading code.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-06 0:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 11:51 [PATCH 1/1] of/fdt: simplify early_init_dt_verify Zhen Lei
2014-11-04 16:20 ` Grant Likely
2014-11-04 17:03 ` Bjorn Helgaas
[not found] ` <CAErSpo6Upf=QPn7=Cd=XDazXVnSPhb-9gDZjH9_CcY37-xUKLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-05 0:49 ` leizhen
[not found] ` <5459740B.6000906-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-11-05 13:52 ` Grant Likely
[not found] ` <CACxGe6tkOWtqtt9nVk2R=NqsEVZBDCV-1deVhEXf1pAGS7YhFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-06 0:59 ` leizhen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).