Hui Wang | 28 Jun 2012 04:58
Picon

[PATCH] can: flexcan: use of_property_read_u32 to avoid endian problem

Use of_property_read_u32() to get DT value can avoid endian problems,
this is needed since this driver can run on powerpc (be) and arm (le).

No need to check ret value here since we will check the got value to
verify if users pass a valid value in the DT.

Cc: linux-can <at> vger.kernel.org
Cc: Marc Kleine-Budde <mkl <at> pengutronix.de>
Cc: David S. Miller <davem <at> davemloft.net>
Cc: Shawn Guo <shawn.guo <at> linaro.org>
Cc: Wolfgang Grandegger <wg <at> grandegger.com>
Signed-off-by: Hui Wang <jason77.wang <at> gmail.com>
---
This is the patch to replace the one "can: flexcan: use be32_to_cpup
to handle the value of dt entry", if you already applied that patch
and can't revert, please ignore this patch and let me know,i will
prepare an incremental patch basing on that one.

 drivers/net/can/flexcan.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 38c0690..f63f826 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
 <at>  <at>  -938,14 +938,9  <at>  <at>  static int __devinit flexcan_probe(struct platform_device *pdev)
 	if (IS_ERR(pinctrl))
 		return PTR_ERR(pinctrl);

-	if (pdev->dev.of_node) {
(Continue reading)

Shawn Guo | 28 Jun 2012 05:32
Favicon

Re: [PATCH] can: flexcan: use of_property_read_u32 to avoid endian problem

On 28 June 2012 10:58, Hui Wang <jason77.wang <at> gmail.com> wrote:
> Use of_property_read_u32() to get DT value can avoid endian problems,
> this is needed since this driver can run on powerpc (be) and arm (le).
>
> No need to check ret value here since we will check the got value to
> verify if users pass a valid value in the DT.
>
> Cc: linux-can <at> vger.kernel.org
> Cc: Marc Kleine-Budde <mkl <at> pengutronix.de>
> Cc: David S. Miller <davem <at> davemloft.net>
> Cc: Shawn Guo <shawn.guo <at> linaro.org>

Reviewed-by: Shawn Guo <shawn.guo <at> linaro.org>

> Cc: Wolfgang Grandegger <wg <at> grandegger.com>
> Signed-off-by: Hui Wang <jason77.wang <at> gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-can" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Oliver Hartkopp | 28 Jun 2012 07:06
Favicon

Re: [PATCH] can: flexcan: use of_property_read_u32 to avoid endian problem

The first patch (you wanted to superseed) has already been pulled from Dave
Miller, see:

http://git.kernel.org/?p=linux/kernel/git/davem/net.git;a=commitdiff;h=85f2f834e85517307f13e30e630a5fc86f757cb5

If you want to update your patch you need to do this based on your already
accepted patch.

Regards,
Oliver

Btw. no need to put Dave Miller in all your CAN-related postings in CC. He
get's hundreds of mails each day ...

On 28.06.2012 05:32, Shawn Guo wrote:

> On 28 June 2012 10:58, Hui Wang <jason77.wang <at> gmail.com> wrote:
>> Use of_property_read_u32() to get DT value can avoid endian problems,
>> this is needed since this driver can run on powerpc (be) and arm (le).
>>
>> No need to check ret value here since we will check the got value to
>> verify if users pass a valid value in the DT.
>>
>> Cc: linux-can <at> vger.kernel.org
>> Cc: Marc Kleine-Budde <mkl <at> pengutronix.de>
>> Cc: David S. Miller <davem <at> davemloft.net>
>> Cc: Shawn Guo <shawn.guo <at> linaro.org>
> 
> Reviewed-by: Shawn Guo <shawn.guo <at> linaro.org>
> 
(Continue reading)

Hui Wang | 28 Jun 2012 07:18
Picon

Re: [PATCH] can: flexcan: use of_property_read_u32 to avoid endian problem

Oliver Hartkopp wrote:
> The first patch (you wanted to superseed) has already been pulled from Dave
> Miller, see:
>
> http://git.kernel.org/?p=linux/kernel/git/davem/net.git;a=commitdiff;h=85f2f834e85517307f13e30e630a5fc86f757cb5
>
> If you want to update your patch you need to do this based on your already
> accepted patch.
>   
Got it, i will generate an incremental patch basing on it.
> Regards,
> Oliver
>
> Btw. no need to put Dave Miller in all your CAN-related postings in CC. He
> get's hundreds of mails each day ...
>   
OK.

Regards,
Hui.
> On 28.06.2012 05:32, Shawn Guo wrote:
>
>   
>> On 28 June 2012 10:58, Hui Wang <jason77.wang <at> gmail.com> wrote:
>>     
>>> Use of_property_read_u32() to get DT value can avoid endian problems,
>>> this is needed since this driver can run on powerpc (be) and arm (le).
>>>
>>> No need to check ret value here since we will check the got value to
>>> verify if users pass a valid value in the DT.
(Continue reading)


Gmane