diff mbox series

nvme: Remove the redundant aqa value setting

Message ID 20210622033443.29672-1-wesley.sheng@amd.com
State Accepted
Commit c3e52c71bb0e7e5e34fadafbfcc34bce9899c100
Delegated to: Bin Meng
Headers show
Series nvme: Remove the redundant aqa value setting | expand

Commit Message

Wesley Sheng June 22, 2021, 3:34 a.m. UTC
From: Wesley Sheng <wesleyshenggit@sina.com>

AQA (Admin Queue Attributes) register is a dword size with
lower word of ASQS, and higher word of ACQS.

The code set the variable aqa twice, but it is redundant.

Signed-off-by: Wesley Sheng <wesleyshenggit@sina.com>
---
 drivers/nvme/nvme.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Bin Meng June 23, 2021, 9:14 a.m. UTC | #1
On Tue, Jun 22, 2021 at 11:35 AM Wesley Sheng <wesley.sheng@amd.com> wrote:
>
> From: Wesley Sheng <wesleyshenggit@sina.com>
>
> AQA (Admin Queue Attributes) register is a dword size with
> lower word of ASQS, and higher word of ACQS.
>
> The code set the variable aqa twice, but it is redundant.
>
> Signed-off-by: Wesley Sheng <wesleyshenggit@sina.com>
> ---
>  drivers/nvme/nvme.c | 1 -
>  1 file changed, 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng June 23, 2021, 9:19 a.m. UTC | #2
On Wed, Jun 23, 2021 at 5:14 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Jun 22, 2021 at 11:35 AM Wesley Sheng <wesley.sheng@amd.com> wrote:
> >
> > From: Wesley Sheng <wesleyshenggit@sina.com>
> >
> > AQA (Admin Queue Attributes) register is a dword size with
> > lower word of ASQS, and higher word of ACQS.
> >
> > The code set the variable aqa twice, but it is redundant.
> >
> > Signed-off-by: Wesley Sheng <wesleyshenggit@sina.com>
> > ---
> >  drivers/nvme/nvme.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index fc64d93ab8..a062234163 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -379,7 +379,6 @@  static int nvme_configure_admin_queue(struct nvme_dev *dev)
 
 	aqa = nvmeq->q_depth - 1;
 	aqa |= aqa << 16;
-	aqa |= aqa << 16;
 
 	dev->page_size = 1 << page_shift;