All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring
@ 2020-08-12  7:42 ` Tian Tao
  0 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

patch #1 and #3 is clean up, patch #2 is for code refactoring

Changes since v1:
- Rewrite the commits messages and patch name in #1
- Rewrite the commits message in #2.
- Add the new patch #3

Changes since v2:
- merge patch #3 into patch #2

Tian Tao (2):
  drm/hisilicon: Remove the unused include statements
  drm/hisilicon: Code refactoring for hibmc_drv_de

 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 58 ++++++------------------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  |  5 --
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h  |  2 +
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c |  2 -
 4 files changed, 15 insertions(+), 52 deletions(-)

-- 
2.7.4


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

* [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring
@ 2020-08-12  7:42 ` Tian Tao
  0 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

patch #1 and #3 is clean up, patch #2 is for code refactoring

Changes since v1:
- Rewrite the commits messages and patch name in #1
- Rewrite the commits message in #2.
- Add the new patch #3

Changes since v2:
- merge patch #3 into patch #2

Tian Tao (2):
  drm/hisilicon: Remove the unused include statements
  drm/hisilicon: Code refactoring for hibmc_drv_de

 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 58 ++++++------------------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  |  5 --
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h  |  2 +
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c |  2 -
 4 files changed, 15 insertions(+), 52 deletions(-)

-- 
2.7.4

_______________________________________________
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

* [PATCH drm/hisilicon v3 1/2] drm/hisilicon: Remove the unused include statements
  2020-08-12  7:42 ` Tian Tao
@ 2020-08-12  7:42   ` Tian Tao
  -1 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

Remove some unused include statements.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 3 ---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  | 5 -----
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 --
 3 files changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index cc70e83..66132eb 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -17,9 +17,6 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_vram_helper.h>
-#include <drm/drm_plane_helper.h>
-#include <drm/drm_print.h>
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 
 #include "hibmc_drm_drv.h"
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index b8d839a..54f6144 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -11,18 +11,13 @@
  *	Jianhua Li <lijianhua@huawei.com>
  */
 
-#include <linux/console.h>
-#include <linux/module.h>
 #include <linux/pci.h>
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_vram_helper.h>
 #include <drm/drm_irq.h>
 #include <drm/drm_managed.h>
-#include <drm/drm_print.h>
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 
 #include "hibmc_drm_drv.h"
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 2ca69c3..ed12f61 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -11,10 +11,8 @@
  *	Jianhua Li <lijianhua@huawei.com>
  */
 
-#include <drm/drm_gem_vram_helper.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_probe_helper.h>
-#include <drm/drm_crtc_helper.h>
 #include <drm/drm_print.h>
 
 #include "hibmc_drm_drv.h"
-- 
2.7.4


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

* [PATCH drm/hisilicon v3 1/2] drm/hisilicon: Remove the unused include statements
@ 2020-08-12  7:42   ` Tian Tao
  0 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

Remove some unused include statements.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 3 ---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  | 5 -----
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 --
 3 files changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index cc70e83..66132eb 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -17,9 +17,6 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_vram_helper.h>
-#include <drm/drm_plane_helper.h>
-#include <drm/drm_print.h>
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 
 #include "hibmc_drm_drv.h"
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index b8d839a..54f6144 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -11,18 +11,13 @@
  *	Jianhua Li <lijianhua@huawei.com>
  */
 
-#include <linux/console.h>
-#include <linux/module.h>
 #include <linux/pci.h>
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_vram_helper.h>
 #include <drm/drm_irq.h>
 #include <drm/drm_managed.h>
-#include <drm/drm_print.h>
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_vblank.h>
 
 #include "hibmc_drm_drv.h"
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index 2ca69c3..ed12f61 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -11,10 +11,8 @@
  *	Jianhua Li <lijianhua@huawei.com>
  */
 
-#include <drm/drm_gem_vram_helper.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_probe_helper.h>
-#include <drm/drm_crtc_helper.h>
 #include <drm/drm_print.h>
 
 #include "hibmc_drm_drv.h"
-- 
2.7.4

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

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

* [PATCH drm/hisilicon v3 2/2] drm/hisilicon: Code refactoring for hibmc_drv_de
  2020-08-12  7:42 ` Tian Tao
