drm: don't push static constants on stack for %*ph
Subsystems (5)
PATCH 1/1 drm: don't push static constants on stack for %*ph
There is no need to pass constants via stack. The width may be explicitly specified in the format.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/gpu/drm/nouveau/core/engine/disp/dport.c | 2 +- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/udl/udl_main.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/core/engine/disp/dport.c +1 -1
@@ -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 ; }
drivers/gpu/drm/radeon/atombios_dp.c +1 -1
@@ -585,7 +585,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; }
drivers/gpu/drm/udl/udl_main.c +2 -2
@@ -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 */
Signature · 1 line
1.8.4.rc0
Hi
Quoted 2 lines · Andy Shevchenko
There is no need to pass constants via stack. The width may be explicitly specified in the format.
Yupp, all 3 make sense and actually speed up "format_decode()".
Reviewed-by David Herrmann <[email protected]>
Regards
David
Quoted 55 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpu/drm/nouveau/core/engine/disp/dport.c | 2 +- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/udl/udl_main.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/nouveau/core/engine/disp/dport.c +1
-1@@ -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 ; }drivers/gpu/drm/radeon/atombios_dp.c +1
-1@@ -585,7 +585,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; }drivers/gpu/drm/udl/udl_main.c +2
-3@@ -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 */ --1.8.4.rc0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel