[PATCH 3/3] boot: fdt: Move usable variable below updated comment

Marek Vasut marek.vasut at mailbox.org
Sun Mar 17 18:08:24 CET 2024


On 3/17/24 12:29 PM, Laurent Pinchart wrote:
> Hi Marek,
> 
> Thank you for the patch.
> 
> On Sun, Mar 17, 2024 at 07:16:31AM +0100, Marek Vasut wrote:
>> Move the variable below comment which explains what the variable means.
>> Update the comment. No functional change.
>>
>> Suggested-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
>> ---
>> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> Cc: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
>> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> Cc: Tom Rini <trini at konsulko.com>
>> ---
>>   boot/image-fdt.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/boot/image-fdt.c b/boot/image-fdt.c
>> index c37442c9130..16cd15e7e44 100644
>> --- a/boot/image-fdt.c
>> +++ b/boot/image-fdt.c
>> @@ -218,12 +218,12 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
>>   			if (start + size < low)
>>   				continue;
>>   
>> -			usable = min(start + size, low + mapsize);
>> -
>>   			/*
>>   			 * At least part of this DRAM bank is usable, try
>> -			 * using it for LMB allocation.
>> +			 * using the the DRAM bank up to $usable address
> 
> s/the the/the/
> 
> Is it a u-boot convention to write $variable to refer to a variable in
> comments ?

I don't think there is any convention so far, but some convention would 
be good to discern what is a variable and what is a regular word, esp. 
since 'usable' appears in both forms in the comment. Kerneldoc @usable 
could be an option, shell $usable could also be an option.


More information about the U-Boot mailing list