@ 2020-08-12  7:42   ` Tian Tao
  -1 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

The memory used to be allocated with devres helpers and released
automatically. In rare circumstances, the memory's release could
have happened before the DRM device got released, which would have
caused memory corruption of some kind. Now we're embedding the data
structures in struct hibmc_drm_private. The whole release problem
has been resolved, because struct hibmc_drm_private is allocated
with drmm_kzalloc and always released with the DRM device.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c  | 55 ++++++-------------------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h |  2 +
 2 files changed, 15 insertions(+), 42 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index 66132eb..d9062a3 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -157,37 +157,6 @@ static const struct drm_plane_helper_funcs hibmc_plane_helper_funcs = {
 	.atomic_update = hibmc_plane_atomic_update,
 };
 
-static struct drm_plane *hibmc_plane_init(struct hibmc_drm_private *priv)
-{
-	struct drm_device *dev = priv->dev;
-	struct drm_plane *plane;
-	int ret = 0;
-
-	plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL);
-	if (!plane) {
-		DRM_ERROR("failed to alloc memory when init plane\n");
-		return ERR_PTR(-ENOMEM);
-	}
-	/*
-	 * plane init
-	 * TODO: Now only support primary plane, overlay planes
-	 * need to do.
-	 */
-	ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs,
-				       channel_formats1,
-				       ARRAY_SIZE(channel_formats1),
-				       NULL,
-				       DRM_PLANE_TYPE_PRIMARY,
-				       NULL);
-	if (ret) {
-		DRM_ERROR("failed to init plane: %d\n", ret);
-		return ERR_PTR(ret);
-	}
-
-	drm_plane_helper_add(plane, &hibmc_plane_helper_funcs);
-	return plane;
-}
-
 static void hibmc_crtc_dpms(struct drm_crtc *crtc, int dpms)
 {
 	struct hibmc_drm_private *priv = crtc->dev->dev_private;
@@ -534,22 +503,24 @@ static const struct drm_crtc_helper_funcs hibmc_crtc_helper_funcs = {
 int hibmc_de_init(struct hibmc_drm_private *priv)
 {
 	struct drm_device *dev = priv->dev;
-	struct drm_crtc *crtc;
-	struct drm_plane *plane;
+	struct drm_crtc *crtc = &priv->crtc;
+	struct drm_plane *plane = &priv->primary_plane;
 	int ret;
 
-	plane = hibmc_plane_init(priv);
-	if (IS_ERR(plane)) {
-		DRM_ERROR("failed to create plane: %ld\n", PTR_ERR(plane));
-		return PTR_ERR(plane);
-	}
+	ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs,
+				       channel_formats1,
+				       ARRAY_SIZE(channel_formats1),
+				       NULL,
+				       DRM_PLANE_TYPE_PRIMARY,
+				       NULL);
 
-	crtc = devm_kzalloc(dev->dev, sizeof(*crtc), GFP_KERNEL);
-	if (!crtc) {
-		DRM_ERROR("failed to alloc memory when init crtc\n");
-		return -ENOMEM;
+	if (ret) {
+		DRM_ERROR("failed to init plane: %d\n", ret);
+		return ret;
 	}
 
+	drm_plane_helper_add(plane, &hibmc_plane_helper_funcs);
+
 	ret = drm_crtc_init_with_planes(dev, crtc, plane,
 					NULL, &hibmc_crtc_funcs, NULL);
 	if (ret) {
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index a683763..197485e 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -28,6 +28,8 @@ struct hibmc_drm_private {
 
 	/* drm */
 	struct drm_device  *dev;
+	struct drm_plane primary_plane;
+	struct drm_crtc crtc;
 	struct drm_encoder encoder;
 	struct drm_connector connector;
 	bool mode_config_initialized;
-- 
2.7.4


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

* [PATCH drm/hisilicon v3 2/2] drm/hisilicon: Code refactoring for hibmc_drv_de
@ 2020-08-12  7:42   ` Tian Tao
  0 siblings, 0 replies; 9+ messages in thread
