firewire: replace subtraction with bitwise and
authorJarod Wilson <jwilson@redhat.com>
Wed, 23 Jan 2008 21:05:45 +0000 (16:05 -0500)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 30 Jan 2008 21:22:28 +0000 (22:22 +0100)
Replace an unnecessary subtraction with a bitwise AND when determining the
value of ext_tcode in fw_fill_transaction() to save a cpu cycle or two in a
somewhat critical path.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-transaction.c

index 8018c3b..7fcc59d 100644 (file)
@@ -153,7 +153,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,
        int ext_tcode;
 
        if (tcode > 0x10) {
-               ext_tcode = tcode 0x10;
+               ext_tcode = tcode & ~0x10;
                tcode = TCODE_LOCK_REQUEST;
        } else
                ext_tcode = 0;