All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-10  2:33 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2020-09-10  2:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel
  Cc: amd-gfx, dri-devel, linux-kernel, YueHaibing

If CONFIG_AGP is not set, gcc warns:

drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
  struct radeon_device *rdev = radeon_get_rdev(bdev);
                        ^~~~

Move it to ifdef block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 31c63d339629..449e77eb75f9 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
 			      struct ttm_tt *ttm,
 			      struct ttm_resource *bo_mem)
 {
+#if IS_ENABLED(CONFIG_AGP)
 	struct radeon_device *rdev = radeon_get_rdev(bdev);
 
-#if IS_ENABLED(CONFIG_AGP)
 	if (rdev->flags & RADEON_IS_AGP)
 		return ttm_agp_bind(ttm, bo_mem);
 #endif
-- 
2.17.1



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

* [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-10  2:33 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2020-09-10  2:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel
  Cc: YueHaibing, dri-devel, amd-gfx, linux-kernel

If CONFIG_AGP is not set, gcc warns:

drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
  struct radeon_device *rdev = radeon_get_rdev(bdev);
                        ^~~~

Move it to ifdef block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 31c63d339629..449e77eb75f9 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
 			      struct ttm_tt *ttm,
 			      struct ttm_resource *bo_mem)
 {
+#if IS_ENABLED(CONFIG_AGP)
 	struct radeon_device *rdev = radeon_get_rdev(bdev);
 
-#if IS_ENABLED(CONFIG_AGP)
 	if (rdev->flags & RADEON_IS_AGP)
 		return ttm_agp_bind(ttm, bo_mem);
 #endif
-- 
2.17.1


_______________________________________________
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 -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-10  2:33 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2020-09-10  2:33 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, daniel
  Cc: YueHaibing, dri-devel, amd-gfx, linux-kernel

If CONFIG_AGP is not set, gcc warns:

drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
  struct radeon_device *rdev = radeon_get_rdev(bdev);
                        ^~~~

Move it to ifdef block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 31c63d339629..449e77eb75f9 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
 			      struct ttm_tt *ttm,
 			      struct ttm_resource *bo_mem)
 {
+#if IS_ENABLED(CONFIG_AGP)
 	struct radeon_device *rdev = radeon_get_rdev(bdev);
 
-#if IS_ENABLED(CONFIG_AGP)
 	if (rdev->flags & RADEON_IS_AGP)
 		return ttm_agp_bind(ttm, bo_mem);
 #endif
-- 
2.17.1


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
  2020-09-10  2:33 ` YueHaibing
  (?)
@ 2020-09-10  8:56   ` Christian König
  -1 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-09-10  8:56 UTC (permalink / raw)
  To: YueHaibing, alexander.deucher, airlied, daniel
  Cc: amd-gfx, dri-devel, linux-kernel

Am 10.09.20 um 04:33 schrieb YueHaibing:
> If CONFIG_AGP is not set, gcc warns:
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
>    struct radeon_device *rdev = radeon_get_rdev(bdev);
>                          ^~~~
>
> Move it to ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 31c63d339629..449e77eb75f9 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
>   			      struct ttm_tt *ttm,
>   			      struct ttm_resource *bo_mem)
>   {
> +#if IS_ENABLED(CONFIG_AGP)
>   	struct radeon_device *rdev = radeon_get_rdev(bdev);
>   
> -#if IS_ENABLED(CONFIG_AGP)
>   	if (rdev->flags & RADEON_IS_AGP)
>   		return ttm_agp_bind(ttm, bo_mem);
>   #endif


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

* Re: [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-10  8:56   ` Christian König
  0 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-09-10  8:56 UTC (permalink / raw)
  To: YueHaibing, alexander.deucher, airlied, daniel
  Cc: dri-devel, amd-gfx, linux-kernel

Am 10.09.20 um 04:33 schrieb YueHaibing:
> If CONFIG_AGP is not set, gcc warns:
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
>    struct radeon_device *rdev = radeon_get_rdev(bdev);
>                          ^~~~
>
> Move it to ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 31c63d339629..449e77eb75f9 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
>   			      struct ttm_tt *ttm,
>   			      struct ttm_resource *bo_mem)
>   {
> +#if IS_ENABLED(CONFIG_AGP)
>   	struct radeon_device *rdev = radeon_get_rdev(bdev);
>   
> -#if IS_ENABLED(CONFIG_AGP)
>   	if (rdev->flags & RADEON_IS_AGP)
>   		return ttm_agp_bind(ttm, bo_mem);
>   #endif

_______________________________________________
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 -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-10  8:56   ` Christian König
  0 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-09-10  8:56 UTC (permalink / raw)
  To: YueHaibing, alexander.deucher, airlied, daniel
  Cc: dri-devel, amd-gfx, linux-kernel

Am 10.09.20 um 04:33 schrieb YueHaibing:
> If CONFIG_AGP is not set, gcc warns:
>
> drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
>    struct radeon_device *rdev = radeon_get_rdev(bdev);
>                          ^~~~
>
> Move it to ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 31c63d339629..449e77eb75f9 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
>   			      struct ttm_tt *ttm,
>   			      struct ttm_resource *bo_mem)
>   {
> +#if IS_ENABLED(CONFIG_AGP)
>   	struct radeon_device *rdev = radeon_get_rdev(bdev);
>   
> -#if IS_ENABLED(CONFIG_AGP)
>   	if (rdev->flags & RADEON_IS_AGP)
>   		return ttm_agp_bind(ttm, bo_mem);
>   #endif

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
  2020-09-10  8:56   ` Christian König
  (?)
@ 2020-09-15 19:28     ` Alex Deucher
  -1 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-09-15 19:28 UTC (permalink / raw)
  To: Christian König
  Cc: YueHaibing, Deucher, Alexander, Dave Airlie, Daniel Vetter,
	Maling list - DRI developers, amd-gfx list, LKML

This function no longer exists.

Alex

On Thu, Sep 10, 2020 at 4:56 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 10.09.20 um 04:33 schrieb YueHaibing:
> > If CONFIG_AGP is not set, gcc warns:
> >
> > drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> > drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
> >    struct radeon_device *rdev = radeon_get_rdev(bdev);
> >                          ^~~~
> >
> > Move it to ifdef block to fix this.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> > index 31c63d339629..449e77eb75f9 100644
> > --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> > @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
> >                             struct ttm_tt *ttm,
> >                             struct ttm_resource *bo_mem)
> >   {
> > +#if IS_ENABLED(CONFIG_AGP)
> >       struct radeon_device *rdev = radeon_get_rdev(bdev);
> >
> > -#if IS_ENABLED(CONFIG_AGP)
> >       if (rdev->flags & RADEON_IS_AGP)
> >               return ttm_agp_bind(ttm, bo_mem);
> >   #endif
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-15 19:28     ` Alex Deucher
  0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-09-15 19:28 UTC (permalink / raw)
  To: Christian König
  Cc: Dave Airlie, YueHaibing, LKML, amd-gfx list,
	Maling list - DRI developers, Deucher, Alexander

This function no longer exists.

Alex

On Thu, Sep 10, 2020 at 4:56 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 10.09.20 um 04:33 schrieb YueHaibing:
> > If CONFIG_AGP is not set, gcc warns:
> >
> > drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> > drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
> >    struct radeon_device *rdev = radeon_get_rdev(bdev);
> >                          ^~~~
> >
> > Move it to ifdef block to fix this.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> > index 31c63d339629..449e77eb75f9 100644
> > --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> > @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
> >                             struct ttm_tt *ttm,
> >                             struct ttm_resource *bo_mem)
> >   {
> > +#if IS_ENABLED(CONFIG_AGP)
> >       struct radeon_device *rdev = radeon_get_rdev(bdev);
> >
> > -#if IS_ENABLED(CONFIG_AGP)
> >       if (rdev->flags & RADEON_IS_AGP)
> >               return ttm_agp_bind(ttm, bo_mem);
> >   #endif
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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 -next] drm/ttm/agp: Fix Wunused-variable warning
@ 2020-09-15 19:28     ` Alex Deucher
  0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-09-15 19:28 UTC (permalink / raw)
  To: Christian König
  Cc: Dave Airlie, YueHaibing, LKML, amd-gfx list,
	Maling list - DRI developers, Daniel Vetter, Deucher, Alexander

This function no longer exists.

Alex

On Thu, Sep 10, 2020 at 4:56 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 10.09.20 um 04:33 schrieb YueHaibing:
> > If CONFIG_AGP is not set, gcc warns:
> >
> > drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_bind’:
> > drivers/gpu/drm/radeon/radeon_ttm.c:692:24: warning: unused variable ‘rdev’ [-Wunused-variable]
> >    struct radeon_device *rdev = radeon_get_rdev(bdev);
> >                          ^~~~
> >
> > Move it to ifdef block to fix this.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> >   drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> > index 31c63d339629..449e77eb75f9 100644
> > --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> > @@ -689,9 +689,9 @@ static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
> >                             struct ttm_tt *ttm,
> >                             struct ttm_resource *bo_mem)
> >   {
> > +#if IS_ENABLED(CONFIG_AGP)
> >       struct radeon_device *rdev = radeon_get_rdev(bdev);
> >
> > -#if IS_ENABLED(CONFIG_AGP)
> >       if (rdev->flags & RADEON_IS_AGP)
> >               return ttm_agp_bind(ttm, bo_mem);
> >   #endif
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2020-09-15 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  2:33 [PATCH -next] drm/ttm/agp: Fix Wunused-variable warning YueHaibing
2020-09-10  2:33 ` YueHaibing
2020-09-10  2:33 ` YueHaibing
2020-09-10  8:56 ` Christian König
2020-09-10  8:56   ` Christian König
2020-09-10  8:56   ` Christian König
2020-09-15 19:28   ` Alex Deucher
2020-09-15 19:28     ` Alex Deucher
2020-09-15 19:28     ` Alex Deucher

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.