public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: Add return statement in sun4i_layer_format_mod_supported Add a missing return after the IS_ERR_OR_NULL() check in sun4i_layer_format_mod_supported()
@ 2022-06-07  9:51 Saud Farooqui
  2022-06-09 14:22 ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Saud Farooqui @ 2022-06-07  9:51 UTC (permalink / raw)
  To: jernej.skrabec, maxime, samuel, linux-arm-kernel, linux-sunxi,
	linux-kernel, wens, daniel
  Cc: Saud Farooqui

Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index 6d43080791a0..85fb9e800ddf 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -117,7 +117,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
 	struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
 
 	if (IS_ERR_OR_NULL(layer->backend->frontend))
-		sun4i_backend_format_is_supported(format, modifier);
+		return sun4i_backend_format_is_supported(format, modifier);
 
 	return sun4i_backend_format_is_supported(format, modifier) ||
 	       sun4i_frontend_format_is_supported(format, modifier);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/sun4i: Add return statement in sun4i_layer_format_mod_supported Add a missing return after the IS_ERR_OR_NULL() check in sun4i_layer_format_mod_supported()
  2022-06-07  9:51 [PATCH] drm/sun4i: Add return statement in sun4i_layer_format_mod_supported Add a missing return after the IS_ERR_OR_NULL() check in sun4i_layer_format_mod_supported() Saud Farooqui
@ 2022-06-09 14:22 ` Maxime Ripard
  2022-06-21 16:44   ` [PATCH v1] drm/sun4i: Return from the function in error condition Saud Farooqui
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2022-06-09 14:22 UTC (permalink / raw)
  To: Saud Farooqui
  Cc: jernej.skrabec, samuel, linux-arm-kernel, linux-sunxi,
	linux-kernel, wens, daniel


[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]

Hi,

On Tue, Jun 07, 2022 at 02:51:50PM +0500, Saud Farooqui wrote:
> Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>

Your patch doesn't seem to be formatted properly.

The commit title should be much shorter, and the commit log should
explain what the issue is, and what is done in that patch to address it.

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1] drm/sun4i: Return from the function in error condition
  2022-06-09 14:22 ` Maxime Ripard
@ 2022-06-21 16:44   ` Saud Farooqui
  2022-06-22  7:57     ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Saud Farooqui @ 2022-06-21 16:44 UTC (permalink / raw)
  To: maxime
  Cc: jernej.skrabec, samuel, linux-arm-kernel, linux-sunxi,
	linux-kernel, wens, daniel, Saud Farooqui

Added return statement in sun4i_layer_format_mod_supported()
in case of error.

Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index 6d43080791a0..85fb9e800ddf 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -117,7 +117,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
 	struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
 
 	if (IS_ERR_OR_NULL(layer->backend->frontend))
-		sun4i_backend_format_is_supported(format, modifier);
+		return sun4i_backend_format_is_supported(format, modifier);
 
 	return sun4i_backend_format_is_supported(format, modifier) ||
 	       sun4i_frontend_format_is_supported(format, modifier);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1] drm/sun4i: Return from the function in error condition
  2022-06-21 16:44   ` [PATCH v1] drm/sun4i: Return from the function in error condition Saud Farooqui
@ 2022-06-22  7:57     ` Maxime Ripard
  2022-06-22  8:59       ` [PATCH v2] drm/sun4i: Return if frontend is not present Saud Farooqui
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2022-06-22  7:57 UTC (permalink / raw)
  To: Saud Farooqui
  Cc: jernej.skrabec, samuel, linux-arm-kernel, linux-sunxi,
	linux-kernel, wens, daniel


[-- Attachment #1.1: Type: text/plain, Size: 1208 bytes --]

Hi,

On Tue, Jun 21, 2022 at 09:44:27PM +0500, Saud Farooqui wrote:
> Added return statement in sun4i_layer_format_mod_supported()
> in case of error.
> 
> Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
> index 6d43080791a0..85fb9e800ddf 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
> @@ -117,7 +117,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
>  	struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
>  
>  	if (IS_ERR_OR_NULL(layer->backend->frontend))
> -		sun4i_backend_format_is_supported(format, modifier);
> +		return sun4i_backend_format_is_supported(format, modifier);

While there's a bug, it definitely isn't what your commit message
describe.

Frontends only available on some SoCs and are thus optional in the
driver.

If the frontend pointer isn't set, it means that it isn't there and thus
we try to figure out the format through the backend that is always
there.

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2] drm/sun4i: Return if frontend is not present
  2022-06-22  7:57     ` Maxime Ripard
