* [PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c
2014-05-29 4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
@ 2014-05-29 4:57 ` Sachin Kamat
2014-05-29 4:57 ` [PATCH 3/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-devboard.c Sachin Kamat
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29 4:57 UTC (permalink / raw)
To: linux-arm-kernel
PTR_ERR_OR_ZERO simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
arch/arm/mach-imx/mach-mx31moboard.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 6bed57040973..bb6f8a52a6b8 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -435,10 +435,8 @@ static int __init moboard_usbh2_init(void)
return -ENODEV;
pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
- return 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
static const struct gpio_led mx31moboard_leds[] __initconst = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-devboard.c
2014-05-29 4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
2014-05-29 4:57 ` [PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c Sachin Kamat
@ 2014-05-29 4:57 ` Sachin Kamat
2014-05-29 4:57 ` [PATCH 4/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-marxbot.c Sachin Kamat
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29 4:57 UTC (permalink / raw)
To: linux-arm-kernel
PTR_ERR_OR_ZERO simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
arch/arm/mach-imx/mx31moboard-devboard.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c
index 1e4ea1640a2a..a85377f52647 100644
--- a/arch/arm/mach-imx/mx31moboard-devboard.c
+++ b/arch/arm/mach-imx/mx31moboard-devboard.c
@@ -12,6 +12,7 @@
* GNU General Public License for more details.
*/
+#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -214,10 +215,8 @@ static int __init devboard_usbh1_init(void)
usbh1_pdata.otg = phy;
pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
- return 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-marxbot.c
2014-05-29 4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
2014-05-29 4:57 ` [PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c Sachin Kamat
2014-05-29 4:57 ` [PATCH 3/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-devboard.c Sachin Kamat
@ 2014-05-29 4:57 ` Sachin Kamat
2014-05-29 4:57 ` [PATCH 5/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-smartbot.c Sachin Kamat
2014-05-29 8:03 ` [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Shawn Guo
4 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29 4:57 UTC (permalink / raw)
To: linux-arm-kernel
PTR_ERR_OR_ZERO simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
arch/arm/mach-imx/mx31moboard-marxbot.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c
index 699d01a4fef8..2e62192394c1 100644
--- a/arch/arm/mach-imx/mx31moboard-marxbot.c
+++ b/arch/arm/mach-imx/mx31moboard-marxbot.c
@@ -13,6 +13,7 @@
*/
#include <linux/delay.h>
+#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -328,10 +329,8 @@ static int __init marxbot_usbh1_init(void)
usbh1_pdata.otg = phy;
pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
- return 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
static const struct fsl_usb2_platform_data usb_pdata __initconst = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-smartbot.c
2014-05-29 4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
` (2 preceding siblings ...)
2014-05-29 4:57 ` [PATCH 4/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-marxbot.c Sachin Kamat
@ 2014-05-29 4:57 ` Sachin Kamat
2014-05-29 8:03 ` [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Shawn Guo
4 siblings, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29 4:57 UTC (permalink / raw)
To: linux-arm-kernel
PTR_ERR_OR_ZERO simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
arch/arm/mach-imx/mx31moboard-smartbot.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 4b3d66eb8d34..b73a4b36e040 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -13,6 +13,7 @@
*/
#include <linux/delay.h>
+#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -142,10 +143,8 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV;
pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
- return 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
#else
static inline int smartbot_otg_host_init(void) { return 0; }
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c
2014-05-29 4:57 [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Sachin Kamat
` (3 preceding siblings ...)
2014-05-29 4:57 ` [PATCH 5/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-smartbot.c Sachin Kamat
@ 2014-05-29 8:03 ` Shawn Guo
2014-05-29 8:06 ` Sachin Kamat
2014-06-02 17:18 ` Philippe Rétornaz
4 siblings, 2 replies; 8+ messages in thread
From: Shawn Guo @ 2014-05-29 8:03 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 29, 2014 at 10:27:10AM +0530, Sachin Kamat wrote:
> PTR_ERR_OR_ZERO simplifies the code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> arch/arm/mach-imx/devices/platform-mxc_rnga.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
> index c58404badb59..33d58ca2001a 100644
> --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c
> +++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
> @@ -6,6 +6,7 @@
> * the terms of the GNU General Public License version 2 as published by the
> * Free Software Foundation.
> */
> +#include <linux/err.h>
> #include "../hardware.h"
> #include "devices-common.h"
>
> @@ -48,9 +49,6 @@ static int __init imxXX_add_mxc_rnga(void)
> #endif /* if defined(CONFIG_SOC_IMX31) */
> ret = ERR_PTR(-ENODEV);
>
> - if (IS_ERR(ret))
> - return PTR_ERR(ret);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(ret);
The existing code looks just fine and actually more readable to me.
Also, all the files you are patching will eventually be killed by DT
support. So let's just leave it there as it is for now.
Shawn
> }
> arch_initcall(imxXX_add_mxc_rnga);
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c
2014-05-29 8:03 ` [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Shawn Guo
@ 2014-05-29 8:06 ` Sachin Kamat
2014-06-02 17:18 ` Philippe Rétornaz
1 sibling, 0 replies; 8+ messages in thread
From: Sachin Kamat @ 2014-05-29 8:06 UTC (permalink / raw)
To: linux-arm-kernel
On 29 May 2014 13:33, Shawn Guo <shawn.guo@freescale.com> wrote:
> On Thu, May 29, 2014 at 10:27:10AM +0530, Sachin Kamat wrote:
>> PTR_ERR_OR_ZERO simplifies the code.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>> arch/arm/mach-imx/devices/platform-mxc_rnga.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
>> index c58404badb59..33d58ca2001a 100644
>> --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c
>> +++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c
>> @@ -6,6 +6,7 @@
>> * the terms of the GNU General Public License version 2 as published by the
>> * Free Software Foundation.
>> */
>> +#include <linux/err.h>
>> #include "../hardware.h"
>> #include "devices-common.h"
>>
>> @@ -48,9 +49,6 @@ static int __init imxXX_add_mxc_rnga(void)
>> #endif /* if defined(CONFIG_SOC_IMX31) */
>> ret = ERR_PTR(-ENODEV);
>>
>> - if (IS_ERR(ret))
>> - return PTR_ERR(ret);
>> -
>> - return 0;
>> + return PTR_ERR_OR_ZERO(ret);
>
> The existing code looks just fine and actually more readable to me.
> Also, all the files you are patching will eventually be killed by DT
> support. So let's just leave it there as it is for now.
If these files are meant to go, then we can leave these changes out.
Thanks Shawn.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c
2014-05-29 8:03 ` [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Shawn Guo
2014-05-29 8:06 ` Sachin Kamat
@ 2014-06-02 17:18 ` Philippe Rétornaz
1 sibling, 0 replies; 8+ messages in thread
From: Philippe Rétornaz @ 2014-06-02 17:18 UTC (permalink / raw)
To: linux-arm-kernel
Le 29/05/2014 10:03, Shawn Guo a ?crit :
> On Thu, May 29, 2014 at 10:27:10AM +0530, Sachin Kamat wrote:
>> PTR_ERR_OR_ZERO simplifies the code.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> ---
>> arch/arm/mach-imx/devices/platform-mxc_rnga.c | 6 ++---- 1 file
>> changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c
>> b/arch/arm/mach-imx/devices/platform-mxc_rnga.c index
>> [...]
>
> The existing code looks just fine and actually more readable to me.
> Also, all the files you are patching will eventually be killed by DT
> support. So let's just leave it there as it is for now.
heh ... well ... not so fast please !
There is a non-negligible amount of work to have a fully functional
imx31 on DT.
Not working:
- USB (chipidea driver sort of works, but the PHY is a complete mess).
- Camera
- SPI hardware chip select support
- pinmux support is totally absent
Currently, on imx31 we can boot on DT with (and only if the bootloader
does the pinmux for you):
- SDMA
- Watchdog
- SDHC
- Timer
- Uart
And I did not even had a look at the i2c, EMI, LCD and sound support.
So I hope imx31 platform boards can stay until the situation gets better.
Thanks,
Philippe
^ permalink raw reply [flat|nested] 8+ messages in thread