* [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code [not found] <CGME20221121003431epcas1p1429429bf4bc1670c7b82b3889c017049@epcas1p1.samsung.com> @ 2022-11-21 0:33 ` Chanwoo Lee 2022-11-21 19:20 ` Bart Van Assche ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Chanwoo Lee @ 2022-11-21 0:33 UTC (permalink / raw) To: stanley.chu, jejb, martin.petersen, matthias.bgg, linux-scsi, linux-mediatek Cc: ChanWoo Lee From: ChanWoo Lee <cw9316.lee@samsung.com> Modify to remove unnecessary 'return 0' code. Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com> --- drivers/ufs/host/ufs-mediatek.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index ef5816d82326..21d9b047539f 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -1095,7 +1095,7 @@ static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba) } } -static int ufs_mtk_post_link(struct ufs_hba *hba) +static void ufs_mtk_post_link(struct ufs_hba *hba) { /* enable unipro clock gating feature */ ufs_mtk_cfg_unipro_cg(hba, true); @@ -1106,8 +1106,6 @@ static int ufs_mtk_post_link(struct ufs_hba *hba) FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, 3); ufs_mtk_setup_clk_gating(hba); - - return 0; } static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, @@ -1120,7 +1118,7 @@ static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, ret = ufs_mtk_pre_link(hba); break; case POST_CHANGE: - ret = ufs_mtk_post_link(hba); + ufs_mtk_post_link(hba); break; default: ret = -EINVAL; @@ -1272,9 +1270,8 @@ static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op, struct arm_smccc_res res; if (status == PRE_CHANGE) { - if (!ufshcd_is_auto_hibern8_supported(hba)) - return 0; - ufs_mtk_auto_hibern8_disable(hba); + if (ufshcd_is_auto_hibern8_supported(hba)) + ufs_mtk_auto_hibern8_disable(hba); return 0; } -- 2.29.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code 2022-11-21 0:33 ` [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code Chanwoo Lee @ 2022-11-21 19:20 ` Bart Van Assche 2022-11-26 2:33 ` Martin K. Petersen 2022-12-01 3:45 ` Martin K. Petersen 2 siblings, 0 replies; 4+ messages in thread From: Bart Van Assche @ 2022-11-21 19:20 UTC (permalink / raw) To: Chanwoo Lee, stanley.chu, jejb, martin.petersen, matthias.bgg, linux-scsi, linux-mediatek On 11/20/22 16:33, Chanwoo Lee wrote: > From: ChanWoo Lee <cw9316.lee@samsung.com> > > Modify to remove unnecessary 'return 0' code. > > Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com> > --- > drivers/ufs/host/ufs-mediatek.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c > index ef5816d82326..21d9b047539f 100644 > --- a/drivers/ufs/host/ufs-mediatek.c > +++ b/drivers/ufs/host/ufs-mediatek.c > @@ -1095,7 +1095,7 @@ static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba) > } > } > > -static int ufs_mtk_post_link(struct ufs_hba *hba) > +static void ufs_mtk_post_link(struct ufs_hba *hba) > { > /* enable unipro clock gating feature */ > ufs_mtk_cfg_unipro_cg(hba, true); > @@ -1106,8 +1106,6 @@ static int ufs_mtk_post_link(struct ufs_hba *hba) > FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, 3); > > ufs_mtk_setup_clk_gating(hba); > - > - return 0; > } > > static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, > @@ -1120,7 +1118,7 @@ static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, > ret = ufs_mtk_pre_link(hba); > break; > case POST_CHANGE: > - ret = ufs_mtk_post_link(hba); > + ufs_mtk_post_link(hba); > break; > default: > ret = -EINVAL; > @@ -1272,9 +1270,8 @@ static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op, > struct arm_smccc_res res; > > if (status == PRE_CHANGE) { > - if (!ufshcd_is_auto_hibern8_supported(hba)) > - return 0; > - ufs_mtk_auto_hibern8_disable(hba); > + if (ufshcd_is_auto_hibern8_supported(hba)) > + ufs_mtk_auto_hibern8_disable(hba); > return 0; > } The last hunk is not related to the other hunks and hence probably should have been a separate patch. Anyway: Reviewed-by: Bart Van Assche <bvanassche@acm.org> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code 2022-11-21 0:33 ` [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code Chanwoo Lee 2022-11-21 19:20 ` Bart Van Assche @ 2022-11-26 2:33 ` Martin K. Petersen 2022-12-01 3:45 ` Martin K. Petersen 2 siblings, 0 replies; 4+ messages in thread From: Martin K. Petersen @ 2022-11-26 2:33 UTC (permalink / raw) To: Chanwoo Lee Cc: stanley.chu, jejb, martin.petersen, matthias.bgg, linux-scsi, linux-mediatek Chanwoo, > Modify to remove unnecessary 'return 0' code. Applied to 6.2/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code 2022-11-21 0:33 ` [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code Chanwoo Lee 2022-11-21 19:20 ` Bart Van Assche 2022-11-26 2:33 ` Martin K. Petersen @ 2022-12-01 3:45 ` Martin K. Petersen 2 siblings, 0 replies; 4+ messages in thread From: Martin K. Petersen @ 2022-12-01 3:45 UTC (permalink / raw) To: linux-mediatek, matthias.bgg, jejb, Chanwoo Lee, linux-scsi, stanley.chu Cc: Martin K . Petersen On Mon, 21 Nov 2022 09:33:38 +0900, Chanwoo Lee wrote: > From: ChanWoo Lee <cw9316.lee@samsung.com> > > Modify to remove unnecessary 'return 0' code. > > Applied to 6.2/scsi-queue, thanks! [1/1] scsi: ufs: ufs-mediatek: Remove unnecessary return code https://git.kernel.org/mkp/scsi/c/d29c32efebf3 -- Martin K. Petersen Oracle Linux Engineering ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-01 3:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20221121003431epcas1p1429429bf4bc1670c7b82b3889c017049@epcas1p1.samsung.com> 2022-11-21 0:33 ` [PATCH] scsi: ufs: ufs-mediatek: Remove unnecessary return code Chanwoo Lee 2022-11-21 19:20 ` Bart Van Assche 2022-11-26 2:33 ` Martin K. Petersen 2022-12-01 3:45 ` Martin K. Petersen
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).