summaryrefslogtreecommitdiff
path: root/tools/intel_gpu_top.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-09 23:22:21 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-09 23:38:29 +0100
commit904bcab7ba884605e2e99264482c6c5383025b19 (patch)
tree378adb3e3932eebdc6fc2ca1717001d1198e3e5a /tools/intel_gpu_top.c
parent2ca6c6b4fdd09b99b2456923926cc8d85316f301 (diff)
tools/intel_gpu_top: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tools/intel_gpu_top.c')
-rw-r--r--tools/intel_gpu_top.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 033ba53b..bad47942 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -60,7 +60,6 @@ struct top_bit {
struct top_bit *top_bits_sorted[MAX_NUM_TOP_BITS];
static uint32_t instdone, instdone1;
-static uint32_t devid;
static const char *bars[] = {
" ",
@@ -153,7 +152,7 @@ update_idle_bit(struct top_bit *top_bit)
}
static void
-print_clock(char *name, int clock) {
+print_clock(const char *name, int clock) {
if (clock == -1)
printf("%s clock: unknown", name);
else
@@ -406,6 +405,7 @@ usage(const char *appname)
int main(int argc, char **argv)
{
+ uint32_t devid;
struct pci_device *pci_dev;
struct ring render_ring = {
.name = "render",
@@ -540,6 +540,8 @@ int main(int argc, char **argv)
unsigned long long t1, ti, tf, t2;
unsigned long long def_sleep = 1000000 / samples_per_sec;
unsigned long long last_samples_per_sec = samples_per_sec;
+ unsigned short int max_lines;
+ struct winsize ws;
char clear_screen[] = {0x1b, '[', 'H',
0x1b, '[', 'J',
0x0};
@@ -601,8 +603,7 @@ int main(int argc, char **argv)
/* Limit the number of lines printed to the terminal height so the
* most important info (at the top) will stay on screen. */
- unsigned short int max_lines = -1;
- struct winsize ws;
+ max_lines = -1;
if (ioctl(0, TIOCGWINSZ, &ws) != -1)
max_lines = ws.ws_row - 6; /* exclude header lines */
if (max_lines >= num_instdone_bits)