* [PATCH] drm/vc4: Fix compilation error reported by kbuild test bot
[not found] <201904242102.yfCseamT%lkp@intel.com>
@ 2019-04-24 15:06 ` Maarten Lankhorst
2019-04-24 15:23 ` Maarten Lankhorst
0 siblings, 1 reply; 2+ messages in thread
From: Maarten Lankhorst @ 2019-04-24 15:06 UTC (permalink / raw)
To: kbuild test robot, dri-devel; +Cc: Intel Graphics Development, kbuild-all
Op 24-04-2019 om 15:12 schreef kbuild test robot:
> 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
> Reported-by: kbuild test robot <lkp@intel.com>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> 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)
>> 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
>
> ---
> 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
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index e7c04a9eb219..1baa10e94484 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -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)
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vc4: Fix compilation error reported by kbuild test bot
2019-04-24 15:06 ` [PATCH] drm/vc4: Fix compilation error reported by kbuild test bot Maarten Lankhorst
@ 2019-04-24 15:23 ` Maarten Lankhorst
0 siblings, 0 replies; 2+ messages in thread
From: Maarten Lankhorst @ 2019-04-24 15:23 UTC (permalink / raw)
To: kbuild test robot, dri-devel; +Cc: Intel Graphics Development, kbuild-all
Op 24-04-2019 om 17:06 schreef Maarten Lankhorst:
> Op 24-04-2019 om 15:12 schreef kbuild test robot:
>> 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
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> 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)
>>> 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
>>
>> ---
>> 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
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Eric Anholt <eric@anholt.net>
> ---
> drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
> index e7c04a9eb219..1baa10e94484 100644
> --- a/drivers/gpu/drm/vc4/vc4_crtc.c
> +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
> @@ -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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-24 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201904242102.yfCseamT%lkp@intel.com>
2019-04-24 15:06 ` [PATCH] drm/vc4: Fix compilation error reported by kbuild test bot Maarten Lankhorst
2019-04-24 15:23 ` Maarten Lankhorst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).