This patch defines a new macro NVMET_NO_ERROR_LOC to represent the
default error location value in the nvme-error-log-page.
This is a pure cleanup patch and it does not change any functionality.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
req->rsp->status = cpu_to_le16(status << 1);
- if (!ctrl || req->error_loc == (u16)-1)
+ if (!ctrl || req->error_loc == NVMET_NO_ERROR_LOC)
return;
spin_lock_irqsave(&ctrl->error_lock, flags);
req->rsp->status = 0;
req->rsp->sq_head = 0;
req->ns = NULL;
- req->error_loc = -1;
+ req->error_loc = NVMET_NO_ERROR_LOC;
req->error_slba = 0;
/* no support for fused commands yet */
#define NVMET_ASYNC_EVENTS 4
#define NVMET_ERROR_LOG_SLOTS 128
+#define NVMET_NO_ERROR_LOC ((u16)-1)
/*
* Supported optional AENs: