summaryrefslogtreecommitdiff
path: root/avivotool.c
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-08-23 19:50:09 +0200
committerTormod Volden <debian.tormod@gmail.com>2011-10-03 23:31:31 +0200
commit5502c6d3a2b45b8797e6956a67f86bdd6127c441 (patch)
tree1a7a66e67a8576abafb65fff29019e55c5b70efc /avivotool.c
parent250bdba87421792076a944777bf4161a4d17e1f6 (diff)
Fix string format mismatch warningsupstream-patches
Consistently use int for register values and long for register offsets. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Diffstat (limited to 'avivotool.c')
-rw-r--r--avivotool.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/avivotool.c b/avivotool.c
index c555083..f957d9a 100644
--- a/avivotool.c
+++ b/avivotool.c
@@ -938,7 +938,7 @@ void eg_cmd_regs(const char *type)
int show_all = (strcmp(type, "all") == 0);
int show_mc = (show_all || strstr(type, "mc"));
int show_grphs = 0;
- int i;
+ unsigned long i;
uint32_t tmp, tmp1;
char tmpname[10];
@@ -963,7 +963,7 @@ void eg_cmd_regs(const char *type)
if (tmp & 0x1)
show_grphs |= (1 << i);
- printf("D%dCRTC: %s, Cursor %s\n", i+1, tmp & 0x1 ? "Enabled" : "Disabled",
+ printf("D%ldCRTC: %s, Cursor %s\n", i+1, tmp & 0x1 ? "Enabled" : "Disabled",
tmp1 & 0x1 ? "Enabled" : "Disabled");
if (!(tmp & 0x1))
continue;
@@ -980,7 +980,7 @@ void eg_cmd_regs(const char *type)
if (!(show_grphs & (1 << i)))
continue;
- snprintf(tmpname, 10, "D%dGRPH", i+1);
+ snprintf(tmpname, 10, "D%ldGRPH", i+1);
tmp = EG_GET_MODE_REG(i, EVERGREEN_GRPH_ENABLE);
if (!(tmp & 0x1)) {
printf("\n%s: disabled\n", tmpname, i);
@@ -1017,7 +1017,7 @@ void eg_cmd_regs(const char *type)
if (!(tmp & 0x1))
continue;
- snprintf(tmpname, 10, "D%dCUR", i+1);
+ snprintf(tmpname, 10, "D%ldCUR", i+1);
radeon_show_reg_bits(tmpname, "CONTROL", 0, 0,
EVERGREEN_CUR_CONTROL,
0, 0, "Enable",
@@ -1052,9 +1052,9 @@ void eg_cmd_regs(const char *type)
SHOW_UNKNOWN_REG(i);
for (i = 0x6420 ; i < 0x647c; i+=4)
SHOW_UNKNOWN_REG(i);
- SHOW_UNKNOWN_REG(0x6590);
- SHOW_UNKNOWN_REG(0x65b4);
- SHOW_UNKNOWN_REG(0x65cc);
+ SHOW_UNKNOWN_REG(0x6590L);
+ SHOW_UNKNOWN_REG(0x65b4L);
+ SHOW_UNKNOWN_REG(0x65ccL);
for (i = 0x6660 ; i <= 0x66dc; i+=4)
SHOW_UNKNOWN_REG(i);
@@ -1223,11 +1223,11 @@ void radeon_cmd_regs(const char *type)
SHOW_UNKNOWN_REG(i);
/* dump a bunch of the MC regs */
-#define SHOW_UNK_MC_REG(r) printf("%02x\t%08x\n", r, radeon_get_indexed(AVIVO_MC_INDEX, AVIVO_MC_DATA, (r | 0x007f0000), #r))
+#define SHOW_UNK_MC_REG(r) printf("%02lx\t%08x\n", r, radeon_get_indexed(AVIVO_MC_INDEX, AVIVO_MC_DATA, (r | 0x007f0000), #r))
for (i = 0; i < 0x92; i++)
SHOW_UNK_MC_REG(i);
-#define SHOW_UNK_CLK_REG(r) printf("%02x\t%08x\n", r, radeon_get_indexed(RADEON_CLOCK_CNTL_INDEX, RADEON_CLOCK_CNTL_DATA, (r), #r))
+#define SHOW_UNK_CLK_REG(r) printf("%02lx\t%08x\n", r, radeon_get_indexed(RADEON_CLOCK_CNTL_INDEX, RADEON_CLOCK_CNTL_DATA, (r), #r))
for (i = 0; i < 0x20; i++)
SHOW_UNK_CLK_REG(i);
return;