Re: [PATCH] drm/vmwgfx: fix typo of sizeof argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2023-09-05 at 18:02 +0800, Konstantin Meskhidze wrote:
> Since size of 'header' pointer and '*header' structure is equal on 64-bit
> machines issue probably didn't cause any wrong behavior. But anyway,
> fixing typo is required.
> 
> Fixes: 7a73ba7469cb ("drm/vmwgfx: Use TTM handles instead of SIDs as user-space
> surface handles.")
> Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> index 98e0723ca6f5..cc3f301ca163 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> @@ -1619,7 +1619,7 @@ static int vmw_cmd_tex_state(struct vmw_private *dev_priv,
>  {
>         VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSetTextureState);
>         SVGA3dTextureState *last_state = (SVGA3dTextureState *)
> -         ((unsigned long) header + header->size + sizeof(header));
> +         ((unsigned long) header + header->size + sizeof(*header));
>         SVGA3dTextureState *cur_state = (SVGA3dTextureState *)
>                 ((unsigned long) header + sizeof(*cmd));
>         struct vmw_resource *ctx;

Hah, yea, that's an old one. Thanks! I can push it through the drm-misc tree.

Reviewed-by: Zack Rusin <zackr@xxxxxxxxxx>

z




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux