From patchwork Tue Nov 3 11:56:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengsong Ke X-Patchwork-Id: 1331318 Return-Path: Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFCF0C2D0A3 for ; Tue, 3 Nov 2020 11:56:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F94921D40 for ; Tue, 3 Nov 2020 11:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728909AbgKCL4y (ORCPT ); Tue, 3 Nov 2020 06:56:54 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6697 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbgKCL4y (ORCPT ); Tue, 3 Nov 2020 06:56:54 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CQStn3PPrz15QX0; Tue, 3 Nov 2020 19:56:49 +0800 (CST) Received: from DESKTOP-2DH7KI2.china.huawei.com (10.67.101.108) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 3 Nov 2020 19:56:45 +0800 From: Chengsong Ke To: , CC: , Subject: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int Date: Tue, 3 Nov 2020 19:56:45 +0800 Message-ID: <20201103115645.684-1-kechengsong@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.67.101.108] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: k00524021 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 --- 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: