[PATCH v2 0/2] Fix format specifier for net_boot_file_size

Siddharth Vadapalli s-vadapalli at ti.com
Mon Aug 14 06:53:46 CEST 2023


This series fixes the format specifier for printing the decimal value of
the variable "net_boot_file_size", changing it from "%d" to "%u". With
the format specifier being "%d", for large file sizes, the value
displayed is negative. Using "%u" fixes this.

Additionally, as reported by Tom Rini <trini at konsulko.com> in the mail
thread corresponding to the v1 patch of this series, the documentation
for the printf format specifiers needs to be fixed for the "unsigned
int" variable. Thus, update the documentation as well.



Changes since v1:
- Use "%u" instead of "%lu" to display the decimal value of the u32
  variable "net_boot_file_size", as suggested by Tom Rini.
- Add a new patch to update the documentation for printf format
  specifiers, changing the format specifier from "%d" to "%u" for the
  "unsigned int" variable, as reported by Tom Rini.

Siddharth Vadapalli (2):
  net: Fix the displayed value of bytes transferred
  doc: printf() codes: Fix format specifier for unsigned int

 doc/develop/printf.rst | 2 +-
 net/net.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


More information about the U-Boot mailing list