kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
@ 2021-06-09 11:21 Colin King
  2021-09-05 15:35 ` Serge Semin
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-06-09 11:21 UTC (permalink / raw)
  To: Jon Mason, Dave Jiang, linux-ntb; +Cc: kernel-janitors, linux-kernel

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(-)

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Serge Semin @ 2021-09-05 15:35 UTC (permalink / raw)
  To: Colin King
  Cc: Serge Semin, Jon Mason, Dave Jiang, linux-ntb, kernel-janitors,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-05 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).