public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Jeffrey Hugo <jhugo@codeaurora.org>,
	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
Date: Mon, 15 Mar 2021 09:35:34 +0530	[thread overview]
Message-ID: <20210315040534.GA80095@thinkpad> (raw)
In-Reply-To: <20210311111727.8433-1-colin.king@canonical.com>

On Thu, Mar 11, 2021 at 11:17:27AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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 <colin.king@canonical.com>

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

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
> 

  parent reply	other threads:[~2021-03-15  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 11:17 [PATCH][next] bus: mhi: core: remove redundant initialization of variables state and ee Colin King
2021-03-14  8:21 ` Loic Poulain
2021-03-15  4:05 ` Manivannan Sadhasivam [this message]
2021-03-15  4:27 ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315040534.GA80095@thinkpad \
    --to=mani@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=jhugo@codeaurora.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox