linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com,
	Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH] reset: reset-zynqmp: Fixed the argument data type
Date: Wed, 11 Aug 2021 12:36:21 +0200	[thread overview]
Message-ID: <20210811103621.GA23827@pengutronix.de> (raw)
In-Reply-To: <925cebbe4eb73c7d0a536da204748d33c7100d8c.1624448778.git.michal.simek@xilinx.com>

On Wed, 23 Jun 2021 13:46:20 +0200, Michal Simek wrote:
> From: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> 
> This patch changes the data type of the variable 'val' from
> int to u32.
> 
> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Addresses-Coverity: argument of type "int *" is incompatible with parameter of type "u32 *"
> ---
> 
>  drivers/reset/reset-zynqmp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c
> index daa425e74c96..59dc0ff9af9e 100644
> --- a/drivers/reset/reset-zynqmp.c
> +++ b/drivers/reset/reset-zynqmp.c
> @@ -53,7 +53,8 @@ static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
>  			       unsigned long id)
>  {
>  	struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev);
> -	int val, err;
> +	int err;
> +	u32 val;

The function returns val as int instead of u32. While this shouldn't be a
problem in this case, maybe there should be an additional check just to be
sure?

Michael

>  
>  	err = zynqmp_pm_reset_get_status(priv->data->reset_id + id, &val);
>  	if (err)
> -- 
> 2.32.0

  parent reply	other threads:[~2021-08-11 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 11:46 [PATCH] reset: reset-zynqmp: Fixed the argument data type Michal Simek
2021-08-06 10:25 ` Michal Simek
2021-08-11 10:36 ` Michael Tretter [this message]
2021-08-11 11:29   ` Michal Simek
2021-08-23 10:56 ` Philipp Zabel

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=20210811103621.GA23827@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=git@xilinx.com \
    --cc=kernel@pengutronix.de \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=p.zabel@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;
as well as URLs for NNTP newsgroup(s).