Skip to content

Commit a9fadee

Browse files
Jeremy Kerrglikely
authored andcommitted
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>
1 parent 52f6537 commit a9fadee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/of/address.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
163163
const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
164164
unsigned int *flags)
165165
{
166-
const u32 *prop;
166+
const __be32 *prop;
167167
unsigned int psize;
168168
struct device_node *parent;
169169
struct of_bus *bus;

‎drivers/of/base.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ DEFINE_RWLOCK(devtree_lock);
3333

3434
int of_n_addr_cells(struct device_node *np)
3535
{
36-
const int *ip;
36+
const __be32 *ip;
3737

3838
do {
3939
if (np->parent)
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(of_n_addr_cells);
4949

5050
int of_n_size_cells(struct device_node *np)
5151
{
52-
const int *ip;
52+
const __be32 *ip;
5353

5454
do {
5555
if (np->parent)

0 commit comments

Comments
 (0)