Skip to content

Commit 3fd78f6

Browse files
authored
Merge pull request #327 from hreinecke/doc-update
Update function prototype documentation
2 parents 0d1f8a1 + 4cc29fd commit 3fd78f6

2 files changed

Lines changed: 31 additions & 18 deletions

File tree

src/nvme/filters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int nvme_scan_subsystems(struct dirent ***subsys);
6161
/**
6262
* nvme_scan_subsystem_namespaces() - Scan for namespaces in a subsystem
6363
* @s: Subsystem to scan
64-
* @n: Pointer to array of dirents
64+
* @ns: Pointer to array of dirents
6565
*
6666
* Return: number of entries in @ns
6767
*/

src/nvme/ioctl.h

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define NVME_DEFAULT_IOCTL_TIMEOUT 0
3535

3636
/**
37-
* struct nvme_passthru_cmd -
37+
* struct nvme_passthru_cmd - nvme passthrough command structure
3838
* @opcode: Operation code, see &enum nvme_io_opcodes and &enum nvme_admin_opcodes
3939
* @flags: Not supported: intended for command flags (eg: SGL, FUSE)
4040
* @rsvd1: Reserved for future use
@@ -76,7 +76,7 @@ struct nvme_passthru_cmd {
7676
};
7777

7878
/**
79-
* struct nvme_passthru_cmd64 -
79+
* struct nvme_passthru_cmd64 - 64-bit nvme passthrough command structure
8080
* @opcode: Operation code, see &enum nvme_io_opcodes and &enum nvme_admin_opcodes
8181
* @flags: Not supported: intended for command flags (eg: SGL, FUSE)
8282
* @rsvd1: Reserved for future use
@@ -148,7 +148,7 @@ int nvme_submit_admin_passthru64(int fd, struct nvme_passthru_cmd64 *cmd,
148148
__u64 *result);
149149

150150
/**
151-
* nvme_admin_passthru64() - Submit an nvme passthrough command
151+
* nvme_admin_passthru64() - Submit a 64-bit nvme passthrough command
152152
* @fd: File descriptor of nvme device
153153
* @opcode: The nvme io command to send
154154
* @flags: NVMe command flags (not used)
@@ -579,15 +579,15 @@ static inline int nvme_identify_ctrl_list(int fd, __u16 cntid,
579579
}
580580

581581
/**
582-
* nvme_identify_nsid_ctrl_list() -
582+
* nvme_identify_nsid_ctrl_list() - Retrieves controller list attached to an nsid
583583
* @fd: File descriptor of nvme device
584584
* @nsid: Return controllers that are attached to this nsid
585585
* @cntid: Starting CNTLID to return in the list
586586
* @cntlist: User space destination address to transfer the data
587587
*
588-
* Up to 2047 controller identifiers is returned containing a controller
588+
* Up to 2047 controller identifiers are returned containing a controller
589589
* identifier greater than or equal to the controller identifier specified in
590-
* @cntid.
590+
* @cntid attached to @nsid.
591591
*
592592
* See &struct nvme_ctrl_list for a definition of the structure returned.
593593
*
@@ -787,13 +787,16 @@ static inline int nvme_identify_uuid(int fd, struct nvme_id_uuid_list *uuid_list
787787
}
788788

789789
/**
790-
* nvme_identify_ns_csi() -
790+
* nvme_identify_ns_csi() - I/O command set specific identify namespace data
791791
* @fd: File descriptor of nvme device
792792
* @nsid: Namespace to identify
793793
* @uuidx: UUID Index for differentiating vendor specific encoding
794794
* @csi: Command Set Identifier
795795
* @data: User space destination address to transfer the data
796796
*
797+
* An I/O Command Set specific Identify Namespace data structre is returned
798+
* for the namespace specified in @nsid.
799+
*
797800
* Return: The nvme command status if a response was received (see
798801
* &enum nvme_status_field) or -1 with errno set otherwise.
799802
*/
@@ -818,11 +821,15 @@ static inline int nvme_identify_ns_csi(int fd, __u32 nsid, __u8 uuidx,
818821
}
819822

820823
/**
821-
* nvme_identify_ctrl_csi() -
824+
* nvme_identify_ctrl_csi() - I/O command set specific Identify Controller data
822825
* @fd: File descriptor of nvme device
823826
* @csi: Command Set Identifier
824827
* @data: User space destination address to transfer the data
825828
*
829+
* An I/O Command Set specific Identify Controller data structure is returned
830+
* to the host for the controller processing the command. The specific Identify
831+
* Controller data structure to be returned is specified by @csi.
832+
*
826833
* Return: The nvme command status if a response was received (see
827834
* &enum nvme_status_field) or -1 with errno set otherwise.
828835
*/
@@ -846,7 +853,7 @@ static inline int nvme_identify_ctrl_csi(int fd, enum nvme_csi csi, void *data)
846853
}
847854

