Xext: xv: drop swapping request length fields

The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-06 15:21:12 +02:00 committed by Marge Bot
parent 69982abf7b
commit 54d4dd619c

View File

@ -1118,9 +1118,6 @@ ProcXvDispatch(ClientPtr client)
static int _X_COLD static int _X_COLD
SProcXvQueryExtension(ClientPtr client) SProcXvQueryExtension(ClientPtr client)
{ {
REQUEST(xvQueryExtensionReq);
REQUEST_SIZE_MATCH(xvQueryExtensionReq);
swaps(&stuff->length);
return XvProcVector[xv_QueryExtension] (client); return XvProcVector[xv_QueryExtension] (client);
} }
@ -1129,7 +1126,6 @@ SProcXvQueryAdaptors(ClientPtr client)
{ {
REQUEST(xvQueryAdaptorsReq); REQUEST(xvQueryAdaptorsReq);
REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
swaps(&stuff->length);
swapl(&stuff->window); swapl(&stuff->window);
return XvProcVector[xv_QueryAdaptors] (client); return XvProcVector[xv_QueryAdaptors] (client);
} }
@ -1139,7 +1135,6 @@ SProcXvQueryEncodings(ClientPtr client)
{ {
REQUEST(xvQueryEncodingsReq); REQUEST(xvQueryEncodingsReq);
REQUEST_SIZE_MATCH(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
return XvProcVector[xv_QueryEncodings] (client); return XvProcVector[xv_QueryEncodings] (client);
} }
@ -1149,7 +1144,6 @@ SProcXvGrabPort(ClientPtr client)
{ {
REQUEST(xvGrabPortReq); REQUEST(xvGrabPortReq);
REQUEST_SIZE_MATCH(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->time); swapl(&stuff->time);
return XvProcVector[xv_GrabPort] (client); return XvProcVector[xv_GrabPort] (client);
@ -1160,7 +1154,6 @@ SProcXvUngrabPort(ClientPtr client)
{ {
REQUEST(xvUngrabPortReq); REQUEST(xvUngrabPortReq);
REQUEST_SIZE_MATCH(xvUngrabPortReq); REQUEST_SIZE_MATCH(xvUngrabPortReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->time); swapl(&stuff->time);
return XvProcVector[xv_UngrabPort] (client); return XvProcVector[xv_UngrabPort] (client);
@ -1171,7 +1164,6 @@ SProcXvPutVideo(ClientPtr client)
{ {
REQUEST(xvPutVideoReq); REQUEST(xvPutVideoReq);
REQUEST_SIZE_MATCH(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1191,7 +1183,6 @@ SProcXvPutStill(ClientPtr client)
{ {
REQUEST(xvPutStillReq); REQUEST(xvPutStillReq);
REQUEST_SIZE_MATCH(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1211,7 +1202,6 @@ SProcXvGetVideo(ClientPtr client)
{ {
REQUEST(xvGetVideoReq); REQUEST(xvGetVideoReq);
REQUEST_SIZE_MATCH(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1231,7 +1221,6 @@ SProcXvGetStill(ClientPtr client)
{ {
REQUEST(xvGetStillReq); REQUEST(xvGetStillReq);
REQUEST_SIZE_MATCH(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1251,7 +1240,6 @@ SProcXvPutImage(ClientPtr client)
{ {
REQUEST(xvPutImageReq); REQUEST(xvPutImageReq);
REQUEST_AT_LEAST_SIZE(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1275,7 +1263,6 @@ SProcXvShmPutImage(ClientPtr client)
{ {
REQUEST(xvShmPutImageReq); REQUEST(xvShmPutImageReq);
REQUEST_SIZE_MATCH(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
swapl(&stuff->gc); swapl(&stuff->gc);
@ -1303,7 +1290,6 @@ SProcXvSelectVideoNotify(ClientPtr client)
{ {
REQUEST(xvSelectVideoNotifyReq); REQUEST(xvSelectVideoNotifyReq);
REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
swaps(&stuff->length);
swapl(&stuff->drawable); swapl(&stuff->drawable);
return XvProcVector[xv_SelectVideoNotify] (client); return XvProcVector[xv_SelectVideoNotify] (client);
} }
@ -1313,7 +1299,6 @@ SProcXvSelectPortNotify(ClientPtr client)
{ {
REQUEST(xvSelectPortNotifyReq); REQUEST(xvSelectPortNotifyReq);
REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
return XvProcVector[xv_SelectPortNotify] (client); return XvProcVector[xv_SelectPortNotify] (client);
} }
@ -1323,7 +1308,6 @@ SProcXvStopVideo(ClientPtr client)
{ {
REQUEST(xvStopVideoReq); REQUEST(xvStopVideoReq);
REQUEST_SIZE_MATCH(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->drawable); swapl(&stuff->drawable);
return XvProcVector[xv_StopVideo] (client); return XvProcVector[xv_StopVideo] (client);
@ -1334,7 +1318,6 @@ SProcXvSetPortAttribute(ClientPtr client)
{ {
REQUEST(xvSetPortAttributeReq); REQUEST(xvSetPortAttributeReq);
REQUEST_SIZE_MATCH(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->attribute); swapl(&stuff->attribute);
swapl(&stuff->value); swapl(&stuff->value);
@ -1346,7 +1329,6 @@ SProcXvGetPortAttribute(ClientPtr client)
{ {
REQUEST(xvGetPortAttributeReq); REQUEST(xvGetPortAttributeReq);
REQUEST_SIZE_MATCH(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->attribute); swapl(&stuff->attribute);
return XvProcVector[xv_GetPortAttribute] (client); return XvProcVector[xv_GetPortAttribute] (client);
@ -1357,7 +1339,6 @@ SProcXvQueryBestSize(ClientPtr client)
{ {
REQUEST(xvQueryBestSizeReq); REQUEST(xvQueryBestSizeReq);
REQUEST_SIZE_MATCH(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swaps(&stuff->vid_w); swaps(&stuff->vid_w);
swaps(&stuff->vid_h); swaps(&stuff->vid_h);
@ -1371,7 +1352,6 @@ SProcXvQueryPortAttributes(ClientPtr client)
{ {
REQUEST(xvQueryPortAttributesReq); REQUEST(xvQueryPortAttributesReq);
REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
return XvProcVector[xv_QueryPortAttributes] (client); return XvProcVector[xv_QueryPortAttributes] (client);
} }
@ -1381,7 +1361,6 @@ SProcXvQueryImageAttributes(ClientPtr client)
{ {
REQUEST(xvQueryImageAttributesReq); REQUEST(xvQueryImageAttributesReq);
REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
swapl(&stuff->id); swapl(&stuff->id);
swaps(&stuff->width); swaps(&stuff->width);
@ -1394,7 +1373,6 @@ SProcXvListImageFormats(ClientPtr client)
{ {
REQUEST(xvListImageFormatsReq); REQUEST(xvListImageFormatsReq);
REQUEST_SIZE_MATCH(xvListImageFormatsReq); REQUEST_SIZE_MATCH(xvListImageFormatsReq);
swaps(&stuff->length);
swapl(&stuff->port); swapl(&stuff->port);
return XvProcVector[xv_ListImageFormats] (client); return XvProcVector[xv_ListImageFormats] (client);
} }