Thread (2 messages) 2 messages, 2 authors, 2019-08-24

Re: [PATCH] scsi: ufs: remove set but not used variable 'val'

From: Avri Altman <Avri.Altman@wdc.com>
Date: 2019-08-24 10:03:34
Subsystem: scsi subsystem, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

nit: you are missing the 'fixes' tag:
fixes: 1e1e465c6d23 (scsi/ufs: qcom: Remove ufs_qcom_phy_*() calls from host)

Otherwise, looks good to me.

Thanks,
Avri
________________________________________
From: zhengbin <redacted>
Sent: Friday, August 23, 2019 5:15 PM
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] 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]

Reported-by: Hulk Robot <redacted>
Signed-off-by: zhengbin <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help