On Fri, 26 Jul 2024 14:38:09 +1000 Ben Skeggs <bskeggs@xxxxxxxxxx> wrote: Reviewed-by: Zhi Wang <zhiw@xxxxxxxxxx> Out of curiosity, when digging the nvif_driver for reviewing this patch, I found: static const struct nvif_driver * nvif_driver[] = { #ifdef __KERNEL__ &nvif_driver_nvkm, #else &nvif_driver_drm, &nvif_driver_lib, &nvif_driver_null, #endif Does nvif_driver_drm, nvif_driver_lib, nvif_driver_null still have valid users nowadays in the userspace? Or should they also be removed in this patch series? > These are remnants of code long gone. Remove them. > > Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx> > --- > drivers/gpu/drm/nouveau/include/nvif/driver.h | 2 -- > drivers/gpu/drm/nouveau/nouveau_nvif.c | 1 - > drivers/gpu/drm/nouveau/nvif/client.c | 6 +----- > 3 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/include/nvif/driver.h > b/drivers/gpu/drm/nouveau/include/nvif/driver.h index > 8d294ce3cf0a..7b08ff769039 100644 --- > a/drivers/gpu/drm/nouveau/include/nvif/driver.h +++ > b/drivers/gpu/drm/nouveau/include/nvif/driver.h @@ -8,13 +8,11 @@ > struct nvif_driver { const char *name; > int (*init)(const char *name, u64 device, const char *cfg, > const char *dbg, void **priv); > - void (*fini)(void *priv); > int (*suspend)(void *priv); > int (*resume)(void *priv); > int (*ioctl)(void *priv, void *data, u32 size, void **hack); > void __iomem *(*map)(void *priv, u64 handle, u32 size); > void (*unmap)(void *priv, void __iomem *ptr, u32 size); > - bool keep; > }; > > int nvif_driver_init(const char *drv, const char *cfg, const char > *dbg, diff --git a/drivers/gpu/drm/nouveau/nouveau_nvif.c > b/drivers/gpu/drm/nouveau/nouveau_nvif.c index > 9a7e3f64b79f..adb802421fda 100644 --- > a/drivers/gpu/drm/nouveau/nouveau_nvif.c +++ > b/drivers/gpu/drm/nouveau/nouveau_nvif.c @@ -97,5 +97,4 @@ > nvif_driver_nvkm = { .ioctl = nvkm_client_ioctl, > .map = nvkm_client_map, > .unmap = nvkm_client_unmap, > - .keep = false, > }; > diff --git a/drivers/gpu/drm/nouveau/nvif/client.c > b/drivers/gpu/drm/nouveau/nvif/client.c index > cd5439b73ac7..85ad5091e8e2 100644 --- > a/drivers/gpu/drm/nouveau/nvif/client.c +++ > b/drivers/gpu/drm/nouveau/nvif/client.c @@ -51,11 +51,7 @@ void > nvif_client_dtor(struct nvif_client *client) > { > nvif_object_dtor(&client->object); > - if (client->driver) { > - if (client->driver->fini) > - client->driver->fini(client->object.priv); > - client->driver = NULL; > - } > + client->driver = NULL; > } > > int