From: kernel test robot lkp@intel.com
drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c:674:25-26: WARNING comparing pointer to 0
Compare pointer-typed values to NULL rather than 0
Semantic patch information: This makes an effort to choose between !x and x == NULL. !x is used if it has previously been used with the function used to initialize x. This relies on type information. More type information can be obtained using the option -all_includes and the option -I to specify an include path.
Generated by: scripts/coccinelle/null/badzero.cocci
CC: Zack Rusin zackr@vmware.com Reported-by: kernel test robot lkp@intel.com Signed-off-by: kernel test robot lkp@intel.com ---
url: https://github.com/0day-ci/linux/commits/Zack-Rusin/drm-vmwgfx-SVGA-v3-and-a... base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
vmwgfx_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c @@ -671,5 +671,5 @@ bool vmw_cmd_supported(struct vmw_privat /* * We have FIFO cmd's */ - return vmw->fifo_mem != 0; + return vmw->fifo_mem != NULL; }