From 4285c8c1523bff3d0b3826a061b9a9497e141ec1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Jan 2026 19:31:09 +0100 Subject: [PATCH] replace "pointer" typedef by plain void* Signed-off-by: Enrico Weigelt, metux IT consult --- src/nouveau_xv.c | 22 +++++++++++----------- src/nv04_xv_blit.c | 6 +++--- src/nv04_xv_ovl.c | 4 ++-- src/nv10_xv_ovl.c | 4 ++-- src/nv30_xv_tex.c | 6 +++--- src/nv40_xv_tex.c | 6 +++--- src/nv50_xv.c | 6 +++--- src/nv_driver.c | 10 +++++----- src/nv_proto.h | 32 ++++++++++++++++---------------- 9 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 947c587..5f8794d 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -563,7 +563,7 @@ NVVideoTimerCallback(ScrnInfoPtr pScrn, Time currentTime) * StopVideo */ static void -NVStopOverlayVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) +NVStopOverlayVideo(ScrnInfoPtr pScrn, void *data, Bool Exit) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -611,7 +611,7 @@ NVQueryBestSize(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, - pointer data) + void *data) { if(vid_w > (drw_w << 3)) drw_w = vid_w >> 3; @@ -1121,7 +1121,7 @@ static int NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, - Bool Sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) + Bool Sync, RegionPtr clipBoxes, void *data, DrawablePtr pDraw) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; NVPtr pNv = NVPTR(pScrn); @@ -1613,7 +1613,7 @@ NVAllocSurface(ScrnInfoPtr pScrn, int id, surface->pScrn = pScrn; surface->pitches = &pPriv->pitch; surface->offsets = &pPriv->offset; - surface->devPrivate.ptr = (pointer)pPriv; + surface->devPrivate.ptr = (void*)pPriv; surface->id = id; /* grab the video */ @@ -1659,7 +1659,7 @@ NVGetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value) NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); return NV10GetOverlayPortAttribute(pScrn, attribute, - value, (pointer)pPriv); + value, (void*)pPriv); } static int @@ -1669,7 +1669,7 @@ NVSetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value) NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); return NV10SetOverlayPortAttribute(pScrn, attribute, - value, (pointer)pPriv); + value, (void*)pPriv); } static int @@ -1756,7 +1756,7 @@ NVSetupBlitVideo (ScreenPtr pScreen) pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_BLIT_PORTS]); for(i = 0; i < NUM_BLIT_PORTS; i++) - adapt->pPortPrivates[i].ptr = (pointer)(pPriv); + adapt->pPortPrivates[i].ptr = (void*)(pPriv); if (pNv->dev->chipset >= 0x11) { adapt->pAttributes = NVBlitAttributes; @@ -1824,7 +1824,7 @@ NVSetupOverlayVideoAdapter(ScreenPtr pScreen) adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[1]); - adapt->pPortPrivates[0].ptr = (pointer)(pPriv); + adapt->pPortPrivates[0].ptr = (void*)(pPriv); adapt->pAttributes = (pNv->Architecture != NV_ARCH_04) ? NV10OverlayAttributes : NV04OverlayAttributes; adapt->nAttributes = (pNv->Architecture != NV_ARCH_04) ? NUM_NV10_OVERLAY_ATTRIBUTES : NUM_NV04_OVERLAY_ATTRIBUTES; @@ -2025,7 +2025,7 @@ NV30SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic) pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) - adapt->pPortPrivates[i].ptr = (pointer)(pPriv); + adapt->pPortPrivates[i].ptr = (void*)(pPriv); adapt->pAttributes = NVTexturedAttributes; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES; @@ -2107,7 +2107,7 @@ NV40SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic) pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) - adapt->pPortPrivates[i].ptr = (pointer)(pPriv); + adapt->pPortPrivates[i].ptr = (void*)(pPriv); adapt->pAttributes = NVTexturedAttributes; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES; @@ -2177,7 +2177,7 @@ NV50SetupTexturedVideo (ScreenPtr pScreen) pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) - adapt->pPortPrivates[i].ptr = (pointer)(pPriv); + adapt->pPortPrivates[i].ptr = (void*)(pPriv); adapt->pAttributes = NVTexturedAttributesNV50; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES_NV50; diff --git a/src/nv04_xv_blit.c b/src/nv04_xv_blit.c index e660a81..3fe3f0f 100644 --- a/src/nv04_xv_blit.c +++ b/src/nv04_xv_blit.c @@ -183,7 +183,7 @@ NVPutBlitImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset, */ int NVSetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; NVPtr pNv = NVPTR(pScrn); @@ -214,7 +214,7 @@ NVSetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, */ int NVGetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -230,7 +230,7 @@ NVGetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, * NVStopBlitVideo */ void -NVStopBlitVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) +NVStopBlitVideo(ScrnInfoPtr pScrn, void *data, Bool Exit) { } diff --git a/src/nv04_xv_ovl.c b/src/nv04_xv_ovl.c index aae6026..473c21f 100644 --- a/src/nv04_xv_ovl.c +++ b/src/nv04_xv_ovl.c @@ -123,7 +123,7 @@ NV04PutOverlayImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, */ int NV04SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -160,7 +160,7 @@ NV04SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, */ int NV04GetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; diff --git a/src/nv10_xv_ovl.c b/src/nv10_xv_ovl.c index 679e368..459d4bb 100644 --- a/src/nv10_xv_ovl.c +++ b/src/nv10_xv_ovl.c @@ -144,7 +144,7 @@ NV10PutOverlayImage(ScrnInfoPtr pScrn, */ int NV10SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -222,7 +222,7 @@ NV10SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, */ int NV10GetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c index 994de61..faf38af 100644 --- a/src/nv30_xv_tex.c +++ b/src/nv30_xv_tex.c @@ -156,7 +156,7 @@ NV30GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) } void -NV30StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) +NV30StopTexturedVideo(ScrnInfoPtr pScrn, void *data, Bool Exit) { } @@ -350,7 +350,7 @@ NV30PutTextureImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset, */ int NV30SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -380,7 +380,7 @@ NV30SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, */ int NV30GetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; diff --git a/src/nv40_xv_tex.c b/src/nv40_xv_tex.c index fea8f9d..d413022 100644 --- a/src/nv40_xv_tex.c +++ b/src/nv40_xv_tex.c @@ -155,7 +155,7 @@ NV40GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) } void -NV40StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) +NV40StopTexturedVideo(ScrnInfoPtr pScrn, void *data, Bool Exit) { } @@ -342,7 +342,7 @@ NV40PutTextureImage(ScrnInfoPtr pScrn, */ int NV40SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -372,7 +372,7 @@ NV40SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, */ int NV40GetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; diff --git a/src/nv50_xv.c b/src/nv50_xv.c index 20b84ab..569eede 100644 --- a/src/nv50_xv.c +++ b/src/nv50_xv.c @@ -274,7 +274,7 @@ nv50_xv_image_put(ScrnInfoPtr pScrn, } void -nv50_xv_video_stop(ScrnInfoPtr pScrn, pointer data, Bool exit) +nv50_xv_video_stop(ScrnInfoPtr pScrn, void *data, Bool exit) { } @@ -368,7 +368,7 @@ nv50_xv_set_port_defaults(ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) int nv50_xv_port_attribute_set(ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data) + INT32 value, void *data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; @@ -413,7 +413,7 @@ nv50_xv_port_attribute_set(ScrnInfoPtr pScrn, Atom attribute, int nv50_xv_port_attribute_get(ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data) + INT32 *value, void* data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; diff --git a/src/nv_driver.c b/src/nv_driver.c index 45b0482..581ce54 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -163,8 +163,8 @@ static XF86ModuleVersionInfo nouveauVersRec = _X_EXPORT XF86ModuleData nouveauModuleData = { &nouveauVersRec, nouveauSetup, NULL }; -static pointer -nouveauSetup(pointer module, pointer opts, int *errmaj, int *errmin) +static void* +nouveauSetup(void *module, void *opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; @@ -180,7 +180,7 @@ nouveauSetup(pointer module, pointer opts, int *errmaj, int *errmin) * The return value must be non-NULL on success even though there * is no TearDownProc. */ - return (pointer)1; + return (void*)1; } else { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; @@ -533,7 +533,7 @@ NVLeaveVT(ScrnInfoPtr pScrn) } static void -NVFlushCallback(CallbackListPtr *list, pointer user_data, pointer call_data) +NVFlushCallback(CallbackListPtr *list, void *user_data, void *call_data) { ScrnInfoPtr pScrn = user_data; NVPtr pNv = NVPTR(pScrn); @@ -576,7 +576,7 @@ nouveau_dirty_update(ScreenPtr screen) #endif static void -NVBlockHandler (ScreenPtr pScreen, pointer pTimeout) +NVBlockHandler (ScreenPtr pScreen, void *pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); diff --git a/src/nv_proto.h b/src/nv_proto.h index 8b4e33b..70e4c9e 100644 --- a/src/nv_proto.h +++ b/src/nv_proto.h @@ -72,17 +72,17 @@ void NVRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); void NV04PutOverlayImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr clipBoxes); -int NV04SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); -int NV04GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); +int NV04SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, void*); +int NV04GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, void*); void NV04StopOverlay(ScrnInfoPtr); /* in nv04_video_blitter.c */ Bool NVPutBlitImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr, PixmapPtr); -int NVSetBlitPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); -int NVGetBlitPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); -void NVStopBlitVideo(ScrnInfoPtr, pointer, Bool); +int NVSetBlitPortAttribute(ScrnInfoPtr, Atom, INT32, void*); +int NVGetBlitPortAttribute(ScrnInfoPtr, Atom, INT32 *, void*); +void NVStopBlitVideo(ScrnInfoPtr, void*, Bool); /* in nv04_exa.c */ Bool NV04EXAPrepareSolid(PixmapPtr, int, Pixel, Pixel); @@ -109,8 +109,8 @@ void NV10EXADoneComposite(PixmapPtr); void NV10PutOverlayImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr clipBoxes); -int NV10SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); -int NV10GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); +int NV10SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, void*); +int NV10GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, void*); void NV10StopOverlay(ScrnInfoPtr); void NV10WriteOverlayParameters(ScrnInfoPtr); @@ -127,9 +127,9 @@ int NV30PutTextureImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); -void NV30StopTexturedVideo(ScrnInfoPtr, pointer, Bool); -int NV30GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); -int NV30SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, pointer); +void NV30StopTexturedVideo(ScrnInfoPtr, void*, Bool); +int NV30GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, void*); +int NV30SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, void*); /* in nv40_exa.c */ Bool NVAccelInitNV40TCL(ScrnInfoPtr pScrn); @@ -144,9 +144,9 @@ int NV40PutTextureImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); -void NV40StopTexturedVideo(ScrnInfoPtr, pointer, Bool); -int NV40GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); -int NV40SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, pointer); +void NV40StopTexturedVideo(ScrnInfoPtr, void*, Bool); +int NV40GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, void*); +int NV40SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, void*); /* in nv50_accel.c */ void NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box); @@ -212,9 +212,9 @@ int nv50_xv_image_put(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); -void nv50_xv_video_stop(ScrnInfoPtr, pointer, Bool); -int nv50_xv_port_attribute_set(ScrnInfoPtr, Atom, INT32, pointer); -int nv50_xv_port_attribute_get(ScrnInfoPtr, Atom, INT32 *, pointer); +void nv50_xv_video_stop(ScrnInfoPtr, void*, Bool); +int nv50_xv_port_attribute_set(ScrnInfoPtr, Atom, INT32, void*); +int nv50_xv_port_attribute_get(ScrnInfoPtr, Atom, INT32 *, void*); void nv50_xv_set_port_defaults(ScrnInfoPtr, NVPortPrivPtr); void nv50_xv_csc_update(ScrnInfoPtr, NVPortPrivPtr);