summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorJarod Wilson <jwilson@redhat.com>2008-01-23 21:05:45 (GMT)
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-01-30 21:22:28 (GMT)
commit8f9f963e5d9853dbc5fa5091f15ae64f423d3d89 (patch)
tree7b12f078f358d88e846e9e6e8e9b271d1bcb3db5 /drivers/firewire
parentf8d2dc39389d6ccc0def290dc4b7eb71d68645a2 (diff)
downloadlinux-8f9f963e5d9853dbc5fa5091f15ae64f423d3d89.tar.xz
firewire: replace subtraction with bitwise and
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>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index 8018c3b..7fcc59d 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -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;