From: Serge Semin <fancer.lancer@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
linux-ntb@googlegroups.com, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
Date: Sun, 5 Sep 2021 18:35:53 +0300 [thread overview]
Message-ID: <20210905153553.nmmgv7w3t3oeqtca@mobilestation> (raw)
In-Reply-To: <20210609112128.184667-1-colin.king@canonical.com>
On Wed, Jun 09, 2021 at 12:21:28PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variables msg_data and spad_data are being initialized with values
> that are never read, they are being updated later on. The initializations
> are redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/ntb/test/ntb_pingpong.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Wow, missed this in my emails log. Thanks for the cleanup.
Acked-by: Serge Semin <fancer.lancer@gmail.com>
>
> diff --git a/drivers/ntb/test/ntb_pingpong.c b/drivers/ntb/test/ntb_pingpong.c
> index 2164e8492772..8aeca7914050 100644
> --- a/drivers/ntb/test/ntb_pingpong.c
> +++ b/drivers/ntb/test/ntb_pingpong.c
> @@ -187,7 +187,7 @@ static void pp_ping(struct pp_ctx *pp)
>
> static void pp_pong(struct pp_ctx *pp)
> {
> - u32 msg_data = -1, spad_data = -1;
> + u32 msg_data, spad_data;
> int pidx = 0;
>
> /* Read pong data */
> --
> 2.31.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-ntb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/20210609112128.184667-1-colin.king%40canonical.com.
prev parent reply other threads:[~2021-09-05 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 11:21 [PATCH] ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data Colin King
2021-09-05 15:35 ` Serge Semin [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=20210905153553.nmmgv7w3t3oeqtca@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=colin.king@canonical.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.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;
as well as URLs for NNTP newsgroup(s).