From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Prathu Baronia <prathubaronia2011@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Khadija Kamran" <kamrankhadijadj@gmail.com>,
"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
dan.carpenter@linaro.org, error27@gmail.com, lkp@intel.com,
oe-kbuild-all@lists.linux.dev, oe-kbuild@lists.linux.dev
Subject: Re: [PATCH v4 1/3] axis-fifo: fix smatch warning for format specifier
Date: Sun, 28 May 2023 09:59:27 +0100 [thread overview]
Message-ID: <2023052814-savage-culprit-2096@gregkh> (raw)
In-Reply-To: <20230527115101.47569-1-prathubaronia2011@gmail.com>
On Sat, May 27, 2023 at 05:20:58PM +0530, Prathu Baronia wrote:
> Fix an old smatch warning reported by lkp introduced by commit
> d2d7aa53891e. In the mentioned commit we had used "%pa" format specifier
> for a void* type and hence smatch complained about its use instead of
> "%p".
>
> Fixes: d2d7aa53891e ("staging: axis-fifo: convert to use miscdevice")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/r/202305150358.nt1BkbXz-lkp@intel.com/
> Signed-off-by: Prathu Baronia <prathubaronia2011@gmail.com>
> ---
> V3 -> V4: Split into warning fixing and cleanup commits
> V2 -> V3: Fix smatch warnings from kernel test robot
> V1 -> V2: Split into logical commits and fix commit message
>
> drivers/staging/axis-fifo/axis-fifo.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index 7a21f2423204..271cab805cad 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -906,8 +906,8 @@ static int axis_fifo_probe(struct platform_device *pdev)
> if (rc < 0)
> goto err_initial;
>
> - dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%pa, irq=%i\n",
> - &r_mem->start, &fifo->base_addr, fifo->irq);
> + dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%p, irq=%i\n",
> + &r_mem->start, fifo->base_addr, fifo->irq);
In looking at this further, this whole dev_info() line should just be
removed. When drivers work properly, they are quiet, otherwise the
kernel log would look even worse than it currently is.
So please just remove this entirely. Also, attempting to print memory
addresses to the kernel log is very suspect and generally frowned apon,
which is another reason this shouldn't be done.
thanks,
greg k-h
next prev parent reply other threads:[~2023-05-28 8:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-13 21:40 [PATCH] axis-fifo: use devm_kasprintf for device name Prathu Baronia
2023-05-14 6:37 ` Greg Kroah-Hartman
2023-05-14 13:01 ` Prathu Baronia
2023-05-14 13:01 ` [PATCH v2 1/2] axis-fifo: use devm_kasprintf() for allocating formatted strings Prathu Baronia
2023-05-15 7:42 ` Dan Carpenter
2023-05-18 14:31 ` Prathu Baronia
2023-05-18 14:51 ` [PATCH v3 " Prathu Baronia
2023-05-18 14:51 ` [PATCH v3 2/2] axis-fifo: cleanup space issues with fops struct Prathu Baronia
2023-05-27 7:35 ` [PATCH v3 1/2] axis-fifo: use devm_kasprintf() for allocating formatted strings Greg KH
2023-05-27 8:53 ` Prathu Baronia
2023-05-27 11:50 ` [PATCH v4 1/3] axis-fifo: fix smatch warning for format specifier Prathu Baronia
2023-05-27 11:50 ` [PATCH v4 2/3] axis-fifo: use devm_kasprintf() for allocating formatted strings Prathu Baronia
2023-05-28 9:00 ` Greg Kroah-Hartman
2023-06-13 16:03 ` Prathu Baronia
2023-05-27 11:51 ` [PATCH v4 3/3] axis-fifo: cleanup space issues with fops struct Prathu Baronia
2023-05-27 22:31 ` Uwe Kleine-König
2023-05-28 8:57 ` Greg Kroah-Hartman
2023-06-13 16:01 ` Prathu Baronia
2023-06-13 15:56 ` Prathu Baronia
2023-05-28 8:59 ` Greg Kroah-Hartman [this message]
2023-06-13 16:02 ` [PATCH v4 1/3] axis-fifo: fix smatch warning for format specifier Prathu Baronia
2023-06-16 15:25 ` [PATCH v5 1/2] axis-fifo: use devm_kasprintf() for allocating formatted strings Prathu Baronia
2023-06-16 15:26 ` [PATCH v5 2/2] axis-fifo: remove the unnecessary dev_info() Prathu Baronia
2023-06-17 14:00 ` [PATCH v5 1/2] axis-fifo: use devm_kasprintf() for allocating formatted strings Greg Kroah-Hartman
2023-06-19 6:43 ` Prathu Baronia
2023-06-19 16:22 ` [PATCH v6 " Prathu Baronia
2023-06-19 16:22 ` [PATCH v6 2/2] axis-fifo: change device name by assigning unique device id Prathu Baronia
2023-06-20 5:18 ` [PATCH v6 1/2] axis-fifo: use devm_kasprintf() for allocating formatted strings Dan Carpenter
2023-06-20 9:24 ` Greg Kroah-Hartman
2023-05-14 13:01 ` [PATCH v2 2/2] axis-fifo: cleanup space issues with fops struct Prathu Baronia
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=2023052814-savage-culprit-2096@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=fmdefrancesco@gmail.com \
--cc=kamrankhadijadj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=prathubaronia2011@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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