@ 2022-06-22  8:59       ` Saud Farooqui
  2022-06-22 14:42         ` (subset) " Maxime Ripard
  2022-06-27 13:54         ` Maxime Ripard
  0 siblings, 2 replies; 7+ messages in thread
From: Saud Farooqui @ 2022-06-22  8:59 UTC (permalink / raw)
  To: maxime
  Cc: jernej.skrabec, samuel, linux-arm-kernel, linux-sunxi,
	linux-kernel, wens, daniel, Saud Farooqui

Added return statement in sun4i_layer_format_mod_supported()
in case frontend is not present.

Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index 6d43080791a0..85fb9e800ddf 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -117,7 +117,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
 	struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
 
 	if (IS_ERR_OR_NULL(layer->backend->frontend))
-		sun4i_backend_format_is_supported(format, modifier);
+		return sun4i_backend_format_is_supported(format, modifier);
 
 	return sun4i_backend_format_is_supported(format, modifier) ||
 	       sun4i_frontend_format_is_supported(format, modifier);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: (subset) [PATCH v2] drm/sun4i: Return if frontend is not present
  2022-06-22  8:59       ` [PATCH v2] drm/sun4i: Return if frontend is not present Saud Farooqui
@ 2022-06-22 14:42         ` Maxime Ripard
  2022-06-27 13:54         ` Maxime Ripard
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2022-06-22 14:42 UTC (permalink / raw)
  To: farooqui_saud
  Cc: Maxime Ripard, wens, daniel, linux-kernel, linux-arm-kernel,
	jernej.skrabec, linux-sunxi, samuel

On Wed, 22 Jun 2022 13:59:17 +0500, Saud Farooqui wrote:
> Added return statement in sun4i_layer_format_mod_supported()
> in case frontend is not present.
> 
> 

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] drm/sun4i: Return if frontend is not present
  2022-06-22  8:59       ` [PATCH v2] drm/sun4i: Return if frontend is not present Saud Farooqui
  2022-06-22 14:42         ` (subset) " Maxime Ripard
@ 2022-06-27 13:54         ` Maxime Ripard
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2022-06-27 13:54 UTC (permalink / raw)
  To: farooqui_saud
  Cc: Maxime Ripard, linux-kernel, linux-arm-kernel, wens, linux-sunxi,
	jernej.skrabec, samuel, daniel

On Wed, 22 Jun 2022 13:59:17 +0500, Saud Farooqui wrote:
> Added return statement in sun4i_layer_format_mod_supported()
> in case frontend is not present.
> 
> 

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-27 13:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07  9:51 [PATCH] drm/sun4i: Add return statement in sun4i_layer_format_mod_supported Add a missing return after the IS_ERR_OR_NULL() check in sun4i_layer_format_mod_supported() Saud Farooqui
2022-06-09 14:22 ` Maxime Ripard
2022-06-21 16:44   ` [PATCH v1] drm/sun4i: Return from the function in error condition Saud Farooqui
2022-06-22  7:57     ` Maxime Ripard
2022-06-22  8:59       ` [PATCH v2] drm/sun4i: Return if frontend is not present Saud Farooqui
2022-06-22 14:42         ` (subset) " Maxime Ripard
2022-06-27 13:54         ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox