strmhz: Make hz unsigned to support greater than 2146 MHz clock
PATCH 1/1 strmhz: Make hz unsigned to support greater than 2146 MHz clock
From: Ed Swarthout <[email protected]>
For example, an input of 0x80000000 should print:
2147.484 instead of -2147.-483.
Signed-off-by Ed Swarthout <[email protected]>
Signed-off-by Kumar Gala <[email protected]>
--- include/common.h | 2 +- lib/strmhz.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/common.h +1 -1
@@ -648,7 +648,7 @@ int sprintf(char * buf, const char *fmt, ...)int vsprintf (char *buf,const char *fmt,va_list args);/* lib/strmhz.c */ -char *strmhz (char *buf,long hz); +char *strmhz (char *buf,unsigned long hz);/* lib/crc32.c */ #include <u-boot/crc.h>
lib/strmhz.c +1 -1
@@ -22,7 +22,7 @@*/ #include <common.h> -char *strmhz (char *buf,long hz) +char *strmhz (char *buf,unsigned long hz) {long l, n;long m;
Signature · 1 line
1.7.2.3
Wolfgang Denk
AppliedPATCH 1/1 strmhz: Make hz unsigned to support greater than 2146 MHz clock
Dear Kumar Gala,
Quoted 4 lines · In message <[email protected]> you…
From: Ed Swarthout <[email protected]>
For example, an input of
0x80000000should print:
Quoted 8 lines
2147.484 instead of -2147.-483.
Signed-off-by Ed Swarthout <[email protected]>Signed-off-by Kumar Gala <[email protected]>--- include/common.h | 2 +- lib/strmhz.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "We don't have to protect the environment -- the Second Coming is at hand." - James Watt