From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Inki Dae <inki.dae@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org
Cc: Joonyoung Shim <jy0922.shim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages
Date: Thu, 04 Feb 2016 11:45:37 +0900 [thread overview]
Message-ID: <56B2BB51.5030504@samsung.com> (raw)
In-Reply-To: <56B2B8A8.3090409@samsung.com>
On 04.02.2016 11:34, Inki Dae wrote:
>
>
> 2016년 02월 04일 11:17에 Krzysztof Kozlowski 이(가) 쓴 글:
>> 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@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?
>
> Marek fixed just compilation warnings on ARM64 so yes it wouldn't need to print out ippdrv address but as other cleanup patch.
Another patch?
There is no point in a flow like this:
1. Make a patch which changes %x to %p.
2. Make a second patch right after the first one which changes %p to %pK.
3. Optionally make a third patch removing %pK entirely.
There are two issues here (and in other places like in patch 3/10) -
64bit compilation warnings and security related issues. Properly fixing
security related issues would fix in the same time the compilation
warnings...
Best regards,
Krzysztof
next prev parent reply other threads:[~2016-02-04 2:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
2016-02-11 11:17 ` Inki Dae
2016-02-03 12:42 ` [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages Marek Szyprowski
2016-02-04 2:17 ` Krzysztof Kozlowski
2016-02-04 2:34 ` Inki Dae
2016-02-04 2:45 ` Krzysztof Kozlowski [this message]
2016-02-03 12:42 ` [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures Marek Szyprowski
2016-02-03 12:42 ` [PATCH 04/10] drm/exynos: mic: use devm_clk interface Marek Szyprowski
2016-02-03 12:42 ` [PATCH 05/10] drm/exynos: mic: convert to component framework Marek Szyprowski
2016-02-03 12:42 ` [PATCH 06/10] drm/exynos: mic: make all functions static Marek Szyprowski
2016-02-03 12:42 ` [PATCH 07/10] drm/exynos: dsi: restore support for drm bridge Marek Szyprowski
2016-02-03 12:42 ` [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device Marek Szyprowski
2016-02-12 5:55 ` Inki Dae
2016-02-12 8:44 ` Marek Szyprowski
2016-02-03 12:42 ` [PATCH 09/10] drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable Marek Szyprowski
2016-02-03 12:42 ` [PATCH 10/10] drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable Marek Szyprowski
2016-02-08 11:14 ` [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Emil Velikov
2016-02-12 9:19 ` Andrzej Hajda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B2BB51.5030504@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=a.hajda@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.