Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jarod Wilson and committed by
Stefan Richter
8f9f963e f8d2dc39

+1 -1
+1 -1
drivers/firewire/fw-transaction.c
··· 153 153 int ext_tcode; 154 154 155 155 if (tcode > 0x10) { 156 - ext_tcode = tcode - 0x10; 156 + ext_tcode = tcode & ~0x10; 157 157 tcode = TCODE_LOCK_REQUEST; 158 158 } else 159 159 ext_tcode = 0;