* [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev'
@ 2021-05-25 8:25 Baokun Li
2021-06-15 1:58 ` libaokun (A)
2021-06-15 6:44 ` Christian König
0 siblings, 2 replies; 3+ messages in thread
From: Baokun Li @ 2021-05-25 8:25 UTC (permalink / raw)
To: bskeggs, airlied, daniel, sumit.semwal, christian.koenig,
dri-devel, nouveau, linux-kernel, linux-media, linaro-mm-sig
Cc: yuehaibing, libaokun1, weiyongjun1, yukuai3, yangjihong1
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_populate':
drivers/gpu/drm/nouveau/nouveau_bo.c:1258:17: warning:
variable ‘dev’ set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_unpopulate':
drivers/gpu/drm/nouveau/nouveau_bo.c:1281:17: warning:
variable ‘dev’ set but not used [-Wunused-but-set-variable]
It never used since introduction.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 7a2624c0ba4c..51f9a2e6532e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1254,7 +1254,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
{
struct ttm_tt *ttm_dma = (void *)ttm;
struct nouveau_drm *drm;
- struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
if (ttm_tt_is_populated(ttm))
@@ -1267,7 +1266,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
}
drm = nouveau_bdev(bdev);
- dev = drm->dev->dev;
return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
}
@@ -1277,14 +1275,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_device *bdev,
struct ttm_tt *ttm)
{
struct nouveau_drm *drm;
- struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
if (slave)
return;
drm = nouveau_bdev(bdev);
- dev = drm->dev->dev;
return ttm_pool_free(&drm->ttm.bdev.pool, ttm);
}
--
2.25.4
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev'
2021-05-25 8:25 [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev' Baokun Li
@ 2021-06-15 1:58 ` libaokun (A)
2021-06-15 6:44 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: libaokun (A) @ 2021-06-15 1:58 UTC (permalink / raw)
To: bskeggs, airlied, daniel, sumit.semwal, christian.koenig,
dri-devel, nouveau, linux-kernel, linux-media, linaro-mm-sig
Cc: yuehaibing, weiyongjun1, yukuai3, yangjihong1
ping
在 2021/5/25 16:25, Baokun Li 写道:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_populate':
> drivers/gpu/drm/nouveau/nouveau_bo.c:1258:17: warning:
> variable ‘dev’ set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_unpopulate':
> drivers/gpu/drm/nouveau/nouveau_bo.c:1281:17: warning:
> variable ‘dev’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 7a2624c0ba4c..51f9a2e6532e 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -1254,7 +1254,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
> {
> struct ttm_tt *ttm_dma = (void *)ttm;
> struct nouveau_drm *drm;
> - struct device *dev;
> bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
>
> if (ttm_tt_is_populated(ttm))
> @@ -1267,7 +1266,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
> }
>
> drm = nouveau_bdev(bdev);
> - dev = drm->dev->dev;
>
> return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
> }
> @@ -1277,14 +1275,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_device *bdev,
> struct ttm_tt *ttm)
> {
> struct nouveau_drm *drm;
> - struct device *dev;
> bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
>
> if (slave)
> return;
>
> drm = nouveau_bdev(bdev);
> - dev = drm->dev->dev;
>
> return ttm_pool_free(&drm->ttm.bdev.pool, ttm);
> }
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev'
2021-05-25 8:25 [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev' Baokun Li
2021-06-15 1:58 ` libaokun (A)
@ 2021-06-15 6:44 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2021-06-15 6:44 UTC (permalink / raw)
To: Baokun Li, bskeggs, airlied, daniel, sumit.semwal, dri-devel,
nouveau, linux-kernel, linux-media, linaro-mm-sig
Cc: yuehaibing, weiyongjun1, yukuai3, yangjihong1
Am 25.05.21 um 10:25 schrieb Baokun Li:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_populate':
> drivers/gpu/drm/nouveau/nouveau_bo.c:1258:17: warning:
> variable ‘dev’ set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_unpopulate':
> drivers/gpu/drm/nouveau/nouveau_bo.c:1281:17: warning:
> variable ‘dev’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
Acked-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 7a2624c0ba4c..51f9a2e6532e 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -1254,7 +1254,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
> {
> struct ttm_tt *ttm_dma = (void *)ttm;
> struct nouveau_drm *drm;
> - struct device *dev;
> bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
>
> if (ttm_tt_is_populated(ttm))
> @@ -1267,7 +1266,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
> }
>
> drm = nouveau_bdev(bdev);
> - dev = drm->dev->dev;
>
> return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
> }
> @@ -1277,14 +1275,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_device *bdev,
> struct ttm_tt *ttm)
> {
> struct nouveau_drm *drm;
> - struct device *dev;
> bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
>
> if (slave)
> return;
>
> drm = nouveau_bdev(bdev);
> - dev = drm->dev->dev;
>
> return ttm_pool_free(&drm->ttm.bdev.pool, ttm);
> }
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-27 3:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 8:25 [Nouveau] [PATCH -next] drm/nouveau: Remove set but not used variable 'dev' Baokun Li
2021-06-15 1:58 ` libaokun (A)
2021-06-15 6:44 ` Christian König
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).