[PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages

Krzysztof Kozlowski k.kozlowski at samsung.com
Thu Feb 4 02:17:32 UTC 2016


On 03.02.2016 21:42, Marek Szyprowski wrote:
> Drivers should use %p for printing pointers instead of hardcoding them
> as hexadecimal integers. This patch fixes compilation warnings on 64bit
> architectures.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c    |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c     |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_ipp.c     | 32 ++++++++++++++---------------
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c |  2 +-
>  4 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> index c747824..8a4f4a0 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> @@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev)
>  		goto err_put_clk;
>  	}
>  
> -	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
> +	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);

I don't oppose the patch itself but I have different concern. First -
probably you meant %pK because this is a writeable structure with
function pointers.
Second - why the ippdrv has to be printed? Is it useful for debugging?

Best regards,
Krzysztof



More information about the dri-devel mailing list