mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: Oded Gabbay <ogabbay@kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] accel/qaic: silence some uninitialized variable warnings
Date: Fri, 12 May 2023 01:16:59 +0530	[thread overview]
Message-ID: <962011a6-9089-b678-6ac8-ce29b8ffa2fb@quicinc.com> (raw)
In-Reply-To: <d11ee378-7b06-4b5e-b56f-d66174be1ab3@kili.mountain>



On 5/3/2023 4:11 PM, Dan Carpenter wrote:
> Smatch complains that these are not initialized if get_cntl_version()
> fails but we still print them in the debug message.  Not the end of
> the world, but true enough.  Let's just initialize them to a dummy value
> to make the checker happy.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>   drivers/accel/qaic/qaic_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/accel/qaic/qaic_drv.c b/drivers/accel/qaic/qaic_drv.c
> index ff80eb571729..e10e8b603e37 100644
> --- a/drivers/accel/qaic/qaic_drv.c
> +++ b/drivers/accel/qaic/qaic_drv.c
> @@ -263,7 +263,7 @@ static void qaic_destroy_drm_device(struct qaic_device *qdev, s32 partition_id)
>   static int qaic_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
>   {
>   	struct qaic_device *qdev;
> -	u16 major, minor;
> +	u16 major = -1, minor = -1;
>   	int ret;
>   
>   	/*
> 

Thank you Dan for the patch.

Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

I agree with Jeff's comment to sort the variable declaration length wise.

      parent reply	other threads:[~2023-05-11 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 10:41 Dan Carpenter
2023-05-10 14:57 ` Jeffrey Hugo
2023-05-10 16:48   ` Dan Carpenter
2023-05-16 19:24     ` Jeffrey Hugo
2023-05-11 15:34 ` Carl Vanderlip
2023-05-11 19:46 ` Pranjal Ramajor Asha Kanojiya [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=962011a6-9089-b678-6ac8-ce29b8ffa2fb@quicinc.com \
    --to=quic_pkanojiy@quicinc.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.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 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®