diff mbox

[2/2] NVMe: Remove unused sq_head read in completion path

Message ID 1457458494-10550-3-git-send-email-jonathan.derrick@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Jens Axboe
Headers show

Commit Message

Jon Derrick March 8, 2016, 5:34 p.m. UTC
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
---
 drivers/nvme/host/pci.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sagi Grimberg March 8, 2016, 5:40 p.m. UTC | #1
Looks fine,

Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jens Axboe March 8, 2016, 5:41 p.m. UTC | #2
On 03/08/2016 10:34 AM, Jon Derrick wrote:
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> ---
>   drivers/nvme/host/pci.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 74514c7..e9f18e1 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -134,7 +134,6 @@ struct nvme_queue {
>   	u32 __iomem *q_db;
>   	u16 q_depth;
>   	s16 cq_vector;
> -	u16 sq_head;
>   	u16 sq_tail;
>   	u16 cq_head;
>   	u16 qid;
> @@ -719,7 +718,6 @@ static void __nvme_process_cq(struct nvme_queue *nvmeq, unsigned int *tag)
>
>   		if ((status & 1) != phase)
>   			break;
> -		nvmeq->sq_head = le16_to_cpu(cqe.sq_head);
>   		if (++head == nvmeq->q_depth) {
>   			head = 0;
>   			phase = !phase;

This seems like a no-brainer, good spotting.
Johannes Thumshirn March 9, 2016, 7:54 a.m. UTC | #3
On Tue, Mar 08, 2016 at 10:34:54AM -0700, Jon Derrick wrote:
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox

Patch

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 74514c7..e9f18e1 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -134,7 +134,6 @@  struct nvme_queue {
 	u32 __iomem *q_db;
 	u16 q_depth;
 	s16 cq_vector;
-	u16 sq_head;
 	u16 sq_tail;
 	u16 cq_head;
 	u16 qid;
@@ -719,7 +718,6 @@  static void __nvme_process_cq(struct nvme_queue *nvmeq, unsigned int *tag)
 
 		if ((status & 1) != phase)
 			break;
-		nvmeq->sq_head = le16_to_cpu(cqe.sq_head);
 		if (++head == nvmeq->q_depth) {
 			head = 0;
 			phase = !phase;