From patchwork Fri May 7 07:45:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaokun Zhang X-Patchwork-Id: 12244063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B59C43461 for ; Fri, 7 May 2021 07:47:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FA9361451 for ; Fri, 7 May 2021 07:47:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FA9361451 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=H+Vcc8Ayi89uyLYlyffe1k6sRsBogVV3ErA4mi+2cJs=; b=deaSFLv6qxTu8CMBzcRJx0V8XD vCqXSVx8tDQVElZFqd3sHOTEHsHqXZ5knNVmuu/D6nFAVwIxS3ipU4Tf6EDx4wO0l7S89yrFt7YIq Gap/jsGhCp9YNbYAtLEgXK8ZSaEwxPV9tP9LXwBb/u7mc6wKtxJQcx2KKHCM2gbwULf24RHYZxu4Q y/OjaG0/axcrS4HxuvCIhVknP7g/Fzrc+Jol99o5jyrdXd9U3+m89ik+iHnQVZqgawv668PXK3tas V6SsIaI+AlbgSsWaEFAHEIeUu5EzezPA+nrglxi04Ops/bXfxWj3iAA+7/NAKdc/KOOf6saPucoVw ifggKdMg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1levBL-006Pt9-Cm; Fri, 07 May 2021 07:45:55 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1levBH-006Psn-VE for linux-arm-kernel@desiato.infradead.org; Fri, 07 May 2021 07:45:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=Pr2bmQq7SoAbaHgNnYZ9zT7WfQLMT7FuN+5aoQQbIws=; b=ZRIFtgEGDGAv9qHlQUy+RwdzSm qQdY9basIF55EQz1ojl1lzlaVezyJdjbt/Kwcwn8k8AOPGCYRx9TmVbwXNYupAJvtkrrygDmX0Er/ f4jmCdVt70/YMbtwFMVQVXFLzohtBOJp4PH8lecUzaB+DIkHPiUNWSfBSstgLlJX9XvOpfo0euTnN S4JFYGuumvV/rqhHrSXtJS9W3T7IKmJaabtZV2cK2lj27RB39S0qKxHsHPyKcMOMTPhwXgvNQoXg/ /zFCTzOTZa1QgR6rlPxIyBTkkXBIcxyHXRHc2h4453UV3eJA1DG3jWsRILvfAcd+JOEgktegXxOEz mWQ2EXwA==; Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1levBF-006f86-3C for linux-arm-kernel@lists.infradead.org; Fri, 07 May 2021 07:45:50 +0000 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Fc2Ts5fkxzQkCg; Fri, 7 May 2021 15:42:25 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Fri, 7 May 2021 15:45:35 +0800 From: Shaokun Zhang To: , CC: Shaokun Zhang , Mark Rutland , Marc Zyngier , Daniel Lezcano Subject: [PATCH] arm64: arch_timer: Remove redundant initialization Date: Fri, 7 May 2021 15:45:36 +0800 Message-ID: <1620373536-29154-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_004549_326898_39008BD0 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 'irq' and 'ret' will be initialized and cleanup the redundant initialization. Cc: Mark Rutland Cc: Marc Zyngier Cc: Daniel Lezcano Signed-off-by: Shaokun Zhang --- drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index fe1a82627d57..892871b48865 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -1430,7 +1430,7 @@ static int __init arch_timer_mem_frame_register(struct arch_timer_mem_frame *frame) { void __iomem *base; - int ret, irq = 0; + int ret, irq; if (arch_timer_mem_use_virtual) irq = frame->virt_irq; @@ -1574,7 +1574,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count) { struct arch_timer_mem *timers, *timer; struct arch_timer_mem_frame *frame, *best_frame = NULL; - int timer_count, i, ret = 0; + int timer_count, i, ret; timers = kcalloc(platform_timer_count, sizeof(*timers), GFP_KERNEL);