Thread (11 messages) flat view 11 messages, 5 authors, 2008-07-08

Re: [PATCH] Power5,Power6 BSR driver

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-07-07 05:00:36

+		cur->bsr_addr   = reg[i * 2];
+		cur->bsr_len    = reg[i * 2 + 1];
That's fishy... hand-reading of "reg" property without taking
into account the parent's #size-cells/#address-cells... can't you
use of_address_to_resource or something similar and carry a struct
resource around instead ?

In fact, same goes with the way you do num_bsr_devs = reg_len / 16.

You should rather use -another- property of well known lenght, or
get the #address/#size-cells of the parent and use those appropriately.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help