public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/uv: remove redundant check of p == q
@ 2018-07-30 10:31 Colin King
  2018-07-31  5:56 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-30 10:31 UTC (permalink / raw)
  To: kernel-janitors

From: Colin Ian King <colin.king@canonical.com>

The check for p = q is dead code because the proceeding switch
statements jump to the end of the outer for-loop with continue
statements.  Remove the dead code.

Detected by CoverityScan, CID#145071 ("Structureally dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 arch/x86/platform/uv/tlb_uv.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index ca446da48fd2..e26dfad507c8 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1607,8 +1607,6 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr,
 				*tunables[cnt].tunp = val;
 			continue;
 		}
-		if (q = p)
-			break;
 	}
 	return 0;
 }
-- 
2.17.1


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

* Re: [PATCH] x86/uv: remove redundant check of p == q
  2018-07-30 10:31 [PATCH] x86/uv: remove redundant check of p == q Colin King
@ 2018-07-31  5:56 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2018-07-31  5:56 UTC (permalink / raw)
  To: kernel-janitors


* Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The check for p = q is dead code because the proceeding switch
> statements jump to the end of the outer for-loop with continue
> statements.  Remove the dead code.
> 
> Detected by CoverityScan, CID#145071 ("Structureally dead code")

Do they really spell it "structureally", or is that your typo?

Also, pease Cc: x86 patches to lkml.

Thanks,

	Ingo

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

end of thread, other threads:[~2018-07-31  5:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 10:31 [PATCH] x86/uv: remove redundant check of p == q Colin King
2018-07-31  5:56 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox