Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3004975pxf; Sun, 14 Mar 2021 21:07:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKhSseJz1E2fRxgeR1M1ipvcdQYIDyiO82RazlyB/Icteu7mZ1HMlyxAxgmN5bLeb3iTwA X-Received: by 2002:a17:906:3883:: with SMTP id q3mr21082461ejd.160.1615781239471; Sun, 14 Mar 2021 21:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615781239; cv=none; d=google.com; s=arc-20160816; b=Bj6ahR+aJ912wFxA7Se4OBnWSGNrBlW4mDbuisVp1LRXTGMOhwOE/jdYIy/X3vaayj ujxIEkFBsT/F3rizJGMN5/YbjlspUQ4ubeXZzauOFCKnot2oEhBlKqXp7cUP0SxdTLSx NROLh2tmXQIQlPHYPGAGWy76wXDcNQS+aZXcbimWWZ/ieB6MPGUspgDjUQmP41VlM6vm GaU9EJ43qlrBqqQruvMQ/6OY3mbbYgEE6QcYt6v72oiWPf1wCmcAT1VfEAfefF7iFJ2a rCp/C0Bu9YZuDYMCSYop9RbS4SgmB2RiegQBrURepf5Hl2e6q7WnTKwWQnuX++kfb2vE aNhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gk0vkbxQPgcPEx1gTZBdHQMViGZZLjAN5n2BMbzGGjU=; b=vj4vHgfolIat2YOQgP0V5GlUDhoH4UzdPM2Sjza+GoHPd0GR6OomYc/PJQpAQ95xoF ZDdGni5VLD/c3ROJd7DWd4ks7xyWCEJ9QYff0532Ir/F7mEu5LLDooJGM5exnQXjuZha wFu3+YMdUtUhwcZXNvFTl/Fnu8rZSdI3Jmi5B+OE0a7gL0OHs5rBMdjxfAkhSOiQnf6F DcC+qcDHo3kd8+FDYhLLptF2oBZ4bWthGj7sXHrU1fICdieQGCYpBg4/PNIoetswsF5J Qae1jbviPWb/bcWVrlw3x4dDCur/2Lt2ISWozMCI+nEcuyLaXQmCtlP6QM7MdxMsUc8S ql9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o3Y7UQUZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i13si9883601edq.522.2021.03.14.21.06.56; Sun, 14 Mar 2021 21:07:19 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o3Y7UQUZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229787AbhCOEFq (ORCPT + 99 others); Mon, 15 Mar 2021 00:05:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:54138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhCOEFl (ORCPT ); Mon, 15 Mar 2021 00:05:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 09D9264E3F; Mon, 15 Mar 2021 04:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615781141; bh=NP4gX/7kY+mDxqIuuLyrMr0pZfLGy0RRE6/sizVfms4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o3Y7UQUZ/eWfoTaZNvFTr4Xlxn2IuWHlKBoJ62A6m6BljT6aedAKDvA+Pq65IS5+D 2L18FsDgWD0RsGXZlxb4QCbVeCs9QnZcbllKinIt0I1Elrt4UYy9BW6xUx+2aThgcU 1DbJyVUZUNsql8I3vMt+c7lBD/zuuNTV03HXGe58wjPpwbPXdvIWFOqgZTFwHFsx8f 7y9a73WHpFTpEKq4CrfQYH+mytW+J1y5T04PZH68GzXRMUj7cVF474tT1ZrpFbrOKd SXt4dTAbt1fDoRulWckkmRK4espBo2TlvO2momk7bBPv4XBH8bedBViasTVLcCIlCf /0ASQqVea+vOw== Date: Mon, 15 Mar 2021 09:35:34 +0530 From: Manivannan Sadhasivam To: Colin King Cc: Jeffrey Hugo , linux-arm-msm@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] bus: mhi: core: remove redundant initialization of variables state and ee Message-ID: <20210315040534.GA80095@thinkpad> References: <20210311111727.8433-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210311111727.8433-1-colin.king@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 11:17:27AM +0000, Colin King wrote: > 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 Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > 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 >