ieee1394: add preprocessor constant for invalid csr address
Replace occurrences of the magic value ~(u64)0 for invalid
CSR address spaces by a named constant for better readability.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
index 29c5255..165dcd6 100644
--- a/drivers/ieee1394/highlevel.c
+++ b/drivers/ieee1394/highlevel.c
@@ -301,7 +301,7 @@
{
struct hpsb_address_serve *as, *a1, *a2;
struct list_head *entry;
- u64 retval = ~0ULL;
+ u64 retval = CSR1212_INVALID_ADDR_SPACE;
unsigned long flags;
u64 align_mask = ~(alignment - 1);
@@ -314,9 +314,10 @@
/* default range,
* avoids controller's posted write area (see OHCI 1.1 clause 1.5) */
- if (start == ~0ULL && end == ~0ULL) {
+ if (start == CSR1212_INVALID_ADDR_SPACE &&
+ end == CSR1212_INVALID_ADDR_SPACE) {
start = host->middle_addr_space;
- end = CSR1212_ALL_SPACE_END;
+ end = CSR1212_ALL_SPACE_END;
}
if (((start|end) & ~align_mask) || (start >= end) || (end > 0x1000000000000ULL)) {
@@ -360,7 +361,7 @@
write_unlock_irqrestore(&addr_space_lock, flags);
- if (retval == ~0ULL) {
+ if (retval == CSR1212_INVALID_ADDR_SPACE) {
kfree(as);
}