]> git.baikalelectronics.ru Git - kernel.git/commit
drm: connector: remove bogus NULL check
authorArnd Bergmann <arnd@arndb.de>
Fri, 28 Jun 2019 10:39:05 +0000 (12:39 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 2 Jul 2019 13:39:32 +0000 (15:39 +0200)
commit080b796338568b221ec06ea564aea75316b38cdb
treef1545ef0a496d4fea37cd48656ffcf45a660b0eb
parented8674496e92891e1376e66e73be6f94d9948bb4
drm: connector: remove bogus NULL check

mode->name is a character array in a structure, checking it's
address is pointless and causes a warning with some compilers:

drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion]
                      mode->name ? mode->name : "",
                      ~~~~~~^~~~ ~
include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS'
        drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
                                   ^~~~~~~~~~~

Remove the check here.

Fixes: 555697d726f0 ("drm/modes: Support modes names on the command line")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ramalingam C <ramlaingam.c@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628103925.2686249-1-arnd@arndb.de
drivers/gpu/drm/drm_connector.c