Skip to contentSkip to conversation

drm/vc4: Fix compilation error reported by kbuild test bot

PATCH In review Maarten Lankhorst 2 participants 3 messages Apr 24, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 201904242102.yfCseamT%[email protected]

Maarten Lankhorst

author maintainer
#1 lore raw

PATCH 1/1 drm/vc4: Fix compilation error reported by kbuild test bot

Op 24-04-2019 om 15:12 schreef kbuild test robot:

Quoted 33 lines
tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next-fixes
head:   d08106796a78a4273e39e1bbdf538dc4334b2635
commit: d08106796a78a4273e39e1bbdf538dc4334b2635 [1/1] drm/vc4: Fix memory leak during gpu reset.
reproduce:
        # apt-get install sparse
        git checkout d08106796a78a4273e39e1bbdf538dc4334b2635
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected struct drm_crtc *crtc @@ got structstruct drm_crtc *crtc @@
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: expected struct drm_crtc *crtc
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: got struct drm_crtc_state *state
drivers/gpu/drm/vc4/vc4_crtc.c:1045:39: sparse: sparse: not enough arguments for function vc4_crtc_destroy_state

vim +1045 drivers/gpu/drm/vc4/vc4_crtc.c

1040
1041 static void
1042 vc4_crtc_reset(struct drm_crtc *crtc)
1043 {
1044 if (crtc->state)

Quoted 1 line

1045 vc4_crtc_destroy_state(crtc->state);

1046
1047 crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
1048 if (crtc->state)
1049 crtc->state->crtc = crtc;
1050 }
1051

Quoted 3 lines

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

-----8<----
A pointer to crtc was missing, resulting in the following build error:
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: sparse: incorrect type in argument 1 (different base types)
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: expected struct drm_crtc *crtc
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: got struct drm_crtc_state *state
drivers/gpu/drm/vc4/vc4_crtc.c:1045:39: sparse: sparse: not enough arguments for function vc4_crtc_destroy_state

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +1 -1
index e7c04a9eb219..1baa10e94484 100644
@@ -1042,7 +1042,7 @@ static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
 	if (crtc->state)
-		vc4_crtc_destroy_state(crtc->state);
+		vc4_crtc_destroy_state(crtc, crtc->state);
 
 	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)
Signature · 7 lines
2.20.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#2 lore raw

Op 24-04-2019 om 17:06 schreef Maarten Lankhorst:

Quoted 56 lines

Op 24-04-2019 om 15:12 schreef kbuild test robot:

Quoted 33 lines
tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next-fixes
head:   d08106796a78a4273e39e1bbdf538dc4334b2635
commit: d08106796a78a4273e39e1bbdf538dc4334b2635 [1/1] drm/vc4: Fix memory leak during gpu reset.
reproduce:
        # apt-get install sparse
        git checkout d08106796a78a4273e39e1bbdf538dc4334b2635
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected struct drm_crtc *crtc @@ got structstruct drm_crtc *crtc @@
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: expected struct drm_crtc *crtc
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: got struct drm_crtc_state *state
drivers/gpu/drm/vc4/vc4_crtc.c:1045:39: sparse: sparse: not enough arguments for function vc4_crtc_destroy_state

vim +1045 drivers/gpu/drm/vc4/vc4_crtc.c

1040
1041 static void
1042 vc4_crtc_reset(struct drm_crtc *crtc)
1043 {
1044 if (crtc->state)

Quoted 1 line

1045 vc4_crtc_destroy_state(crtc->state);

1046
1047 crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
1048 if (crtc->state)
1049 crtc->state->crtc = crtc;
1050 }
1051

Quoted 3 lines

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

-----8<----
A pointer to crtc was missing, resulting in the following build error:
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: sparse: incorrect type in argument 1 (different base types)
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: expected struct drm_crtc *crtc
drivers/gpu/drm/vc4/vc4_crtc.c:1045:44: sparse: got struct drm_crtc_state *state
drivers/gpu/drm/vc4/vc4_crtc.c:1045:39: sparse: sparse: not enough arguments for function vc4_crtc_destroy_state

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +0 -0
index e7c04a9eb219..1baa10e94484 100644

drivers/gpu/drm/vc4/vc4_crtc.c static void · line 1048

Quoted 8 lines
drivers/gpu/drm/vc4/vc4_crtc.c +1 -1
@@ -1042,7 +1042,7 @@ static void
 vc4_crtc_reset(struct drm_crtc *crtc)
 {
 	if (crtc->state)
-		vc4_crtc_destroy_state(crtc->state);
+		vc4_crtc_destroy_state(crtc, crtc->state);
 
 	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 	if (crtc->state)

Pushed with Daniel's irc ack. :)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✗ Fi.CI.BAT: failure for drm/vc4: Fix compilation error reported by kbuild test bot

In reply to a message not in the archive
== Series Details ==

== Series Details ==

Series: drm/vc4: Fix compilation error reported by kbuild test bot
URL : https://patchwork.freedesktop.org/series/59891/
State : failure

== Summary ==

Applying: drm/vc4: Fix compilation error reported by kbuild test bot Using index info to reconstruct a base tree...
M drivers/gpu/drm/vc4/vc4_crtc.c
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/vc4/vc4_crtc.c
No changes -- Patch already applied.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx