Thread (38 messages) 38 messages, 8 authors, 2020-06-29

Re: [PATCHv3 3/5] nvme: implement I/O Command Sets Command Set support

From: Christoph Hellwig <hch@lst.de>
Date: 2020-06-26 08:54:50
Also in: linux-nvme

On Tue, Jun 23, 2020 at 01:53:47AM -0700, Sagi Grimberg wrote:
quoted
  	if (ns->lba_shift == 0)
  		ns->lba_shift = 9;
  +	switch (ns->head->ids.csi) {
+	case NVME_CSI_NVM:
+		break;
+	default:
+		dev_warn(ctrl->device, "unknown csi:%d ns:%d\n",
+			ns->head->ids.csi, ns->head->ns_id);
+		return -ENODEV;
+	}
Not sure we need a switch-case statement for a single case target...
I think a switch makes inherent sense when there is an identifier that
can have multiple values, even if there only is one for now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help