diff mbox series

scsi: ufs: ufs-mediatek: delete some dead code

Message ID 68fce64f-4970-45f1-807e-6c0eecdfcdc2@kili.mountain (mailing list archive)
State Accepted
Headers show
Series scsi: ufs: ufs-mediatek: delete some dead code | expand

Commit Message

Dan Carpenter May 3, 2023, 10:40 a.m. UTC
There is already a test for "if (val == state)" earlier so it's not
possible here.  Delete the dead code.

Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/ufs/host/ufs-mediatek.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

AngeloGioacchino Del Regno May 3, 2023, 11:42 a.m. UTC | #1
Il 03/05/23 12:40, Dan Carpenter ha scritto:
> There is already a test for "if (val == state)" earlier so it's not
> possible here.  Delete the dead code.
> 
> Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Stanley Jhu May 3, 2023, 2:47 p.m. UTC | #2
Dan Carpenter <dan.carpenter@linaro.org> 於 2023年5月3日 週三 下午6:41寫道:
>
> There is already a test for "if (val == state)" earlier so it's not
> possible here.  Delete the dead code.
>
> Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Martin K. Petersen May 6, 2023, 10:46 p.m. UTC | #3
Dan,

> There is already a test for "if (val == state)" earlier so it's not
> possible here. Delete the dead code.

Applied to 6.5/scsi-staging, thanks!
Martin K. Petersen May 17, 2023, 2:12 a.m. UTC | #4
On Wed, 03 May 2023 13:40:59 +0300, Dan Carpenter wrote:

> There is already a test for "if (val == state)" earlier so it's not
> possible here.  Delete the dead code.
> 
> 

Applied to 6.5/scsi-queue, thanks!

[1/1] scsi: ufs: ufs-mediatek: delete some dead code
      https://git.kernel.org/mkp/scsi/c/19c9322e36a0
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 73e217260390..a054810e321d 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -410,9 +410,6 @@  static int ufs_mtk_wait_link_state(struct ufs_hba *hba, u32 state,
 		usleep_range(100, 200);
 	} while (ktime_before(time_checked, timeout));
 
-	if (val == state)
-		return 0;
-
 	return -ETIMEDOUT;
 }