* [PATCH 0/2] ufs:mcq:Code cleanups
[not found] <CGME20240105021130epcas1p2b77331ab0fc865cc3763765b0b5ecadf@epcas1p2.samsung.com>
@ 2024-01-05 2:10 ` Chanwoo Lee
2024-01-05 2:10 ` [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq Chanwoo Lee
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chanwoo Lee @ 2024-01-05 2:10 UTC (permalink / raw)
To: alim.akhtar, avri.altman, bvanassche, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, cw9316.lee, yang.lee, peter.wang, athierry,
linux-scsi, linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
From: ChanWoo Lee <cw9316.lee@samsung.com>
This series has code some cleanups to the UFS mcq code.
No functional change.
ChanWoo Lee (2):
ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq.
ufs:mcq:Remove unused parameters
drivers/ufs/core/ufs-mcq.c | 6 ++----
drivers/ufs/core/ufshcd.c | 5 +----
2 files changed, 3 insertions(+), 8 deletions(-)
--
2.29.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq.
2024-01-05 2:10 ` [PATCH 0/2] ufs:mcq:Code cleanups Chanwoo Lee
@ 2024-01-05 2:10 ` Chanwoo Lee
2024-01-08 17:31 ` Bart Van Assche
2024-01-05 2:10 ` [PATCH 2/2] ufs:mcq:Remove unused parameters Chanwoo Lee
2024-01-24 2:35 ` [PATCH 0/2] ufs:mcq:Code cleanups Martin K. Petersen
2 siblings, 1 reply; 6+ messages in thread
From: Chanwoo Lee @ 2024-01-05 2:10 UTC (permalink / raw)
To: alim.akhtar, avri.altman, bvanassche, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, cw9316.lee, yang.lee, peter.wang, athierry,
linux-scsi, linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
From: ChanWoo Lee <cw9316.lee@samsung.com>
Use ufshcd_mcq_req_to_hwq() to remove unnecessary variables and simplify.
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
---
drivers/ufs/core/ufshcd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 30df6f6a72c6..c9d122302889 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5597,7 +5597,6 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
struct ufshcd_lrb *lrbp;
struct scsi_cmnd *cmd;
unsigned long flags;
- u32 hwq_num, utag;
int tag;
for (tag = 0; tag < hba->nutrs; tag++) {
@@ -5607,9 +5606,7 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
test_bit(SCMD_STATE_COMPLETE, &cmd->state))
continue;
- utag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd));
- hwq_num = blk_mq_unique_tag_to_hwq(utag);
- hwq = &hba->uhq[hwq_num];
+ hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
if (force_compl) {
ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
--
2.29.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ufs:mcq:Remove unused parameters
2024-01-05 2:10 ` [PATCH 0/2] ufs:mcq:Code cleanups Chanwoo Lee
2024-01-05 2:10 ` [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq Chanwoo Lee
@ 2024-01-05 2:10 ` Chanwoo Lee
2024-01-08 17:32 ` Bart Van Assche
2024-01-24 2:35 ` [PATCH 0/2] ufs:mcq:Code cleanups Martin K. Petersen
2 siblings, 1 reply; 6+ messages in thread
From: Chanwoo Lee @ 2024-01-05 2:10 UTC (permalink / raw)
To: alim.akhtar, avri.altman, bvanassche, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, cw9316.lee, yang.lee, peter.wang, athierry,
linux-scsi, linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
From: ChanWoo Lee <cw9316.lee@samsung.com>
The 'hwq' parameter is not used in this function.
So, remove unused parameters.
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
---
drivers/ufs/core/ufs-mcq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
index edc752e55878..8db81f1a12d5 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -258,9 +258,7 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_write_cqis);
* Current MCQ specification doesn't provide a Task Tag or its equivalent in
* the Completion Queue Entry. Find the Task Tag using an indirect method.
*/
-static int ufshcd_mcq_get_tag(struct ufs_hba *hba,
- struct ufs_hw_queue *hwq,
- struct cq_entry *cqe)
+static int ufshcd_mcq_get_tag(struct ufs_hba *hba, struct cq_entry *cqe)
{
u64 addr;
@@ -278,7 +276,7 @@ static void ufshcd_mcq_process_cqe(struct ufs_hba *hba,
struct ufs_hw_queue *hwq)
{
struct cq_entry *cqe = ufshcd_mcq_cur_cqe(hwq);
- int tag = ufshcd_mcq_get_tag(hba, hwq, cqe);
+ int tag = ufshcd_mcq_get_tag(hba, cqe);
if (cqe->command_desc_base_addr) {
ufshcd_compl_one_cqe(hba, tag, cqe);
--
2.29.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq.
2024-01-05 2:10 ` [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq Chanwoo Lee
@ 2024-01-08 17:31 ` Bart Van Assche
0 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2024-01-08 17:31 UTC (permalink / raw)
To: Chanwoo Lee, alim.akhtar, avri.altman, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, yang.lee, peter.wang, athierry, linux-scsi,
linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
On 1/4/24 18:10, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.com>
>
> Use ufshcd_mcq_req_to_hwq() to remove unnecessary variables and simplify.
>
> Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
> ---
> drivers/ufs/core/ufshcd.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 30df6f6a72c6..c9d122302889 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5597,7 +5597,6 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
> struct ufshcd_lrb *lrbp;
> struct scsi_cmnd *cmd;
> unsigned long flags;
> - u32 hwq_num, utag;
> int tag;
>
> for (tag = 0; tag < hba->nutrs; tag++) {
> @@ -5607,9 +5606,7 @@ static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
> test_bit(SCMD_STATE_COMPLETE, &cmd->state))
> continue;
>
> - utag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd));
> - hwq_num = blk_mq_unique_tag_to_hwq(utag);
> - hwq = &hba->uhq[hwq_num];
> + hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
>
> if (force_compl) {
> ufshcd_mcq_compl_all_cqes_lock(hba, hwq);
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ufs:mcq:Remove unused parameters
2024-01-05 2:10 ` [PATCH 2/2] ufs:mcq:Remove unused parameters Chanwoo Lee
@ 2024-01-08 17:32 ` Bart Van Assche
0 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2024-01-08 17:32 UTC (permalink / raw)
To: Chanwoo Lee, alim.akhtar, avri.altman, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, yang.lee, peter.wang, athierry, linux-scsi,
linux-kernel
Cc: grant.jung, jt77.jang, dh0421.hwang, sh043.lee
On 1/4/24 18:10, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.com>
>
> The 'hwq' parameter is not used in this function.
> So, remove unused parameters.
>
> Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
> ---
> drivers/ufs/core/ufs-mcq.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> index edc752e55878..8db81f1a12d5 100644
> --- a/drivers/ufs/core/ufs-mcq.c
> +++ b/drivers/ufs/core/ufs-mcq.c
> @@ -258,9 +258,7 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_write_cqis);
> * Current MCQ specification doesn't provide a Task Tag or its equivalent in
> * the Completion Queue Entry. Find the Task Tag using an indirect method.
> */
> -static int ufshcd_mcq_get_tag(struct ufs_hba *hba,
> - struct ufs_hw_queue *hwq,
> - struct cq_entry *cqe)
> +static int ufshcd_mcq_get_tag(struct ufs_hba *hba, struct cq_entry *cqe)
> {
> u64 addr;
>
> @@ -278,7 +276,7 @@ static void ufshcd_mcq_process_cqe(struct ufs_hba *hba,
> struct ufs_hw_queue *hwq)
> {
> struct cq_entry *cqe = ufshcd_mcq_cur_cqe(hwq);
> - int tag = ufshcd_mcq_get_tag(hba, hwq, cqe);
> + int tag = ufshcd_mcq_get_tag(hba, cqe);
>
> if (cqe->command_desc_base_addr) {
> ufshcd_compl_one_cqe(hba, tag, cqe);
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] ufs:mcq:Code cleanups
2024-01-05 2:10 ` [PATCH 0/2] ufs:mcq:Code cleanups Chanwoo Lee
2024-01-05 2:10 ` [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq Chanwoo Lee
2024-01-05 2:10 ` [PATCH 2/2] ufs:mcq:Remove unused parameters Chanwoo Lee
@ 2024-01-24 2:35 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2024-01-24 2:35 UTC (permalink / raw)
To: Chanwoo Lee
Cc: alim.akhtar, avri.altman, bvanassche, jejb, martin.petersen,
stanley.chu, quic_cang, mani, quic_asutoshd, powen.kao,
quic_nguyenb, yang.lee, peter.wang, athierry, linux-scsi,
linux-kernel, grant.jung, jt77.jang, dh0421.hwang, sh043.lee
Chanwoo,
> This series has code some cleanups to the UFS mcq code. No functional
> change.
Applied to 6.9/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-24 2:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240105021130epcas1p2b77331ab0fc865cc3763765b0b5ecadf@epcas1p2.samsung.com>
2024-01-05 2:10 ` [PATCH 0/2] ufs:mcq:Code cleanups Chanwoo Lee
2024-01-05 2:10 ` [PATCH 1/2] ufs:mcq:Use ufshcd_mcq_req_to_hwq() to simplify updating hwq Chanwoo Lee
2024-01-08 17:31 ` Bart Van Assche
2024-01-05 2:10 ` [PATCH 2/2] ufs:mcq:Remove unused parameters Chanwoo Lee
2024-01-08 17:32 ` Bart Van Assche
2024-01-24 2:35 ` [PATCH 0/2] ufs:mcq:Code cleanups Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.