]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
firewire: core: remove unused variable
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 14 Jun 2010 23:22:45 +0000 (01:22 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 19 Jun 2010 11:01:41 +0000 (13:01 +0200)
which caused gcc 4.6 to warn about
    variable 'destination' set but not used.

Since the hardware ensures that we receive only response packets with
proper destination node ID (in a given bus generation), we have no use
for destination here in the core as well as in upper layers.

(This is different with request packets.  There we pass destination node
ID to upper layers because they may for example need to check whether
this was an unicast or broadcast request.)

Reported-and-Tested-By: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-transaction.c

index 182da69eae446552d8d440396cea68ffbef6c669..cb6390fe36863b0c781b2feaa8f97531c4f93b1d 100644 (file)
@@ -881,13 +881,12 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
        unsigned long flags;
        u32 *data;
        size_t data_length;
-       int tcode, tlabel, destination, source, rcode;
+       int tcode, tlabel, source, rcode;
 
-       tcode       = HEADER_GET_TCODE(p->header[0]);
-       tlabel      = HEADER_GET_TLABEL(p->header[0]);
-       destination = HEADER_GET_DESTINATION(p->header[0]);
-       source      = HEADER_GET_SOURCE(p->header[1]);
-       rcode       = HEADER_GET_RCODE(p->header[1]);
+       tcode   = HEADER_GET_TCODE(p->header[0]);
+       tlabel  = HEADER_GET_TLABEL(p->header[0]);
+       source  = HEADER_GET_SOURCE(p->header[1]);
+       rcode   = HEADER_GET_RCODE(p->header[1]);
 
        spin_lock_irqsave(&card->lock, flags);
        list_for_each_entry(t, &card->transaction_list, link) {