forked from torvalds/linux
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wuninitialized in drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c #1811
Labels
-Wuninitialized
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
Comments
nathanchance
added
[PATCH] Submitted
A patch has been submitted for review
-Wuninitialized
[BUG] linux-next
This is an issue only seen in linux-next
labels
Mar 14, 2023
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Mar 14, 2023
…mit() Clang warns (or errors with CONFIG_WERROR): drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninitialized] src_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp; ^~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:492:26: note: initialize the variable 'dst_pitch' to silence this warning s32 src_pitch, dst_pitch; ^ = 0 1 error generated. The assignments were switched around in such a way that dst_pitch was used before it was assigned. Swap the pitch assignments to fix the issue and make it clear which section they are used in. Fixes: 39985ee ("drm/vmwgfx: Abstract placement selection") Link: ClangBuiltLinux#1811 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Mar 14, 2023
The src/dst_pitch got mixed up during the rework of the function, make sure the offset's refer to the correct one. Spotted by clang: Clang warns (or errors with CONFIG_WERROR): drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninitialized] src_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp; ^~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:492:26: note: initialize the variable 'dst_pitch' to silence this warning s32 src_pitch, dst_pitch; ^ = 0 1 error generated. Signed-off-by: Zack Rusin <zackr@vmware.com> Link: ClangBuiltLinux#1811 Reported-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Dave Airlie <airlied@gmail.com> Fixes: 39985ee ("drm/vmwgfx: Abstract placement selection")
Correct patch submitted: https://lore.kernel.org/20230314211445.1363828-1-zack@kde.org/ |
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Mar 15, 2023
The src/dst_pitch got mixed up during the rework of the function, make sure the offset's refer to the correct one. Spotted by clang: Clang warns (or errors with CONFIG_WERROR): drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninitialized] src_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp; ^~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:492:26: note: initialize the variable 'dst_pitch' to silence this warning s32 src_pitch, dst_pitch; ^ = 0 1 error generated. Signed-off-by: Zack Rusin <zackr@vmware.com> Reported-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Dave Airlie <airlied@gmail.com> Link: ClangBuiltLinux#1811 Fixes: 39985ee ("drm/vmwgfx: Abstract placement selection") Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Martin Krastev <krastevm@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230314211445.1363828-1-zack@kde.org
nathanchance
added
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
and removed
[PATCH] Submitted
A patch has been submitted for review
labels
Mar 16, 2023
The fix is now in next-20230316. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Wuninitialized
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
Patch submitted: https://lore.kernel.org/20230314-vmware-wuninitialized-v1-1-1bb4b0989758@kernel.org/
The text was updated successfully, but these errors were encountered: