]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/nouveau/dmem: remove set but not used variable 'drm'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 21 Feb 2019 03:38:51 +0000 (03:38 +0000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 21 Mar 2019 23:57:58 +0000 (09:57 +1000)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_free':
drivers/gpu/drm/nouveau/nouveau_dmem.c:103:22: warning:
 variable 'drm' set but not used [-Wunused-but-set-variable]
  struct nouveau_drm *drm;
                      ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_dmem.c

index 8be7a83ced9b5351e194c0bf0b98abc39df50eb3..58b4cb389d87a11250cb8882d0d39521c4c978c7 100644 (file)
@@ -100,12 +100,10 @@ static void
 nouveau_dmem_free(struct hmm_devmem *devmem, struct page *page)
 {
        struct nouveau_dmem_chunk *chunk;
-       struct nouveau_drm *drm;
        unsigned long idx;
 
        chunk = (void *)hmm_devmem_page_get_drvdata(page);
        idx = page_to_pfn(page) - chunk->pfn_first;
-       drm = chunk->drm;
 
        /*
         * FIXME: