nvme: use NVME_CTRL_CMIC_ANA macro
A message that is not in the archive (sent off-list or not yet received): CGME20210308191842epcas5p2a21883eef4b6f98492987f80704d09bd@epcas5p2.samsung.com
cover cleanup and small improvement
First patch does away with hard-coded value.
Second patch is a micro-optimization for io passthrough commands.
Kanchan Joshi (2):
nvme: use NVME_CTRL_CMIC_ANA macro
nvme-core: reduce checks for zero command effects
drivers/nvme/host/core.c | 3 ++- drivers/nvme/host/nvme.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 1/2 nvme: use NVME_CTRL_CMIC_ANA macro
use the macro instead of hard-coded value.
--- drivers/nvme/host/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/nvme.h +1 -1
@@ -745,7 +745,7 @@ static inline void nvme_trace_bio_complete(struct request *req)static inline int nvme_mpath_init (struct nvme_ctrl *ctrl,struct nvme_id_ctrl *id) { -if (ctrl->subsys->cmic & (1 <<3 )) +if (ctrl->subsys->cmic &NVME_CTRL_CMIC_ANA )dev_warn (ctrl->device,"Please enable CONFIG_NVME_MULTIPATH for full support of multi-port devices.\n" );return 0 ;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 3 lines · Kanchan Joshi
use the macro instead of hard-coded value.
Signed-off-by Kanchan Joshi <[email protected]>
Since the macro is used in nvme_mpath_init() it makes sense to keep it uniform.
Looks good.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
PATCH 2/2 nvme-core: reduce checks for zero command effects
In reply to Kanchan JoshiFor io passthrough commands, effects are exepcted to be zero. nvme_passthrough_end() does three checks in futility for this case. Bail out of function-call/checks.
--- drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/core.c +2 -1
@@ -1136,7 +1136,8 @@ void nvme_execute_passthru_rq(struct request *rq) effects =nvme_passthru_start (ctrl, ns, cmd->common.opcode);blk_execute_rq (disk, rq,0 ); -nvme_passthru_end (ctrl, effects); +if (effects)/* nothing to be done for zero cmd effects */ +nvme_passthru_end (ctrl, effects); }EXPORT_SYMBOL_NS_GPL (nvme_execute_passthru_rq,NVME_TARGET_PASSTHRU );
Signature · 7 lines
2.25.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Re: [PATCH 2/2] nvme-core: reduce checks for zero command effects
Quoted 5 lines · Kanchan Joshi
For io passthrough commands, effects are exepcted to be zero.
nvme_passthrough_end()does three checks in futility for this case. Bail out of function-call/checks.Signed-off-by Kanchan Joshi <[email protected]>
Looks good.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Re: [PATCH 0/2] cleanup and small improvement
In reply to Kanchan JoshiThanks,
applied to nvme-5.13.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme