On 09/30/2015 04:24 PM, Alexander Popov wrote:
Can you test for "!cs" here instead?
+ e = -EFAULT;
+ goto err_param;
+ }
Unfortunately no: 0 is a valid value for Chip Select.
Is it OK to leave it like that?
Yes.
+ lpbfifo.ram_bus_addr = sg_dma_address(&sg); /* For freeing later */
+ sg_dma_len(&sg) = lpbfifo.req->size;
I don't think sg_dma_len() is meant to be used as an lvalue.
I've double-checked and found many cases of such usage of this macro.
It seems that I can't avoid it too.
Ok.
Driver code that has to parse #address-cells or #size-cells
is usually wrong.
I would not call it "parsing", I just check whether the dts-file is good.
Anyway, could you give me a clue how to do better?
You should use of_n_size_cells() and of_n_addr_cells().
--
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html