848855
/**
849-
* nvme_identify_active_ns_list_csi() -
856+
* nvme_identify_active_ns_list_csi() - Active namespace ID list associated with a specified I/O command set
850857
* @fd: File descriptor of nvme device
851858
* @nsid: Return namespaces greater than this identifier
852859
* @csi: Command Set Identifier
@@ -883,7 +890,7 @@ static inline int nvme_identify_active_ns_list_csi(int fd, __u32 nsid,
883890
}
884891

885892
/**
886-
* nvme_identify_allocated_ns_list_csi() -
893+
* nvme_identify_allocated_ns_list_csi() - Allocated namespace ID list associated with a specified I/O command set
887894
* @fd: File descriptor of nvme device
888895
* @nsid: Return namespaces greater than this identifier
889896
* @csi: Command Set Identifier
@@ -920,12 +927,15 @@ static inline int nvme_identify_allocated_ns_list_csi(int fd, __u32 nsid,
920927
}
921928

922929
/**
923-
* nvme_identify_independent_identify_ns() -
930+
* nvme_identify_independent_identify_ns() - I/O command set independent Identify namespace data
924931
* @fd: File descriptor of nvme device
925932
* @nsid: Return namespaces greater than this identifier
926933
* @ns: I/O Command Set Independent Identify Namespace data
927934
* structure
928935
*
936+
* The I/O command set independent Identify namespace data structure for
937+
* the namespace identified with @ns is returned to the host.
938+
*
929939
* Return: The nvme command status if a response was received (see
930940
* &enum nvme_status_field) or -1 with errno set otherwise.
931941
*/
@@ -1019,10 +1029,13 @@ static inline int nvme_identify_iocs_ns_csi_user_data_format(int fd,
10191029
}
10201030

10211031
/**
1022-
* nvme_nvm_identify_ctrl() -
1032+
* nvme_nvm_identify_ctrl() - Identify controller data
10231033
* @fd: File descriptor of nvme device
10241034
* @id: User space destination address to transfer the data
10251035
*
1036+
* Return an identify controller data structure to the host of
1037+
* processing controller.
1038+
*
10261039
* Return: The nvme command status if a response was received (see
10271040
* &enum nvme_status_field) or -1 with errno set otherwise.
10281041
*/
@@ -1032,7 +1045,7 @@ static inline int nvme_nvm_identify_ctrl(int fd, struct nvme_id_ctrl_nvm *id)
10321045
}
10331046

10341047
/**
1035-
* nvme_identify_domain_list() -
1048+
* nvme_identify_domain_list() - Domain list data
10361049
* @fd: File descriptor of nvme device
10371050
* @domid: Domain ID
10381051
* @list: User space destiantion address to transfer data
@@ -1068,7 +1081,7 @@ static inline int nvme_identify_domain_list(int fd, __u16 domid,
10681081
}
10691082

10701083
/**
1071-
* nvme_identify_endurance_group_list() -
1084+
* nvme_identify_endurance_group_list() - Endurance group list data
10721085
* @fd: File descriptor of nvme device
10731086
* @endgrp_id: Endurance group identifier
10741087
* @list: Array of endurance group identifiers
@@ -1097,7 +1110,7 @@ static inline int nvme_identify_endurance_group_list(int fd, __u16 endgrp_id,
10971110
}
10981111

10991112
/**
1100-
* nvme_identify_iocs() -
1113+
* nvme_identify_iocs() - I/O command set data structure
11011114
* @fd: File descriptor of nvme device
11021115
* @cntlid: Controller ID
11031116
* @iocs: User space destination address to transfer the data
@@ -1129,7 +1142,7 @@ static inline int nvme_identify_iocs(int fd, __u16 cntlid,
11291142
}
11301143

11311144
/**
1132-
* nvme_zns_identify_ns() -
1145+
* nvme_zns_identify_ns() - ZNS identify namespace data
11331146
* @fd: File descriptor of nvme device
11341147
* @nsid: Namespace to identify
11351148
* @data: User space destination address to transfer the data
@@ -1157,7 +1170,7 @@ static inline int nvme_zns_identify_ns(int fd, __u32 nsid,
11571170
}
11581171

11591172
/**
1160-
* nvme_zns_identify_ctrl() -
1173+
* nvme_zns_identify_ctrl() - ZNS identify controller data
11611174
* @fd: File descriptor of nvme device
11621175
* @id: User space destination address to transfer the data
11631176
*

0 commit comments

Comments
 (0)