Commit 1f165c87 authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Martin K. Petersen

scsi: ufs: qcom: Remove superfluous variable assignments

There are many instances where the variable assignments are not needed.
Remove them.
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Signed-off-by: default avatarManivannan 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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3a747c5c
...@@ -219,7 +219,7 @@ static int ufs_qcom_enable_lane_clks(struct ufs_qcom_host *host) ...@@ -219,7 +219,7 @@ static int ufs_qcom_enable_lane_clks(struct ufs_qcom_host *host)
static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host) static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host)
{ {
int err = 0; int err;
struct device *dev = host->hba->dev; struct device *dev = host->hba->dev;
if (has_acpi_companion(dev)) if (has_acpi_companion(dev))
...@@ -237,7 +237,7 @@ static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host) ...@@ -237,7 +237,7 @@ static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host)
static int ufs_qcom_check_hibern8(struct ufs_hba *hba) static int ufs_qcom_check_hibern8(struct ufs_hba *hba)
{ {
int err; int err;
u32 tx_fsm_val = 0; u32 tx_fsm_val;
unsigned long timeout = jiffies + msecs_to_jiffies(HBRN8_POLL_TOUT_MS); unsigned long timeout = jiffies + msecs_to_jiffies(HBRN8_POLL_TOUT_MS);
do { do {
...@@ -292,9 +292,9 @@ static void ufs_qcom_select_unipro_mode(struct ufs_qcom_host *host) ...@@ -292,9 +292,9 @@ static void ufs_qcom_select_unipro_mode(struct ufs_qcom_host *host)
*/ */
static int ufs_qcom_host_reset(struct ufs_hba *hba) static int ufs_qcom_host_reset(struct ufs_hba *hba)
{ {
int ret = 0; int ret;
struct ufs_qcom_host *host = ufshcd_get_variant(hba); struct ufs_qcom_host *host = ufshcd_get_variant(hba);
bool reenable_intr = false; bool reenable_intr;
if (!host->core_reset) { if (!host->core_reset) {
dev_warn(hba->dev, "%s: reset control not set\n", __func__); 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, ...@@ -417,7 +417,7 @@ static int ufs_qcom_hce_enable_notify(struct ufs_hba *hba,
enum ufs_notify_change_status status) enum ufs_notify_change_status status)
{ {
struct ufs_qcom_host *host = ufshcd_get_variant(hba); struct ufs_qcom_host *host = ufshcd_get_variant(hba);
int err = 0; int err;
switch (status) { switch (status) {
case PRE_CHANGE: case PRE_CHANGE:
...@@ -463,7 +463,7 @@ static int ufs_qcom_cfg_timers(struct ufs_hba *hba, u32 gear, ...@@ -463,7 +463,7 @@ static int ufs_qcom_cfg_timers(struct ufs_hba *hba, u32 gear,
u32 core_clk_period_in_ns; u32 core_clk_period_in_ns;
u32 tx_clk_cycles_per_us = 0; u32 tx_clk_cycles_per_us = 0;
unsigned long core_clk_rate = 0; unsigned long core_clk_rate = 0;
u32 core_clk_cycles_per_us = 0; u32 core_clk_cycles_per_us;
static u32 pwm_fr_table[][2] = { static u32 pwm_fr_table[][2] = {
{UFS_PWM_G1, 0x1}, {UFS_PWM_G1, 0x1},
...@@ -1418,7 +1418,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, ...@@ -1418,7 +1418,7 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
bool scale_up, enum ufs_notify_change_status status) bool scale_up, enum ufs_notify_change_status status)
{ {
struct ufs_qcom_host *host = ufshcd_get_variant(hba); struct ufs_qcom_host *host = ufshcd_get_variant(hba);
int err = 0; int err;
/* check the host controller state before sending hibern8 cmd */ /* check the host controller state before sending hibern8 cmd */
if (!ufshcd_is_hba_active(hba)) if (!ufshcd_is_hba_active(hba))
...@@ -1689,7 +1689,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba) ...@@ -1689,7 +1689,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
struct platform_device *pdev = to_platform_device(hba->dev); struct platform_device *pdev = to_platform_device(hba->dev);
struct ufshcd_res_info *res; struct ufshcd_res_info *res;
struct resource *res_mem, *res_mcq; struct resource *res_mem, *res_mcq;
int i, ret = 0; int i, ret;
memcpy(hba->res, ufs_res_info, sizeof(ufs_res_info)); memcpy(hba->res, ufs_res_info, sizeof(ufs_res_info));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment