linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS
@ 2019-04-03  6:48 Yue Haibing
  2019-04-03  8:58 ` Mukesh Ojha
  2019-04-03 15:36 ` Jordan Crouse
  0 siblings, 2 replies; 5+ messages in thread
From: Yue Haibing @ 2019-04-03  6:48 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel, jcrouse
  Cc: linux-kernel, freedreno, dri-devel, linux-arm-msm, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

When building CONFIG_DEBUG_FS is not set
gcc warn this:

drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show:
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration]
  adreno_show(gpu, state, p);
  ^~~~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index e686331..d327eb5 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
 	if (IS_ERR_OR_NULL(state))
 		return;
 
+#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
 	adreno_show(gpu, state, p);
+#endif
 
 	drm_puts(p, "registers:\n");
 	for (i = 0; i < a6xx_state->nr_registers; i++) {
-- 
2.7.0



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

* Re: [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS
  2019-04-03  6:48 [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS Yue Haibing
@ 2019-04-03  8:58 ` Mukesh Ojha
  2019-04-03 15:36 ` Jordan Crouse
  1 sibling, 0 replies; 5+ messages in thread
From: Mukesh Ojha @ 2019-04-03  8:58 UTC (permalink / raw)
  To: Yue Haibing, robdclark, sean, airlied, daniel, jcrouse
  Cc: linux-kernel, freedreno, dri-devel, linux-arm-msm


On 4/3/2019 12:18 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> When building CONFIG_DEBUG_FS is not set
> gcc warn this:
>
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show:
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration]
>    adreno_show(gpu, state, p);
>    ^~~~~~~~~~~
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> index e686331..d327eb5 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> @@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
>   	if (IS_ERR_OR_NULL(state))
>   		return;
>   
> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
>   	adreno_show(gpu, state, p);
> +#endif
>   
>   	drm_puts(p, "registers:\n");
>   	for (i = 0; i < a6xx_state->nr_registers; i++) {

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

* Re: [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS
  2019-04-03  6:48 [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS Yue Haibing
  2019-04-03  8:58 ` Mukesh Ojha
@ 2019-04-03 15:36 ` Jordan Crouse
  2019-04-04  2:02   ` YueHaibing
  1 sibling, 1 reply; 5+ messages in thread
From: Jordan Crouse @ 2019-04-03 15:36 UTC (permalink / raw)
  To: Yue Haibing
  Cc: robdclark, sean, airlied, daniel, linux-kernel, freedreno,
	dri-devel, linux-arm-msm

On Wed, Apr 03, 2019 at 02:48:11PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> When building CONFIG_DEBUG_FS is not set
> gcc warn this:
> 
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show:
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration]
>   adreno_show(gpu, state, p);
>   ^~~~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> index e686331..d327eb5 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> @@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
>  	if (IS_ERR_OR_NULL(state))
>  		return;
>  
> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
>  	adreno_show(gpu, state, p);
> +#endif

I agree that this is a problem, but I think I would prefer if we just made a
stub function for adreno_show instead of doing a inline ifdef, so in
adreno_gpu.c:

#ifdef defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
...
#else
void adreno_show(struct msm_gpu *gpu, msm_gpu_state *state,
	struct drm_printer *p)
{
}
#endif

If you want, I can do a quick patch.

Jordan

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS
  2019-04-03 15:36 ` Jordan Crouse
@ 2019-04-04  2:02   ` YueHaibing
  2019-04-10 17:01     ` [Freedreno] " Jordan Crouse
  0 siblings, 1 reply; 5+ messages in thread
From: YueHaibing @ 2019-04-04  2:02 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel, linux-kernel, freedreno,
	dri-devel, linux-arm-msm

On 2019/4/3 23:36, Jordan Crouse wrote:
> On Wed, Apr 03, 2019 at 02:48:11PM +0800, Yue Haibing wrote:
>> From: YueHaibing <yuehaibing@huawei.com>
>>
>> When building CONFIG_DEBUG_FS is not set
>> gcc warn this:
>>
>> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show:
>> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration]
>>   adreno_show(gpu, state, p);
>>   ^~~~~~~~~~~
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
>> index e686331..d327eb5 100644
>> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
>> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
>> @@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
>>  	if (IS_ERR_OR_NULL(state))
>>  		return;
>>  
>> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
>>  	adreno_show(gpu, state, p);
>> +#endif
> 
> I agree that this is a problem, but I think I would prefer if we just made a
> stub function for adreno_show instead of doing a inline ifdef, so in
> adreno_gpu.c:
> 
> #ifdef defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> ...
> #else
> void adreno_show(struct msm_gpu *gpu, msm_gpu_state *state,
> 	struct drm_printer *p)
> {
> }
> #endif
> 
> If you want, I can do a quick patch.

Sure, it's ok for me.

> 
> Jordan
> 


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

* Re: [Freedreno] [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS
  2019-04-04  2:02   ` YueHaibing
@ 2019-04-10 17:01     ` Jordan Crouse
  0 siblings, 0 replies; 5+ messages in thread
From: Jordan Crouse @ 2019-04-10 17:01 UTC (permalink / raw)
  To: YueHaibing
  Cc: robdclark, sean, airlied, daniel, linux-kernel, freedreno,
	dri-devel, linux-arm-msm

On Thu, Apr 04, 2019 at 10:02:07AM +0800, YueHaibing wrote:
> On 2019/4/3 23:36, Jordan Crouse wrote:
> > On Wed, Apr 03, 2019 at 02:48:11PM +0800, Yue Haibing wrote:
> >> From: YueHaibing <yuehaibing@huawei.com>
> >>
> >> When building CONFIG_DEBUG_FS is not set
> >> gcc warn this:
> >>
> >> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function a6xx_show:
> >> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1124:2: error: implicit declaration of function adreno_show; did you mean adreno_dump? [-Werror=implicit-function-declaration]
> >>   adreno_show(gpu, state, p);
> >>   ^~~~~~~~~~~
> >>
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> >> Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >> ---
> >>  drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> >> index e686331..d327eb5 100644
> >> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> >> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> >> @@ -1121,7 +1121,9 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
> >>  	if (IS_ERR_OR_NULL(state))
> >>  		return;
> >>  
> >> +#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> >>  	adreno_show(gpu, state, p);
> >> +#endif
> > 
> > I agree that this is a problem, but I think I would prefer if we just made a
> > stub function for adreno_show instead of doing a inline ifdef, so in
> > adreno_gpu.c:
> > 
> > #ifdef defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
> > ...
> > #else
> > void adreno_show(struct msm_gpu *gpu, msm_gpu_state *state,
> > 	struct drm_printer *p)
> > {
> > }
> > #endif
> > 
> > If you want, I can do a quick patch.
> 
> Sure, it's ok for me.

Sorry for the delay.  I went back and looked at this and discovered that the
problem was a bit more extensive - none of a6xx_gpu_state.c is useful without
the dependencies, so I made a bit more extensive patch to handle the root of
that:

https://patchwork.freedesktop.org/series/59297/

Jordan

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

end of thread, other threads:[~2019-04-10 17:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  6:48 [PATCH] drm/msm/a6xx: Fix build with !CONFIG_DEBUG_FS Yue Haibing
2019-04-03  8:58 ` Mukesh Ojha
2019-04-03 15:36 ` Jordan Crouse
2019-04-04  2:02   ` YueHaibing
2019-04-10 17:01     ` [Freedreno] " Jordan Crouse

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).