]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: ohci: optimize find_branch_descriptor()
authorClemens Ladisch <clemens@ladisch.de>
Tue, 12 Apr 2011 05:54:59 +0000 (07:54 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 19 Apr 2011 18:00:11 +0000 (20:00 +0200)
commit13118aa98f35976c089679ae4c8b5895ef113c13
tree37261139bea74569bf4a41bccd5d47d4b406b6a3
parent9bbfac75005af60dc1f75109ff1eab7aa2a19b3b
firewire: ohci: optimize find_branch_descriptor()

When z==2, the condition "key == 2" is superfluous because it cannot
occur without "b == 3", as a descriptor with b!=3 and key==2 would be
an OUTPUT_MORE_IMMEDIATE descriptor which cannot be used alone.

Also remove magic numbers and needless computations on the b field.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c