Skip to contentSkip to conversation

mmc: queue: Remove unused define

PATCH In review Chanwoo Lee 3 participants 3 messages Feb 3, 2021 – Feb 8, 2021 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20210203072341epcas1p186cca2cf8177a31d04f1ede4bb5f1ec7@epcas1p1.samsung.com

#1 lore raw

PATCH 1/1 mmc: queue: Remove unused define

From: ChanWoo Lee <[email protected]>

MMC_CQE_QUEUE_FULL is not set and is only cleared. Therefore, define is unnecessary.

---
 drivers/mmc/core/queue.c | 2 --
 drivers/mmc/core/queue.h | 1 -
 2 files changed, 3 deletions(-)
drivers/mmc/core/queue.c +0 -2
index 002426e3cf76..9f37a8b909e8 100644
@@ -33,8 +33,6 @@ void mmc_cqe_check_busy(struct mmc_queue *mq)
 {
 	if ((mq->cqe_busy & MMC_CQE_DCMD_BUSY) && !mmc_cqe_dcmd_busy(mq))
 		mq->cqe_busy &= ~MMC_CQE_DCMD_BUSY;
-
-	mq->cqe_busy &= ~MMC_CQE_QUEUE_FULL;
 }
 
 static inline bool mmc_cqe_can_dcmd(struct mmc_host *host)
drivers/mmc/core/queue.h +0 -1
index fd11491ced9f..57c59b6cb1b9 100644
@@ -81,7 +81,6 @@ struct mmc_queue {
 	int			in_flight[MMC_ISSUE_MAX];
 	unsigned int		cqe_busy;
 #define MMC_CQE_DCMD_BUSY	BIT(0)
-#define MMC_CQE_QUEUE_FULL	BIT(1)
 	bool			busy;
 	bool			use_cqe;
 	bool			recovery_needed;
Signature · 1 line
2.29.0
Acked-by on v1 1/1
#2 lore raw
Quoted 6 lines · Chanwoo Lee

From: ChanWoo Lee <[email protected]>

MMC_CQE_QUEUE_FULL is not set and is only cleared. Therefore, define is unnecessary.

Looks like a pre blk-mq remanent.

Quoted 31 lines
---
 drivers/mmc/core/queue.c | 2 --
 drivers/mmc/core/queue.h | 1 -
 2 files changed, 3 deletions(-)
drivers/mmc/core/queue.c +0 -2
index 002426e3cf76..9f37a8b909e8 100644
@@ -33,8 +33,6 @@ void mmc_cqe_check_busy(struct mmc_queue *mq)
 {
 	if ((mq->cqe_busy & MMC_CQE_DCMD_BUSY) && !mmc_cqe_dcmd_busy(mq))
 		mq->cqe_busy &= ~MMC_CQE_DCMD_BUSY;
-
-	mq->cqe_busy &= ~MMC_CQE_QUEUE_FULL;
 }
 
 static inline bool mmc_cqe_can_dcmd(struct mmc_host *host)
drivers/mmc/core/queue.h +0 -1
index fd11491ced9f..57c59b6cb1b9 100644
@@ -81,7 +81,6 @@ struct mmc_queue {
 	int			in_flight[MMC_ISSUE_MAX];
 	unsigned int		cqe_busy;
 #define MMC_CQE_DCMD_BUSY	BIT(0)
-#define MMC_CQE_QUEUE_FULL	BIT(1)
 	bool			busy;
 	bool			use_cqe;
 	bool			recovery_needed;
#3 lore raw
In reply to Chanwoo Lee
Quoted 7 lines · Chanwoo Lee

From: ChanWoo Lee <[email protected]>

MMC_CQE_QUEUE_FULL is not set and is only cleared. Therefore, define is unnecessary.

Applied for next, thanks!

As a next step, we should probably convert the mq->cqe_busy member into a bool rather than the unsigned int.

Kind regards
Uffe

Quoted 33 lines
---
 drivers/mmc/core/queue.c | 2 --
 drivers/mmc/core/queue.h | 1 -
 2 files changed, 3 deletions(-)
drivers/mmc/core/queue.c +0 -2
index 002426e3cf76..9f37a8b909e8 100644
@@ -33,8 +33,6 @@ void mmc_cqe_check_busy(struct mmc_queue *mq)
 {
        if ((mq->cqe_busy & MMC_CQE_DCMD_BUSY) && !mmc_cqe_dcmd_busy(mq))
                mq->cqe_busy &= ~MMC_CQE_DCMD_BUSY;
-
-       mq->cqe_busy &= ~MMC_CQE_QUEUE_FULL;
 }
 
 static inline bool mmc_cqe_can_dcmd(struct mmc_host *host)
drivers/mmc/core/queue.h +0 -2
index fd11491ced9f..57c59b6cb1b9 100644
@@ -81,7 +81,6 @@ struct mmc_queue {
        int                     in_flight[MMC_ISSUE_MAX];
        unsigned int            cqe_busy;
 #define MMC_CQE_DCMD_BUSY      BIT(0)
-#define MMC_CQE_QUEUE_FULL     BIT(1)
        bool                    busy;
        bool                    use_cqe;
        bool                    recovery_needed;
--

2.29.0