Re: [PATCH] drm/radeon: use raw buffer printk specifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-12-21 at 12:04 +0200, Dmitry Rozhkov wrote:
> printk format strings accepting a single subsequent argument
> are shorter thus easier to read.
> 
> Instead of having format strings accepting 3 different arguments
> pointing to first 3 bytes of the same buffer rewrite the format
> string to accept only one argument - the buffer - with "%3ph"
> specifier.
> 

+Cc maintainers

> Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@xxxxxxxxxxxxxxx>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 183b4b482138..ca2bcfb32935 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -718,7 +718,7 @@ radeon_dp_mst_check_status(struct radeon_connector
> *radeon_connector)
>  				       DP_SINK_COUNT_ESI, esi, 8);
>  go_again:
>  		if (dret == 8) {
> -			DRM_DEBUG_KMS("got esi %02x %02x %02x\n",
> esi[0], esi[1], esi[2]);
> +			DRM_DEBUG_KMS("got esi %3ph\n", esi);
>  			ret = drm_dp_mst_hpd_irq(&radeon_connector-
> >mst_mgr, esi, &handled);
>  
>  			if (handled) {
> @@ -733,7 +733,7 @@ radeon_dp_mst_check_status(struct radeon_connector
> *radeon_connector)
>  				dret =
> drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux,
>  							DP_SINK_COUNT
> _ESI, esi, 8);
>  				if (dret == 8) {
> -					DRM_DEBUG_KMS("got esi2 %02x
> %02x %02x\n", esi[0], esi[1], esi[2]);
> +					DRM_DEBUG_KMS("got esi2
> %3ph\n", esi);
>  					goto go_again;
>  				}
>  			} else

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux