Skip to content

Commit

Permalink
firewire: replace subtraction with bitwise and
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarod Wilson authored and Stefan Richter committed Jan 30, 2008
1 parent f8d2dc3 commit 8f9f963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firewire/fw-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f9f963

Please sign in to comment.