diff options
author | John McDermott <john.mcdermott@nrl.navy.mil> | 2012-02-23 10:35:41 +0000 |
---|---|---|
committer | John McDermott <john.mcdermott@nrl.navy.mil> | 2012-02-23 10:35:41 +0000 |
commit | 7a0bc6c7bf2725f12ec74283a667709634d48447 (patch) | |
tree | e0ffbd8c1e86216ab052845c01e7e4406a271c67 /extras | |
parent | 83d0b0ae823f63ef148bde78d18ce1f2c1f69d3a (diff) | |
download | xen-7a0bc6c7bf2725f12ec74283a667709634d48447.tar.gz xen-7a0bc6c7bf2725f12ec74283a667709634d48447.tar.bz2 xen-7a0bc6c7bf2725f12ec74283a667709634d48447.zip |
mini-os: stop compiler complaint about unused variables
gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) complains about unused
variables
in mini-os drivers
Signed-off-by: John McDermott <john.mcdermott@nrl.navy.mil>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 24743:86f2630d62a9
xen-unstable date: Thu Feb 09 16:03:05 2012 +0000
minios: Remove unused variables warnings
s/DEBUG/printk/ in test_xenbus and all associated
do_*_test+xenbus_dbg_message
and always print the IRQ and MFN used by the xenbus on init.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: John McDermott <john.mcdermott@nrl.navy.mil>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 24844:c78636d15ac5
xen-unstable date: Mon Feb 20 18:48:32 2012 +0000
Backported-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/mini-os/blkfront.c | 1 | ||||
-rw-r--r-- | extras/mini-os/console/xencons_ring.c | 1 | ||||
-rw-r--r-- | extras/mini-os/fbfront.c | 2 | ||||
-rw-r--r-- | extras/mini-os/netfront.c | 1 | ||||
-rw-r--r-- | extras/mini-os/pcifront.c | 1 | ||||
-rw-r--r-- | extras/mini-os/xenbus/xenbus.c | 42 |
6 files changed, 27 insertions, 21 deletions
diff --git a/extras/mini-os/blkfront.c b/extras/mini-os/blkfront.c index 695d8e65ee..4bdfc2f775 100644 --- a/extras/mini-os/blkfront.c +++ b/extras/mini-os/blkfront.c @@ -171,6 +171,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: diff --git a/extras/mini-os/console/xencons_ring.c b/extras/mini-os/console/xencons_ring.c index 22fd6187bc..9ed37567fd 100644 --- a/extras/mini-os/console/xencons_ring.c +++ b/extras/mini-os/console/xencons_ring.c @@ -317,6 +317,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c index 8d03e5be5a..21b7e695fe 100644 --- a/extras/mini-os/fbfront.c +++ b/extras/mini-os/fbfront.c @@ -142,6 +142,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: @@ -503,6 +504,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c index fd049a5cef..6fa68a2d97 100644 --- a/extras/mini-os/netfront.c +++ b/extras/mini-os/netfront.c @@ -421,6 +421,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c index 889d701271..a8c8465901 100644 --- a/extras/mini-os/pcifront.c +++ b/extras/mini-os/pcifront.c @@ -222,6 +222,7 @@ again: abort_transaction: free(err); err = xenbus_transaction_end(xbt, 1, &retry); + printk("Abort transaction %s\n", message); goto error; done: diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index a8081fd943..cbaeffd967 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -328,7 +328,6 @@ static int allocate_xenbus_id(void) void init_xenbus(void) { int err; - printk("Initialising xenbus\n"); DEBUG("init_xenbus called.\n"); xenstore_buf = mfn_to_virt(start_info.store_mfn); create_thread("xenstore", xenbus_thread_func, NULL); @@ -337,7 +336,8 @@ void init_xenbus(void) xenbus_evtchn_handler, NULL); unmask_evtchn(start_info.store_evtchn); - DEBUG("xenbus on irq %d\n", err); + printk("xenbus initialised on irq %d mfn %#lx\n", + err, start_info.store_mfn); } void fini_xenbus(void) @@ -478,7 +478,7 @@ static void xenbus_debug_msg(const char *msg) struct xsd_sockmsg *reply; reply = xenbus_msg_reply(XS_DEBUG, 0, req, ARRAY_SIZE(req)); - DEBUG("Got a reply, type %d, id %d, len %d.\n", + printk("Got a reply, type %d, id %d, len %d.\n", reply->type, reply->req_id, reply->len); } @@ -752,16 +752,16 @@ static void do_ls_test(const char *pre) char **dirs, *msg; int x; - DEBUG("ls %s...\n", pre); + printk("ls %s...\n", pre); msg = xenbus_ls(XBT_NIL, pre, &dirs); if (msg) { - DEBUG("Error in xenbus ls: %s\n", msg); + printk("Error in xenbus ls: %s\n", msg); free(msg); return; } for (x = 0; dirs[x]; x++) { - DEBUG("ls %s[%d] -> %s\n", pre, x, dirs[x]); + printk("ls %s[%d] -> %s\n", pre, x, dirs[x]); free(dirs[x]); } free(dirs); @@ -770,68 +770,68 @@ static void do_ls_test(const char *pre) static void do_read_test(const char *path) { char *res, *msg; - DEBUG("Read %s...\n", path); + printk("Read %s...\n", path); msg = xenbus_read(XBT_NIL, path, &res); if (msg) { - DEBUG("Error in xenbus read: %s\n", msg); + printk("Error in xenbus read: %s\n", msg); free(msg); return; } - DEBUG("Read %s -> %s.\n", path, res); + printk("Read %s -> %s.\n", path, res); free(res); } static void do_write_test(const char *path, const char *val) { char *msg; - DEBUG("Write %s to %s...\n", val, path); + printk("Write %s to %s...\n", val, path); msg = xenbus_write(XBT_NIL, path, val); if (msg) { - DEBUG("Result %s\n", msg); + printk("Result %s\n", msg); free(msg); } else { - DEBUG("Success.\n"); + printk("Success.\n"); } } static void do_rm_test(const char *path) { char *msg; - DEBUG("rm %s...\n", path); + printk("rm %s...\n", path); msg = xenbus_rm(XBT_NIL, path); if (msg) { - DEBUG("Result %s\n", msg); + printk("Result %s\n", msg); free(msg); } else { - DEBUG("Success.\n"); + printk("Success.\n"); } } /* Simple testing thing */ void test_xenbus(void) { - DEBUG("Doing xenbus test.\n"); + printk("Doing xenbus test.\n"); xenbus_debug_msg("Testing xenbus...\n"); - DEBUG("Doing ls test.\n"); + printk("Doing ls test.\n"); do_ls_test("device"); do_ls_test("device/vif"); do_ls_test("device/vif/0"); - DEBUG("Doing read test.\n"); + printk("Doing read test.\n"); do_read_test("device/vif/0/mac"); do_read_test("device/vif/0/backend"); - DEBUG("Doing write test.\n"); + printk("Doing write test.\n"); do_write_test("device/vif/0/flibble", "flobble"); do_read_test("device/vif/0/flibble"); do_write_test("device/vif/0/flibble", "widget"); do_read_test("device/vif/0/flibble"); - DEBUG("Doing rm test.\n"); + printk("Doing rm test.\n"); do_rm_test("device/vif/0/flibble"); do_read_test("device/vif/0/flibble"); - DEBUG("(Should have said ENOENT)\n"); + printk("(Should have said ENOENT)\n"); } /* |