NVMe: Avoid shift operation when writing cq head doorbell

Changes the type of dev->db_stride to unsigned and changes the value
stored there to be 1 << the current value. Then there is less
calculation to be done at completion time.

Signed-off-by: Haiyan Hu <huhaiyan@huawei.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
Haiyan Hu
2013-09-10 11:25:37 +08:00
committed by Matthew Wilcox
parent 2d3c627502
commit b80d5ccca3
2 changed files with 6 additions and 6 deletions

View File

@ -80,7 +80,7 @@ struct nvme_dev {
struct dma_pool *prp_small_pool;
int instance;
int queue_count;
int db_stride;
u32 db_stride;
u32 ctrl_config;
struct msix_entry *entry;
struct nvme_bar __iomem *bar;