]> git.baikalelectronics.ru Git - kernel.git/commit
drm/connector: Fix warning in debug message
authorMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 24 Jun 2019 08:40:16 +0000 (10:40 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 24 Jun 2019 13:41:02 +0000 (15:41 +0200)
commit0d549f7ee24efcb6794de70cabda0481c0dca025
tree3d4ecbbeb676dcfbaa3728bbe52db3d15918c866
parent0ae2c18606b7fea34bda7afcd80047bf17a7483f
drm/connector: Fix warning in debug message

The commit 158bad172e8e ("drm/modes: Support modes names on the command
line") added name support to the DRM modes, and added that name to the
debug message.

However, that code tests for whether or not the name variable is NULL and
only prints it if it's not. Except that that variable is an array, so it
will never be NULL.

The original intent was to print it only when the name has been specified.
Just printing the array directly will achieve the same thing since the
drm_cmdline_mode structure that holds it is itself contained in
drm_connector, that is allocated with its whole content zero'd.

That means that if the name is not declared, the array will be all zeros,
which will not print anything.

Cc: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 158bad172e8e ("drm/modes: Support modes names on the command line")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624084016.12937-1-maxime.ripard@bootlin.com
drivers/gpu/drm/drm_connector.c