Skip to content

Commit 1f165c8

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
scsi: ufs: qcom: Remove superfluous variable assignments
There are many instances where the variable assignments are not needed. Remove them. Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20231208065902.11006-5-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3a747c5 commit 1f165c8

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/ufs/host/ufs-qcom.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static int ufs_qcom_enable_lane_clks(struct ufs_qcom_host *host)
219219

220220
static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host)
221221
{
222-
int err = 0;
222+
int err;
223223
struct device *dev = host->hba->dev;
224224

225225
if (has_acpi_companion(dev))
@@ -237,7 +237,7 @@ static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host)
237237
static int ufs_qcom_check_hibern8(struct ufs_hba *hba)
238238
{
239239
int err;
240-
u32 tx_fsm_val = 0;
240+
u32 tx_fsm_val;
241241
unsigned long timeout = jiffies + msecs_to_jiffies(HBRN8_POLL_TOUT_MS);
242242

243243
do {
@@ -292,9 +292,9 @@ static void ufs_qcom_select_unipro_mode(struct ufs_qcom_host *host)
292292
*/
293293
static int ufs_qcom_host_reset(struct ufs_hba *hba)
294294
{
295-
int ret = 0;
295+
int ret;
296296
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
297-
bool reenable_intr = false;
297+
bool reenable_intr;
298298

299299
if (!host->core_reset) {
300300
dev_warn(hba->dev, "%s: reset control not set\n", __func__);
@@ -417,7 +417,7 @@ static int ufs_qcom_hce_enable_notify(struct ufs_hba *hba,
417417
enum ufs_notify_change_status status)
418418
{
419419
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
420-
int err = 0;
420+
int err;
421421

422422
switch (status) {
423423
case PRE_CHANGE:
@@ -463,7 +463,7 @@ static int ufs_qcom_cfg_timers(struct ufs_hba *hba, u32 gear,
463463
u32 core_clk_period_in_ns;
464464
u32 tx_clk_cycles_per_us = 0;
465465
unsigned long core_clk_rate = 0;
466-
u32 core_clk_cycles_per_us = 0;
466+
u32 core_clk_cycles_per_us;
467467

468468
static u32 pwm_fr_table[][2] = {
469469
{UFS_PWM_G1, 0x1},
@@ -1418,7 +1418,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
14181418
bool scale_up, enum ufs_notify_change_status status)
14191419
{
14201420
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
1421-
int err = 0;
1421+
int err;
14221422

14231423
/* check the host controller state before sending hibern8 cmd */
14241424
if (!ufshcd_is_hba_active(hba))
@@ -1689,7 +1689,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
16891689
struct platform_device *pdev = to_platform_device(hba->dev);
16901690
struct ufshcd_res_info *res;
16911691
struct resource *res_mem, *res_mcq;
1692-
int i, ret = 0;
1692+
int i, ret;
16931693

16941694
memcpy(hba->res, ufs_res_info, sizeof(ufs_res_info));
16951695

0 commit comments

Comments
 (0)