Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: use __be32 types for big-endian device tree data

Use the sparse annotations so we can keep track of endianness.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

authored by

Jeremy Kerr and committed by
Grant Likely
a9fadeef 52f6537c

+3 -3
+1 -1
drivers/of/address.c
··· 163 163 const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, 164 164 unsigned int *flags) 165 165 { 166 - const u32 *prop; 166 + const __be32 *prop; 167 167 unsigned int psize; 168 168 struct device_node *parent; 169 169 struct of_bus *bus;
+2 -2
drivers/of/base.c
··· 33 33 34 34 int of_n_addr_cells(struct device_node *np) 35 35 { 36 - const int *ip; 36 + const __be32 *ip; 37 37 38 38 do { 39 39 if (np->parent) ··· 49 49 50 50 int of_n_size_cells(struct device_node *np) 51 51 { 52 - const int *ip; 52 + const __be32 *ip; 53 53 54 54 do { 55 55 if (np->parent)