All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: fix warnings in ltdc_plane_create()
@ 2018-04-19 13:28 ` Philippe Cornu
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Cornu @ 2018-04-19 13:28 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, dri-devel, linux-kernel
  Cc: Alexandre Torgue

"make C=1" returns 2 warnings in ltdc_plane_create()
("Using plain integer as NULL pointer"). This patch
fixes them.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 616191fe98ae..d997a6014d6c 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -860,13 +860,13 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
 
 	plane = devm_kzalloc(dev, sizeof(*plane), GFP_KERNEL);
 	if (!plane)
-		return 0;
+		return NULL;
 
 	ret = drm_universal_plane_init(ddev, plane, possible_crtcs,
 				       &ltdc_plane_funcs, formats, nb_fmt,
 				       NULL, type, NULL);
 	if (ret < 0)
-		return 0;
+		return NULL;
 
 	drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] drm/stm: ltdc: fix warnings in ltdc_plane_create()
@ 2018-04-19 13:28 ` Philippe Cornu
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Cornu @ 2018-04-19 13:28 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, dri-devel, linux-kernel
  Cc: Alexandre Torgue

"make C=1" returns 2 warnings in ltdc_plane_create()
("Using plain integer as NULL pointer"). This patch
fixes them.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 616191fe98ae..d997a6014d6c 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -860,13 +860,13 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
 
 	plane = devm_kzalloc(dev, sizeof(*plane), GFP_KERNEL);
 	if (!plane)
-		return 0;
+		return NULL;
 
 	ret = drm_universal_plane_init(ddev, plane, possible_crtcs,
 				       &ltdc_plane_funcs, formats, nb_fmt,
 				       NULL, type, NULL);
 	if (ret < 0)
-		return 0;
+		return NULL;
 
 	drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
 
-- 
2.15.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/stm: ltdc: fix warnings in ltdc_plane_create()
  2018-04-19 13:28 ` Philippe Cornu
  (?)
@ 2018-04-25  7:13 ` Yannick FERTRE
  2018-04-27 13:00   ` Philippe CORNU
  -1 siblings, 1 reply; 4+ messages in thread
From: Yannick FERTRE @ 2018-04-25  7:13 UTC (permalink / raw)
  To: Philippe CORNU, Benjamin Gaignard, Vincent ABRIOU, David Airlie,
	dri-devel, linux-kernel
  Cc: Alexandre TORGUE

Hi Philippe,

Reviewed-by: Yannick Fertré <yannick.fertre@st.com>


On 04/19/2018 03:28 PM, Philippe Cornu wrote:
> "make C=1" returns 2 warnings in ltdc_plane_create()
> ("Using plain integer as NULL pointer"). This patch
> fixes them.
> 
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 616191fe98ae..d997a6014d6c 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -860,13 +860,13 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
>   
>   	plane = devm_kzalloc(dev, sizeof(*plane), GFP_KERNEL);
>   	if (!plane)
> -		return 0;
> +		return NULL;
>   
>   	ret = drm_universal_plane_init(ddev, plane, possible_crtcs,
>   				       &ltdc_plane_funcs, formats, nb_fmt,
>   				       NULL, type, NULL);
>   	if (ret < 0)
> -		return 0;
> +		return NULL;
>   
>   	drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
>   
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/stm: ltdc: fix warnings in ltdc_plane_create()
  2018-04-25  7:13 ` Yannick FERTRE
@ 2018-04-27 13:00   ` Philippe CORNU
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe CORNU @ 2018-04-27 13:00 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin Gaignard, Vincent ABRIOU, David Airlie,
	dri-devel, linux-kernel
  Cc: Alexandre TORGUE



On 04/25/2018 09:13 AM, Yannick FERTRE wrote:
> Hi Philippe,
> 
> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>
> 

Applied on drm-misc-next.
Many thanks,
Philippe :-)

> 
> On 04/19/2018 03:28 PM, Philippe Cornu wrote:
>> "make C=1" returns 2 warnings in ltdc_plane_create()
>> ("Using plain integer as NULL pointer"). This patch
>> fixes them.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
>> ---
>>    drivers/gpu/drm/stm/ltdc.c | 4 ++--
>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index 616191fe98ae..d997a6014d6c 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -860,13 +860,13 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
>>    
>>    	plane = devm_kzalloc(dev, sizeof(*plane), GFP_KERNEL);
>>    	if (!plane)
>> -		return 0;
>> +		return NULL;
>>    
>>    	ret = drm_universal_plane_init(ddev, plane, possible_crtcs,
>>    				       &ltdc_plane_funcs, formats, nb_fmt,
>>    				       NULL, type, NULL);
>>    	if (ret < 0)
>> -		return 0;
>> +		return NULL;
>>    
>>    	drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
>>    

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-27 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 13:28 [PATCH] drm/stm: ltdc: fix warnings in ltdc_plane_create() Philippe Cornu
2018-04-19 13:28 ` Philippe Cornu
2018-04-25  7:13 ` Yannick FERTRE
2018-04-27 13:00   ` Philippe CORNU

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.