From: Guenter Roeck <linux@roeck-us.net>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: wim@linux-watchdog.org, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com, linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: Re: [PATCH] watchdog: stm32: replace "%p" with "%pK"
Date: Sat, 7 Jul 2018 14:26:24 -0700 [thread overview]
Message-ID: <20180707212624.GC1951@roeck-us.net> (raw)
In-Reply-To: <20180706130808.22466-1-benjamin.gaignard@st.com>
On Fri, Jul 06, 2018 at 03:08:08PM +0200, Benjamin Gaignard wrote:
> The format specifier "%p" can leak kernel addresses.
> Use "%pK" instead.
>
The pointer has zero value either way. If the clock has a name,
it might make sense to display it. Otherwise just drop the pointer.
Guenter
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
> drivers/watchdog/stm32_iwdg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
> index c97ad5619cb0..740f74a98644 100644
> --- a/drivers/watchdog/stm32_iwdg.c
> +++ b/drivers/watchdog/stm32_iwdg.c
> @@ -172,7 +172,7 @@ static int stm32_iwdg_probe(struct platform_device *pdev)
>
> ret = clk_prepare_enable(clk);
> if (ret) {
> - dev_err(&pdev->dev, "Unable to prepare clock %p\n", clk);
> + dev_err(&pdev->dev, "Unable to prepare clock %pK\n", clk);
> return ret;
> }
>
> --
> 2.15.0
>
prev parent reply other threads:[~2018-07-07 21:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 13:08 Benjamin Gaignard
2018-07-07 21:26 ` Guenter Roeck [this message]
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=20180707212624.GC1951@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=benjamin.gaignard@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=wim@linux-watchdog.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®