Commit e5704b3f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Boris Brezillon

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: 3aeeb13d ("drm/modes: Support modes names on the command line")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarRamalingam C <ramlaingam.c@intel.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628103925.2686249-1-arnd@arndb.de
parent dae1ccee
......@@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
connector->name,
mode->name ? mode->name : "",
mode->name,
mode->xres, mode->yres,
mode->refresh_specified ? mode->refresh : 60,
mode->rb ? " reduced blanking" : "",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment