[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <HE1PR04MB088910A68538A88B66ABCC13F8A50@HE1PR04MB0889.eurprd04.prod.outlook.com>
Date: Wed, 24 Feb 2016 09:23:10 +0000
From: Yangbo Lu <yangbo.lu@....com>
To: Richard Cochran <richardcochran@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Claudiu Manoil <claudiu.manoil@...escale.com>
Subject: RE: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@...il.com]
> Sent: Monday, February 22, 2016 4:36 PM
> To: Yangbo Lu
> Cc: netdev@...r.kernel.org; Claudiu Manoil
> Subject: Re: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
>
> On Mon, Feb 22, 2016 at 02:49:32PM +0800, Yangbo Lu wrote:
> > @@ -431,7 +431,7 @@ static int get_of_u32(struct device_node *node,
> > char *str, u32 *val)
> >
> > if (!prop || plen != sizeof(*prop))
> > return -1;
> > - *val = *prop;
> > + *val = be32_to_cpu(*prop);
> > return 0;
> > }
>
> Why not simply replace get_of_u32 with the standard helper function,
> of_property_read_u32?
[Lu Yangbo-B47093] Thank you for your suggestion. I even didn't know this function.
Will use it in v2 patchset.
>
> Thanks,
> Richard
Powered by blists - more mailing lists