On 3/18/24 5:18 PM, Laurent Pinchart wrote:
@@ -142,7 +140,7 @@ phys_size_t env_get_bootm_size(void)
s = env_get("bootm_low");
if (s)
- tmp = (phys_size_t)simple_strtoull(s, NULL, 16);
+ tmp = simple_strtoull(s, NULL, 16);
else
tmp = start;
Maybe you could even drop the tmp variable completely by writing this
if (s)
size -= simple_strtoull(s, NULL, 16) - start;
return size;
I've never liked variables named tmp :-)
No, let's not do this. With this FDT part, the code should be verbose
and as easy to understand at first glance as possible, no subtraction
assignments and other shenanigans please.