linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: zhengbin <zhengbin13@huawei.com>,
	"agross@kernel.org" <agross@kernel.org>,
	"pedrom.sousa@synopsys.com" <pedrom.sousa@synopsys.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: "yi.zhang@huawei.com" <yi.zhang@huawei.com>
Subject: Re: [PATCH v2] scsi: ufs: remove set but not used variable 'val'
Date: Mon, 26 Aug 2019 05:55:13 +0000	[thread overview]
Message-ID: <MN2PR04MB69917DEBB72E5350566FE8D1FCA10@MN2PR04MB6991.namprd04.prod.outlook.com> (raw)
In-Reply-To: <1566782149-63502-1-git-send-email-zhengbin13@huawei.com>

Looks fine to me.
Avri



________________________________________
From: zhengbin <zhengbin13@huawei.com>
Sent: Monday, August 26, 2019 4:15:49 AM
To: agross@kernel.org; Avri Altman; pedrom.sousa@synopsys.com; jejb@linux.ibm.com; martin.petersen@oracle.com; linux-scsi@vger.kernel.org
Cc: yi.zhang@huawei.com; zhengbin13@huawei.com
Subject: [PATCH v2] scsi: ufs: remove set but not used variable 'val'

CAUTION: This email originated from outside of Western Digital. Do not click on links or open attachments unless you recognize the sender and know that the content is safe.


Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/ufs/ufs-qcom.c: In function ufs_qcom_pwr_change_notify:
drivers/scsi/ufs/ufs-qcom.c:808:6: warning: variable val set but not used [-Wunused-but-set-variable]

Fixes: 1e1e465c6d23 ("scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/ufs/ufs-qcom.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 4473f33..02cdcef 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -800,7 +800,6 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
                                struct ufs_pa_layer_attr *dev_max_params,
                                struct ufs_pa_layer_attr *dev_req_params)
 {
-       u32 val;
        struct ufs_qcom_host *host = ufshcd_get_variant(hba);
        struct ufs_dev_params ufs_qcom_cap;
        int ret = 0;
@@ -869,8 +868,6 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba,
                        ret = -EINVAL;
                }

-               val = ~(MAX_U32 << dev_req_params->lane_tx);
-
                /* cache the power mode parameters to use internally */
                memcpy(&host->dev_req_params,
                                dev_req_params, sizeof(*dev_req_params));
--
2.7.4


  reply	other threads:[~2019-08-26  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  1:15 [PATCH v2] scsi: ufs: remove set but not used variable 'val' zhengbin
2019-08-26  5:55 ` Avri Altman [this message]
2019-08-29 22:05 ` Martin K. Petersen

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=MN2PR04MB69917DEBB72E5350566FE8D1FCA10@MN2PR04MB6991.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=agross@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pedrom.sousa@synopsys.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhengbin13@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).