Skip to content

Commit

Permalink
drm: don't push static constants on stack for %*ph
Browse files Browse the repository at this point in the history
There is no need to pass constants via stack. The width may be explicitly
specified in the format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Andy Shevchenko authored and Dave Airlie committed Aug 7, 2013
1 parent baa7094 commit 08fcd72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/engine/disp/dport.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ dp_link_train_update(struct dp_state *dp, u32 delay)
if (ret)
return ret;

DBG("status %*ph\n", 6, dp->stat);
DBG("status %6ph\n", dp->stat);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/atombios_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static bool radeon_dp_get_link_status(struct radeon_connector *radeon_connector,
return false;
}

DRM_DEBUG_KMS("link status %*ph\n", 6, link_status);
DRM_DEBUG_KMS("link status %6ph\n", link_status);
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/udl/udl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ static int udl_parse_vendor_descriptor(struct drm_device *dev,
total_len = usb_get_descriptor(usbdev, 0x5f, /* vendor specific */
0, desc, MAX_VENDOR_DESCRIPTOR_SIZE);
if (total_len > 5) {
DRM_INFO("vendor descriptor length:%x data:%*ph\n",
total_len, 11, desc);
DRM_INFO("vendor descriptor length:%x data:%11ph\n",
total_len, desc);

if ((desc[0] != total_len) || /* descriptor length */
(desc[1] != 0x5f) || /* vendor descriptor type */
Expand Down

0 comments on commit 08fcd72

Please sign in to comment.