Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp261101pxf; Thu, 11 Mar 2021 03:19:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3E42IhWF2aeR/R2rmJpQIwGC3STcTu4WByGC1v1t6VNpSSiFWmerOV+WnN6YYy9aOxdq+ X-Received: by 2002:a17:906:9442:: with SMTP id z2mr2698729ejx.79.1615461590480; Thu, 11 Mar 2021 03:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615461590; cv=none; d=google.com; s=arc-20160816; b=0FOYuX2D6YDgabJp7RvTJ2J9iy+/JgZBcxx6MaYBgX4K6uKbNLOGPuoyaMLiR0w9NR fvKAKTcdpYghfdXwBim9MBGIoD9xg1zsXA7G/5OGKk3HQ6+FN+h3c20+GeisYrfAZ4fU Zb4BnB8Df/iaSzQOdSJD72HBWcgPaulkGIYX1Ptjq0HWCQjEfEW4XCKmsyrGQYQI6UNs jS6tOyK8hL5Je8ihXx6U+/HW4T+T31Vx8tY9Cvg6maEm/PoWaGJIgO/iLZCB07yAGybT p7STZ74EkZSzPA9QXNF46Bg4V/wEOFW6VeixqC+kCfnSOSobi9pend2w6sL/I2VCF2R2 QLFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9HUQ0HeBnxNWTPLKejtXb4WKWjY39z0KqvYAMTB7znk=; b=Rr/JL2YoW6Buv+KqibdcCqFOWFHhSTK3QlEb7sLgwYSih/ryPP+uao2Uw9QfmNkxIY ssrsIqWtyJmg4Fpz1Vq758IDsXpGLcQA3NmcOmzGzNYPKPFqZfdRTW24XEs4RXUyYCWw hYmH+MzS7HoFk+cDLPks4V2FnKeXuO8GP3n2Nk2bxba9+txeTC0eToHQQ1G5jJf5+w1p 7C4iAhD5jRbvzTm6YbD5lbE9nWmSbk1GF6HM9e26+RcPG1/PeM8Vz/2v5078i3TRG7Sy WrXulT1jYrqky1mV9ZJ1P9sc9idk6o1Ytzq1KKnez1O5xWOjSc1YUvpXGFzGw2bFihHv tayw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r27si1489310edw.299.2021.03.11.03.19.28; Thu, 11 Mar 2021 03:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232575AbhCKLR4 (ORCPT + 99 others); Thu, 11 Mar 2021 06:17:56 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54973 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbhCKLRb (ORCPT ); Thu, 11 Mar 2021 06:17:31 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lKJJn-0001lK-P3; Thu, 11 Mar 2021 11:17:27 +0000 From: Colin King To: Manivannan Sadhasivam , Jeffrey Hugo , linux-arm-msm@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] bus: mhi: core: remove redundant initialization of variables state and ee Date: Thu, 11 Mar 2021 11:17:27 +0000 Message-Id: <20210311111727.8433-1-colin.king@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variables state and ee are being initialized with values that are never read and are being updated later with a new values. The initializations are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/bus/mhi/core/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 2c61dfd01353..3faf8bade520 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -428,9 +428,9 @@ irqreturn_t mhi_intvec_threaded_handler(int irq_number, void *priv) { struct mhi_controller *mhi_cntrl = priv; struct device *dev = &mhi_cntrl->mhi_dev->dev; - enum mhi_state state = MHI_STATE_MAX; + enum mhi_state state; enum mhi_pm_state pm_state = 0; - enum mhi_ee_type ee = MHI_EE_MAX; + enum mhi_ee_type ee; write_lock_irq(&mhi_cntrl->pm_lock); if (!MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state)) { -- 2.30.2