<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 1:01 AM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr">I do not know. Maybe ask or post a patch?</div></div></blockquote><div class="gmail_default" style="font-size:small">I have sent a patch please take a look at it</div><div class="gmail_default" style="font-size:small"><a href="https://lists.rtems.org/pipermail/devel/2021-March/065610.html">https://lists.rtems.org/pipermail/devel/2021-March/065610.html</a><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"><div class="gmail_default" style="font-size:small"></div><br><blockquote type="cite">On 18 Mar 2021, at 2:14 am, Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 17 Mar 2021, 12:04 am Chris Johns, <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 17/3/21 2:14 am, Gedare Bloom wrote:<br>
> On Tue, Mar 16, 2021 at 1:15 AM Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com" rel="noreferrer" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br>
>> On Tue, 16 Mar 2021, 1:37 am Gedare Bloom, <<a href="mailto:gedare@rtems.org" rel="noreferrer" target="_blank">gedare@rtems.org</a>> wrote:<br>
>>><br>
>>> This one looks ok to me, Niteesh?<br>
>><br>
>> +1<br>
>><br>
>> The below question is not related to this patch.<br>
>><br>
>> Out of interest, I started going through the code and I am a bit confused in the following statement<br>
>><br>
>> <a href="https://git.rtems.org/rtems/tree/cpukit/libmisc/rtems-fdt/rtems-fdt.c#n574" rel="noreferrer noreferrer" target="_blank">https://git.rtems.org/rtems/tree/cpukit/libmisc/rtems-fdt/rtems-fdt.c#n574</a><br>
>><br>
>> This else block is reached when the FDT blob is not compressed, in this case the size variable is set to the file size since this is raw data.<br>
>><br>
>> In the while loop, we are looping on size, but we never modify the size. I think, line 583 should be<br>
>> size -= r;<br>
>> Instead of<br>
>> r -= size;<br>
>> Is this a bug??<br>
>> Or am I missing something?<br>
>><br>
> <br>
> it looks weird to me too. Chris?<br>
> <br>
<br>
That is a bug. Nice find.<br></blockquote></div></div><div dir="auto"><div style="font-size:small">Is someone working on a patch for this? If not I'll send one.</div><br></div><div dir="auto"><div style="font-size:small">Thanks,</div><div style="font-size:small">Niteesh.</div><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The use case for this call has an FPGA bitfile and the compressed FDT file in a<br>
single package.<br>
<br>
Thanks<br>
Chris<br>
<br>
</blockquote></div></div></div>
</div>
</div></blockquote></div></blockquote></div></div>