* [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-03-29 1:41 ` YueHaibing
0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2019-03-29 1:41 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index e384b95ad857..8287ade5ece0 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
core->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(core->base))
- return PTR_ERR(core->base);
-
- return 0;
+ return PTR_ERR_OR_ZERO(core->base);
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-03-29 1:41 ` YueHaibing
0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2019-03-29 1:41 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index e384b95ad857..8287ade5ece0 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
core->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(core->base))
- return PTR_ERR(core->base);
-
- return 0;
+ return PTR_ERR_OR_ZERO(core->base);
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
2019-03-29 1:41 ` YueHaibing
@ 2019-03-29 2:05 ` Matteo Croce
-1 siblings, 0 replies; 9+ messages in thread
From: Matteo Croce @ 2019-03-29 2:05 UTC (permalink / raw)
To: YueHaibing
Cc: Tomi Valkeinen, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Benoit Parrot, dri-devel, LKML, kernel-janitors
On Fri, Mar 29, 2019 at 2:30 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Acked-by: Matteo Croce <mcroce@redhat.com>
--
Matteo Croce
per aspera ad upstream
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-03-29 2:05 ` Matteo Croce
0 siblings, 0 replies; 9+ messages in thread
From: Matteo Croce @ 2019-03-29 2:05 UTC (permalink / raw)
To: YueHaibing
Cc: Tomi Valkeinen, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Benoit Parrot, dri-devel, LKML, kernel-janitors
On Fri, Mar 29, 2019 at 2:30 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Acked-by: Matteo Croce <mcroce@redhat.com>
--
Matteo Croce
per aspera ad upstream
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
2019-03-29 1:41 ` YueHaibing
@ 2019-03-29 6:57 ` Mukesh Ojha
-1 siblings, 0 replies; 9+ messages in thread
From: Mukesh Ojha @ 2019-03-29 6:57 UTC (permalink / raw)
To: YueHaibing, Tomi Valkeinen, David Airlie, Daniel Vetter,
Sean Paul, Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: dri-devel, linux-kernel, kernel-janitors
On 3/29/2019 7:11 AM, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index e384b95ad857..8287ade5ece0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-03-29 6:57 ` Mukesh Ojha
0 siblings, 0 replies; 9+ messages in thread
From: Mukesh Ojha @ 2019-03-29 6:57 UTC (permalink / raw)
To: YueHaibing, Tomi Valkeinen, David Airlie, Daniel Vetter,
Sean Paul, Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: dri-devel, linux-kernel, kernel-janitors
On 3/29/2019 7:11 AM, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index e384b95ad857..8287ade5ece0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
>
>
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
2019-03-29 1:41 ` YueHaibing
(?)
@ 2019-04-01 10:21 ` Tomi Valkeinen
-1 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2019-04-01 10:21 UTC (permalink / raw)
To: YueHaibing, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: dri-devel, linux-kernel, kernel-janitors
Hi,
On 29/03/2019 03:41, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index e384b95ad857..8287ade5ece0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
Thanks, but I don't usually want this kind of patches. They're mostly
just extra changes, increasing the chance of conflicts, and, in my
opinion, the current code is clearer than the proposed one.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-04-01 10:21 ` Tomi Valkeinen
0 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2019-04-01 10:21 UTC (permalink / raw)
To: YueHaibing, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: kernel-janitors, linux-kernel, dri-devel
Hi,
On 29/03/2019 03:41, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index e384b95ad857..8287ade5ece0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
Thanks, but I don't usually want this kind of patches. They're mostly
just extra changes, increasing the chance of conflicts, and, in my
opinion, the current code is clearer than the proposed one.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-04-01 10:21 ` Tomi Valkeinen
0 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2019-04-01 10:21 UTC (permalink / raw)
To: YueHaibing, David Airlie, Daniel Vetter, Sean Paul,
Peter Ujfalusi, Matteo Croce, Benoit Parrot
Cc: kernel-janitors, linux-kernel, dri-devel
Hi,
On 29/03/2019 03:41, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index e384b95ad857..8287ade5ece0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
> core->base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(core->base))
> - return PTR_ERR(core->base);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(core->base);
> }
Thanks, but I don't usually want this kind of patches. They're mostly
just extra changes, increasing the chance of conflicts, and, in my
opinion, the current code is clearer than the proposed one.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-04-01 10:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 1:41 [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init() YueHaibing
2019-03-29 1:41 ` YueHaibing
2019-03-29 2:05 ` Matteo Croce
2019-03-29 2:05 ` Matteo Croce
2019-03-29 6:57 ` Mukesh Ojha
2019-03-29 6:57 ` Mukesh Ojha
2019-04-01 10:21 ` Tomi Valkeinen
2019-04-01 10:21 ` Tomi Valkeinen
2019-04-01 10:21 ` Tomi Valkeinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.