Re: [PATCH v2] ppc/fadump: collect dump if the collected size is lesser than reserved

Sourabh Jain <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded
Message-ID <04f38671-f894-40ef-94b2-f24e2bd42474__21135.6088215084$1787814608$gmane$org@linux.ibm.com>

On 27/08/26 12:06, Shivang Upadhyay wrote:
> On Thu, 2026-08-27 at 11:05 +0530, Sourabh Jain wrote:
>>> bytes_dumped <= source_len));
>> Do we really need region_collected variable? Can't we manage with rc
>> only?
>>
>> Is bytes_dumped < source_len is good enough instead of <=. There are
>> a
>> couple of warnings/errors reported by the checkpatch script.
>> Please address them in the next version.
>>
>> - Sourabh Jain
>>
> Hi Sourabh,
>
> bytes_dumped < source_len should also be correct, but "<=" is more
> expressive. Why not leave such optimizations to compiler.
>
> For the region_collected, RC should be used to manage the return code,
> so I as per me it is more appropriate to use new variable here. Or
> maybe, type the condition in the bracket itself(?).

Yes this also works.

- Sourabh Jain

>
> Thanks for pointing out the checkpatch bugs, I'll send a revision soon.
>
> ~Shivang.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.