Skip to contentSkip to conversation

strmhz: Make hz unsigned to support greater than 2146 MHz clock

PATCH New Kumar Gala 2 participants 2 messages Mar 5, 2011 – Mar 22, 2011 Library code

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

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.

---
 include/common.h |    2 +-
 lib/strmhz.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/common.h +1 -1
index d8c912d..893af5c 100644
@@ -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
index d6da1d1..89f2263 100644
@@ -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
#1 lore raw

PATCH 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 0x80000000 should print:

Quoted 8 lines

2147.484 instead of -2147.-483.

---
 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