From: Tian Tao @ 2020-08-12  7:42 UTC (permalink / raw)
  To: airlied, daniel, tzimmermann, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm

The memory used to be allocated with devres helpers and released
automatically. In rare circumstances, the memory's release could
have happened before the DRM device got released, which would have
caused memory corruption of some kind. Now we're embedding the data
structures in struct hibmc_drm_private. The whole release problem
has been resolved, because struct hibmc_drm_private is allocated
with drmm_kzalloc and always released with the DRM device.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c  | 55 ++++++-------------------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h |  2 +
 2 files changed, 15 insertions(+), 42 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index 66132eb..d9062a3 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -157,37 +157,6 @@ static const struct drm_plane_helper_funcs hibmc_plane_helper_funcs = {
 	.atomic_update = hibmc_plane_atomic_update,
 };
 
-static struct drm_plane *hibmc_plane_init(struct hibmc_drm_private *priv)
-{
-	struct drm_device *dev = priv->dev;
-	struct drm_plane *plane;
-	int ret = 0;
-
-	plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL);
-	if (!plane) {
-		DRM_ERROR("failed to alloc memory when init plane\n");
-		return ERR_PTR(-ENOMEM);
-	}
-	/*
-	 * plane init
-	 * TODO: Now only support primary plane, overlay planes
-	 * need to do.
-	 */
-	ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs,
-				       channel_formats1,
-				       ARRAY_SIZE(channel_formats1),
-				       NULL,
-				       DRM_PLANE_TYPE_PRIMARY,
-				       NULL);
-	if (ret) {
-		DRM_ERROR("failed to init plane: %d\n", ret);
-		return ERR_PTR(ret);
-	}
-
-	drm_plane_helper_add(plane, &hibmc_plane_helper_funcs);
-	return plane;
-}
-
 static void hibmc_crtc_dpms(struct drm_crtc *crtc, int dpms)
 {
 	struct hibmc_drm_private *priv = crtc->dev->dev_private;
@@ -534,22 +503,24 @@ static const struct drm_crtc_helper_funcs hibmc_crtc_helper_funcs = {
 int hibmc_de_init(struct hibmc_drm_private *priv)
 {
 	struct drm_device *dev = priv->dev;
-	struct drm_crtc *crtc;
-	struct drm_plane *plane;
+	struct drm_crtc *crtc = &priv->crtc;
+	struct drm_plane *plane = &priv->primary_plane;
 	int ret;
 
-	plane = hibmc_plane_init(priv);
-	if (IS_ERR(plane)) {
-		DRM_ERROR("failed to create plane: %ld\n", PTR_ERR(plane));
-		return PTR_ERR(plane);
-	}
+	ret = drm_universal_plane_init(dev, plane, 1, &hibmc_plane_funcs,
+				       channel_formats1,
+				       ARRAY_SIZE(channel_formats1),
+				       NULL,
+				       DRM_PLANE_TYPE_PRIMARY,
+				       NULL);
 
-	crtc = devm_kzalloc(dev->dev, sizeof(*crtc), GFP_KERNEL);
-	if (!crtc) {
-		DRM_ERROR("failed to alloc memory when init crtc\n");
-		return -ENOMEM;
+	if (ret) {
+		DRM_ERROR("failed to init plane: %d\n", ret);
+		return ret;
 	}
 
+	drm_plane_helper_add(plane, &hibmc_plane_helper_funcs);
+
 	ret = drm_crtc_init_with_planes(dev, crtc, plane,
 					NULL, &hibmc_crtc_funcs, NULL);
 	if (ret) {
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index a683763..197485e 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -28,6 +28,8 @@ struct hibmc_drm_private {
 
 	/* drm */
 	struct drm_device  *dev;
+	struct drm_plane primary_plane;
+	struct drm_crtc crtc;
 	struct drm_encoder encoder;
 	struct drm_connector connector;
 	bool mode_config_initialized;
-- 
2.7.4

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

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

* Re: [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring
  2020-08-12  7:42 ` Tian Tao
@ 2020-08-12  8:33   ` Thomas Zimmermann
  -1 siblings, 0 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2020-08-12  8:33 UTC (permalink / raw)
  To: Tian Tao, airlied, daniel, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm


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

Merged into drm-misc-next

Am 12.08.20 um 09:42 schrieb Tian Tao:
> patch #1 and #3 is clean up, patch #2 is for code refactoring
> 
> Changes since v1:
> - Rewrite the commits messages and patch name in #1
> - Rewrite the commits message in #2.
> - Add the new patch #3
> 
> Changes since v2:
> - merge patch #3 into patch #2
> 
> Tian Tao (2):
>   drm/hisilicon: Remove the unused include statements
>   drm/hisilicon: Code refactoring for hibmc_drv_de
> 
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 58 ++++++------------------
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  |  5 --
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h  |  2 +
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c |  2 -
>  4 files changed, 15 insertions(+), 52 deletions(-)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 516 bytes --]

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

* Re: [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring
@ 2020-08-12  8:33   ` Thomas Zimmermann
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2020-08-12  8:33 UTC (permalink / raw)
  To: Tian Tao, airlied, daniel, kraxel, alexander.deucher, tglx,
	dri-devel, xinliang.liu, linux-kernel
  Cc: linuxarm


[-- Attachment #1.1.1: Type: text/plain, Size: 998 bytes --]

Merged into drm-misc-next

Am 12.08.20 um 09:42 schrieb Tian Tao:
> patch #1 and #3 is clean up, patch #2 is for code refactoring
> 
> Changes since v1:
> - Rewrite the commits messages and patch name in #1
> - Rewrite the commits message in #2.
> - Add the new patch #3
> 
> Changes since v2:
> - merge patch #3 into patch #2
> 
> Tian Tao (2):
>   drm/hisilicon: Remove the unused include statements
>   drm/hisilicon: Code refactoring for hibmc_drv_de
> 
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c   | 58 ++++++------------------
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c  |  5 --
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h  |  2 +
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c |  2 -
>  4 files changed, 15 insertions(+), 52 deletions(-)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 516 bytes --]

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

_______________________________________________
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

* Re: [PATCH drm/hisilicon v3 1/2] drm/hisilicon: Remove the unused include statements
  2020-08-12  7:42   ` Tian Tao
  (?)
@ 2020-08-12 12:04   ` kernel test robot
  -1 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-12 12:04 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6784 bytes --]

Hi Tian,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20200812]
[cannot apply to v5.8]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Tian-Tao/hibmc-clean-up-and-code-refactoring/20200812-154916
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fb893de323e2d39f7a1f6df425703a2edbdf56ea
config: arm64-randconfig-r035-20200812 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 30c1633386e7cfb01c0a54b31ccf4c3a3873e71b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:389:1: warning: declaration specifier missing, defaulting to 'int'
   module_pci_driver(hibmc_pci_driver);
   ^
   include/linux/pci.h:1388:2: note: expanded from macro 'module_pci_driver'
           module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
           ^
   include/linux/device/driver.h:262:3: note: expanded from macro 'module_driver'
   } \
     ^
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:389:1: error: a parameter list without types is only allowed in a function definition
   include/linux/pci.h:1388:2: note: expanded from macro 'module_pci_driver'
           module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
           ^
   include/linux/device/driver.h:263:13: note: expanded from macro 'module_driver'
   module_init(__driver##_init); \
               ^
   <scratch space>:89:1: note: expanded from here
   hibmc_pci_driver_init
   ^
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:389:1: warning: declaration specifier missing, defaulting to 'int'
   include/linux/pci.h:1388:2: note: expanded from macro 'module_pci_driver'
           module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
           ^
   include/linux/device/driver.h:267:3: note: expanded from macro 'module_driver'
   } \
     ^
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:389:1: error: a parameter list without types is only allowed in a function definition
   include/linux/pci.h:1388:2: note: expanded from macro 'module_pci_driver'
           module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
           ^
   include/linux/device/driver.h:268:13: note: expanded from macro 'module_driver'
   module_exit(__driver##_exit);
               ^
   <scratch space>:92:1: note: expanded from here
   hibmc_pci_driver_exit
   ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:391:1: warning: declaration specifier missing, defaulting to 'int'
   MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
   ^
   int
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:391:21: error: a parameter list without types is only allowed in a function definition
   MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
                       ^
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:392:15: error: expected parameter declarator
   MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");
                 ^
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:392:15: error: expected ')'
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:392:14: note: to match this '('
   MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");
                ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:392:1: warning: declaration specifier missing, defaulting to 'int'
   MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");
   ^
   int
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:392:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
   MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");
                ^
                                                       void
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:393:20: error: expected parameter declarator
   MODULE_DESCRIPTION("DRM Driver for Hisilicon Hibmc");
                      ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:393:20: error: expected ')'
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:393:19: note: to match this '('
   MODULE_DESCRIPTION("DRM Driver for Hisilicon Hibmc");
                     ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:393:1: warning: declaration specifier missing, defaulting to 'int'
   MODULE_DESCRIPTION("DRM Driver for Hisilicon Hibmc");
   ^
   int
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:393:19: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
   MODULE_DESCRIPTION("DRM Driver for Hisilicon Hibmc");
                     ^
                                                      void
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:394:16: error: expected parameter declarator
   MODULE_LICENSE("GPL v2");
                  ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:394:16: error: expected ')'
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:394:15: note: to match this '('
   MODULE_LICENSE("GPL v2");
                 ^
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:394:1: warning: declaration specifier missing, defaulting to 'int'
   MODULE_LICENSE("GPL v2");
   ^
   int
   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:394:15: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
   MODULE_LICENSE("GPL v2");
                 ^
                          void
   6 warnings and 12 errors generated.

vim +389 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

5e0df3a08f3d17 Rongrong Zou 2016-11-16  388  
4f1a7007d688a7 YueHaibing   2018-04-21 @389  module_pci_driver(hibmc_pci_driver);
5e0df3a08f3d17 Rongrong Zou 2016-11-16  390  
5e0df3a08f3d17 Rongrong Zou 2016-11-16  391  MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
5e0df3a08f3d17 Rongrong Zou 2016-11-16 @392  MODULE_AUTHOR("RongrongZou <zourongrong@huawei.com>");

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36151 bytes --]

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

end of thread, other threads:[~2020-08-13  7:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  7:42 [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring Tian Tao
2020-08-12  7:42 ` Tian Tao
2020-08-12  7:42 ` [PATCH drm/hisilicon v3 1/2] drm/hisilicon: Remove the unused include statements Tian Tao
2020-08-12  7:42   ` Tian Tao
2020-08-12 12:04   ` kernel test robot
2020-08-12  7:42 ` [PATCH drm/hisilicon v3 2/2] drm/hisilicon: Code refactoring for hibmc_drv_de Tian Tao
2020-08-12  7:42   ` Tian Tao
2020-08-12  8:33 ` [PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring Thomas Zimmermann
2020-08-12  8:33   ` Thomas Zimmermann

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.