[PATCH 042/156] drm/nouveau/nvkm: rename struct nvkm_uvfn

Ben Skeggs bskeggs at nvidia.com
Tue Apr 16 23:38:08 UTC 2024


- preparation for upcoming patches
- open-code current nvkm_uvfn() macro

Signed-off-by: Ben Skeggs <bskeggs at nvidia.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
index c5460a14c541..fe35024d69ba 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/uvfn.c
@@ -19,12 +19,11 @@
  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
  */
-#define nvkm_uvfn(p) container_of((p), struct nvkm_uvfn, object)
 #include "priv.h"
 
 #include <core/object.h>
 
-struct nvkm_uvfn {
+struct nvif_usermode_priv {
 	struct nvkm_object object;
 	struct nvkm_vfn *vfn;
 };
@@ -33,7 +32,7 @@ static int
 nvkm_uvfn_map(struct nvkm_object *object, void *argv, u32 argc,
 	      enum nvkm_object_map *type, u64 *addr, u64 *size)
 {
-	struct nvkm_vfn *vfn = nvkm_uvfn(object)->vfn;
+	struct nvkm_vfn *vfn = container_of(object, struct nvif_usermode_priv, object)->vfn;
 	struct nvkm_device *device = vfn->subdev.device;
 
 	*addr = device->func->resource_addr(device, 0) + vfn->addr.user;
@@ -51,7 +50,7 @@ int
 nvkm_uvfn_new(struct nvkm_device *device, const struct nvkm_oclass *oclass,
 	      void *argv, u32 argc, struct nvkm_object **pobject)
 {
-	struct nvkm_uvfn *uvfn;
+	struct nvif_usermode_priv *uvfn;
 
 	if (argc != 0)
 		return -ENOSYS;
-- 
2.41.0



More information about the Nouveau mailing list