All of lore.kernel.org
 help / color / mirror / Atom feed
* + lib-remove-redundant-assignment-to-variable-num.patch added to mm-nonmm-unstable branch
@ 2022-10-17 22:28 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-17 22:28 UTC (permalink / raw)
  To: mm-commits, colin.i.king, akpm


The patch titled
     Subject: lib/oid_registry.c: remove redundant assignment to variable num
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     lib-remove-redundant-assignment-to-variable-num.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-remove-redundant-assignment-to-variable-num.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Colin Ian King <colin.i.king@gmail.com>
Subject: lib/oid_registry.c: remove redundant assignment to variable num
Date: Mon, 17 Oct 2022 22:45:56 +0100

The variable num is being assigned a value that is never read, it is being
re-assigned a new value in both paths if an if-statement.  The assignment
is redundant and can be removed.

Cleans up clang scan build warning:
lib/oid_registry.c:149:3: warning: Value stored to 'num' is
never read [deadcode.DeadStores]

Link: https://lkml.kernel.org/r/20221017214556.863357-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/oid_registry.c |    1 -
 1 file changed, 1 deletion(-)

--- a/lib/oid_registry.c~lib-remove-redundant-assignment-to-variable-num
+++ a/lib/oid_registry.c
@@ -146,7 +146,6 @@ int sprint_oid(const void *data, size_t
 	bufsize -= count;
 
 	while (v < end) {
-		num = 0;
 		n = *v++;
 		if (!(n & 0x80)) {
 			num = n;
_

Patches currently in -mm which might be from colin.i.king@gmail.com are

lib-remove-redundant-assignment-to-variable-num.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-17 22:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 22:28 + lib-remove-redundant-assignment-to-variable-num.patch added to mm-nonmm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.