* [PATCH] ubifs: Remove useless code in bytes_str_to_int
@ 2020-11-03 11:47 Chengsong Ke
0 siblings, 0 replies; only message in thread
From: Chengsong Ke @ 2020-11-03 11:47 UTC (permalink / raw)
To: richard, s.hauer; +Cc: linux-mtd, linux-kernel
From: k00524021 <kechengsong@huawei.com>
As a local variable, "endp" is neither refered nor returned
after this line "endp += 2", it looks like a useless code,
suggest to remove it.
Signed-off-by: Chengsong Ke <kechengsong@huawei.com>
---
drivers/mtd/ubi/build.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index e85b04e9716b..46a6dd75e533 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1351,8 +1351,6 @@ static int bytes_str_to_int(const char *str)
fallthrough;
case 'K':
result *= 1024;
- if (endp[1] == 'i' && endp[2] == 'B')
- endp += 2;
case '\0':
break;
default:
--
2.12.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-03 11:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 11:47 [PATCH] ubifs: Remove useless code in bytes_str_to_int Chengsong Ke
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).