forked from Minki/linux
drm/vmwgfx: Replace deprecated PTR_RET
Commit 508108ea27
("drm/vmwgfx: Don't refcount command-buffer managed
resource lookups during command buffer validation") slips in use of
deprecated PTR_RET. Use PTR_ERR_OR_ZERO instead.
As the PTR_ERR_OR_ZERO is a bit longer than PTR_RET, we introduce
local variable ret for proper indentation and line-length limits.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
parent
36891da8de
commit
a26ca967c2
@ -2377,9 +2377,12 @@ static int vmw_cmd_dx_clear_rendertarget_view(struct vmw_private *dev_priv,
|
||||
{
|
||||
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXClearRenderTargetView) =
|
||||
container_of(header, typeof(*cmd), header);
|
||||
struct vmw_resource *ret;
|
||||
|
||||
return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_rt,
|
||||
cmd->body.renderTargetViewId));
|
||||
ret = vmw_view_id_val_add(sw_context, vmw_view_rt,
|
||||
cmd->body.renderTargetViewId);
|
||||
|
||||
return PTR_ERR_OR_ZERO(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2396,9 +2399,12 @@ static int vmw_cmd_dx_clear_depthstencil_view(struct vmw_private *dev_priv,
|
||||
{
|
||||
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXClearDepthStencilView) =
|
||||
container_of(header, typeof(*cmd), header);
|
||||
struct vmw_resource *ret;
|
||||
|
||||
return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_ds,
|
||||
cmd->body.depthStencilViewId));
|
||||
ret = vmw_view_id_val_add(sw_context, vmw_view_ds,
|
||||
cmd->body.depthStencilViewId);
|
||||
|
||||
return PTR_ERR_OR_ZERO(ret);
|
||||
}
|
||||
|
||||
static int vmw_cmd_dx_view_define(struct vmw_private *dev_priv,
|
||||
@ -2741,9 +2747,12 @@ static int vmw_cmd_dx_genmips(struct vmw_private *dev_priv,
|
||||
{
|
||||
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXGenMips) =
|
||||
container_of(header, typeof(*cmd), header);
|
||||
struct vmw_resource *ret;
|
||||
|
||||
return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_sr,
|
||||
cmd->body.shaderResourceViewId));
|
||||
ret = vmw_view_id_val_add(sw_context, vmw_view_sr,
|
||||
cmd->body.shaderResourceViewId);
|
||||
|
||||
return PTR_ERR_OR_ZERO(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user