From: Jarod Wilson Date: Sat, 8 Mar 2008 18:18:58 +0000 (-0500) Subject: firewire: use bitwise and to get reg in handle_registers X-Git-Tag: v2.6.26-rc1~1141^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15f0d833f63da2fa49aed81480a37d5e896b5b9b;p=linux-2.6 firewire: use bitwise and to get reg in handle_registers for code efficiency. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 47bfe76125..3682e75a09 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -797,7 +797,7 @@ handle_registers(struct fw_card *card, struct fw_request *request, unsigned long long offset, void *payload, size_t length, void *callback_data) { - int reg = offset - CSR_REGISTER_BASE; + int reg = offset & ~CSR_REGISTER_BASE; unsigned long long bus_time; __be32 *data = payload;