Skip to content

Commit

Permalink
drm/i915/bios: fix format string of the VBT signature logging
Browse files Browse the repository at this point in the history
Specify the maximum number of letters to print from the potentially
unterminated buffer, not the minimum. While at it, use sizeof instead of
a magic number.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450271061-32646-2-git-send-email-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Dec 16, 2015
1 parent e23ceb8 commit 3556dd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,8 @@ intel_bios_init(struct drm_device *dev)

bdb = get_bdb_header(vbt);

DRM_DEBUG_KMS("VBT signature \"%20s\", BDB version %d\n",
vbt->signature, bdb->version);
DRM_DEBUG_KMS("VBT signature \"%.*s\", BDB version %d\n",
(int)sizeof(vbt->signature), vbt->signature, bdb->version);

/* Grab useful general definitions */
parse_general_features(dev_priv, bdb);
Expand Down

0 comments on commit 3556dd4

Please sign in to comment.