Skip to content

Commit e99b63e

Browse files
authored
Merge pull request #419 from igaw/spell-checking
Fixing typos and whitespace damage in header files
2 parents 19fe4dd + 74d696f commit e99b63e

8 files changed

Lines changed: 1500 additions & 1506 deletions

File tree

src/nvme/api-types.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ struct nvme_format_nvm_args {
189189
/**
190190
* struct nvme_ns_mgmt_args - Arguments for NVMe Namespace Management command
191191
* @result: NVMe command result
192-
* @ns: Namespace identication descriptors
192+
* @ns: Namespace identification descriptors
193193
* @args_size: Size of &struct nvme_ns_mgmt_args
194194
* @fd: File descriptor of nvme device
195195
* @timeout: Timeout in ms
@@ -338,7 +338,7 @@ struct nvme_security_receive_args {
338338
* @timeout: Timeout in ms
339339
* @nsid: Namespace ID to retrieve LBA status
340340
* @mndw: Maximum number of dwords to return
341-
* @atype: Action type mechanism to determine LBA status desctriptors to
341+
* @atype: Action type mechanism to determine LBA status descriptors to
342342
* return, see &enum nvme_lba_status_atype
343343
* @rl: Range length from slba to perform the action
344344
*/
@@ -358,7 +358,7 @@ struct nvme_get_lba_status_args {
358358
/**
359359
* struct nvme_directive_send_args - Arguments for the NVMe Directive Send command
360360
* @result: If successful, the CQE dword0 value
361-
* @data: Data payload to to be send
361+
* @data: Data payload to be send
362362
* @args_size: Size of &struct nvme_directive_send_args
363363
* @fd: File descriptor of nvme device
364364
* @timeout: Timeout in ms
@@ -386,7 +386,7 @@ struct nvme_directive_send_args {
386386
/**
387387
* struct nvme_directive_recv_args - Arguments for the NVMe Directive Receive command
388388
* @result: If successful, the CQE dword0 value
389-
* @data: Usespace address of data payload
389+
* @data: Userspace address of data payload
390390
* @args_size: Size of &struct nvme_directive_recv_args
391391
* @fd: File descriptor of nvme device
392392
* @timeout: Timeout in ms
@@ -501,7 +501,7 @@ struct nvme_get_property_args {
501501
* @timeout: Timeout in ms
502502
* @ovrpat: Overwrite pattern
503503
* @sanact: Sanitize action, see &enum nvme_sanitize_sanact
504-
* @ause: Set to allow unrestriced sanitize exit
504+
* @ause: Set to allow unrestricted sanitize exit
505505
* @owpass: Overwrite pass count
506506
* @oipbp: Set to overwrite invert pattern between passes
507507
* @nodas: Set to not deallocate blocks after sanitizing
@@ -650,7 +650,7 @@ struct nvme_dsm_args {
650650
* struct nvme_copy_args - Arguments for the NVMe Copy command
651651
* @sdlba: Start destination LBA
652652
* @result: The command completion result from CQE dword0
653-
* @copy: Range descriptior
653+
* @copy: Range description
654654
* @args_size: Size of &struct nvme_copy_args
655655
* @fd: File descriptor of the nvme device
656656
* @timeout: Timeout in ms
@@ -692,7 +692,7 @@ struct nvme_copy_args {
692692
};
693693

694694
/**
695-
* struct nvme_resv_acquire_args - Arguments for the NVMe Reservation Acquire Comand
695+
* struct nvme_resv_acquire_args - Arguments for the NVMe Reservation Acquire Command
696696
* @nrkey: The reservation key to be unregistered from the namespace if
697697
* the action is preempt
698698
* @iekey: Set to ignore the existing key
@@ -754,7 +754,7 @@ struct nvme_resv_register_args {
754754
* @timeout: Timeout in ms
755755
* @nsid: Namespace identifier
756756
* @rtype: The type of reservation to be create, see &enum nvme_resv_rtype
757-
* @rrela: Reservation releast action, see &enum nvme_resv_rrela
757+
* @rrela: Reservation release action, see &enum nvme_resv_rrela
758758
* @iekey: Set to ignore the existing key
759759
*/
760760
struct nvme_resv_release_args {
@@ -778,7 +778,7 @@ struct nvme_resv_release_args {
778778
* @fd: File descriptor of nvme device
779779
* @timeout: Timeout in ms
780780
* @nsid: Namespace identifier
781-
* @len: Number of bytes to request transfered with this command
781+
* @len: Number of bytes to request transferred with this command
782782
* @eds: Request extended Data Structure
783783
*/
784784
struct nvme_resv_report_args {

src/nvme/fabrics.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
55
*
66
* Authors: Keith Busch <[email protected]>
7-
* Chaitanya Kulkarni <[email protected]>
7+
* Chaitanya Kulkarni <[email protected]>
88
*/
99
#ifndef _LIBNVME_FABRICS_H
1010
#define _LIBNVME_FABRICS_H
@@ -195,7 +195,7 @@ int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
195195

196196
/**
197197
* nvmf_get_discovery_log() - Return the discovery log page
198-
* @c: Discover controller to use
198+
* @c: Discover controller to use
199199
* @logp: Pointer to the log page to be returned
200200
* @max_retries: maximum number of log page entries to be returned
201201
*
@@ -213,25 +213,25 @@ char *nvmf_hostnqn_generate();
213213

214214
/**
215215
* nvmf_hostnqn_from_file() - Reads the host nvm qualified name from the config
216-
* default location in @SYSCONFDIR@/nvme/
216+
* default location in @SYSCONFDIR@/nvme/
217217
* Return: The host nqn, or NULL if unsuccessful. If found, the caller
218218
* is responsible to free the string.
219219
*/
220220
char *nvmf_hostnqn_from_file();
221221

222222
/**
223223
* nvmf_hostid_from_file() - Reads the host identifier from the config default
224-
* location in @SYSCONFDIR@/nvme/.
224+
* location in @SYSCONFDIR@/nvme/.
225225
* Return: The host identifier, or NULL if unsuccessful. If found, the caller
226-
* is responsible to free the string.
226+
* is responsible to free the string.
227227
*/
228228
char *nvmf_hostid_from_file();
229229

230230
/**
231231
* nvmf_connect_disc_entry() - Connect controller based on the discovery log page entry
232232
* @h: Host to which the controller should be connected
233233
* @e: Discovery log page entry
234-
* @defcfg: Default configurationn to be used for the new controller
234+
* @defcfg: Default configuration to be used for the new controller
235235
* @discover: Set to 'true' if the new controller is a discovery controller
236236
*
237237
* Return: Pointer to the new controller

src/nvme/ioctl.h

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
55
*
66
* Authors: Keith Busch <[email protected]>
7-
* Chaitanya Kulkarni <[email protected]>
7+
* Chaitanya Kulkarni <[email protected]>
88
*/
99

1010
#ifndef _LIBNVME_IOCTL_H
@@ -99,25 +99,25 @@ struct nvme_passthru_cmd {
9999
* @result: Set on completion to the command's CQE DWORD 0-1 controller response
100100
*/
101101
struct nvme_passthru_cmd64 {
102-
__u8 opcode;
103-
__u8 flags;
104-
__u16 rsvd1;
105-
__u32 nsid;
106-
__u32 cdw2;
107-
__u32 cdw3;
108-
__u64 metadata;
109-
__u64 addr;
110-
__u32 metadata_len;
111-
__u32 data_len;
112-
__u32 cdw10;
113-
__u32 cdw11;
114-
__u32 cdw12;
115-
__u32 cdw13;
116-
__u32 cdw14;
117-
__u32 cdw15;
118-
__u32 timeout_ms;
119-
__u32 rsvd2;
120-
__u64 result;
102+
__u8 opcode;
103+
__u8 flags;
104+
__u16 rsvd1;
105+
__u32 nsid;
106+
__u32 cdw2;
107+
__u32 cdw3;
108+
__u64 metadata;
109+
__u64 addr;
110+
__u32 metadata_len;
111+
__u32 data_len;
112+
__u32 cdw10;
113+
__u32 cdw11;
114+
__u32 cdw12;
115+
__u32 cdw13;
116+
__u32 cdw14;
117+
__u32 cdw15;
118+
__u32 timeout_ms;
119+
__u32 rsvd2;
120+
__u64 result;
121121
};
122122

123123
/**
@@ -186,16 +186,16 @@ struct nvme_uring_cmd {
186186
* @align: Alignment information
187187
*/
188188
#define sizeof_args(type, member, align) \
189-
({ \
190-
type s; \
191-
size_t t = offsetof(type, member) + sizeof(s.member); \
192-
size_t p = (sizeof(align) - (t % sizeof(align))) % sizeof(align); \
193-
t + p; \
194-
})
189+
({ \
190+
type s; \
191+
size_t t = offsetof(type, member) + sizeof(s.member); \
192+
size_t p = (sizeof(align) - (t % sizeof(align))) % sizeof(align); \
193+
t + p; \
194+
})
195195

196196
/**
197197
* nvme_submit_admin_passthru64() - Submit a 64-bit nvme passthrough admin
198-
* command
198+
* command
199199
* @fd: File descriptor of nvme device
200200
* @cmd: The nvme admin command to send
201201
* @result: Optional field to return the result from the CQE DW0-1
@@ -517,7 +517,7 @@ static inline int nvme_identify_ns(int fd, __u32 nsid, struct nvme_id_ns *ns)
517517

518518
/**
519519
* nvme_identify_allocated_ns() - Same as nvme_identify_ns, but only for
520-
* allocated namespaces
520+
* allocated namespaces
521521
* @fd: File descriptor of nvme device
522522
* @nsid: Namespace to identify
523523
* @ns: User space destination address to transfer the data
@@ -709,7 +709,7 @@ static inline int nvme_identify_nvmset_list(int fd, __u16 nvmsetid,
709709

710710
/**
711711
* nvme_identify_primary_ctrl() - Retrieve NVMe Primary Controller
712-
* identification
712+
* identification
713713
* @fd: File descriptor of nvme device
714714
* @cntid: Return controllers starting at this identifier
715715
* @cap: User space destination buffer address to transfer the data
@@ -779,7 +779,7 @@ static inline int nvme_identify_secondary_ctrl_list(int fd, __u32 nsid,
779779

780780
/**
781781
* nvme_identify_ns_granularity() - Retrieves namespace granularity
782-
* identification
782+
* identification
783783
* @fd: File descriptor of nvme device
784784
* @gr_list: User space destination address to transfer the data
785785
*
@@ -886,7 +886,7 @@ static inline int nvme_identify_ctrl_csi(int fd, enum nvme_csi csi, void *data)
886886
}
887887

888888
/**
889-
* nvme_identify_active_ns_list_csi() - Active namespace ID list associated with a specified I/O command set
889+
* nvme_identify_active_ns_list_csi() - Active namespace ID list associated with a specified I/O command set
890890
* @fd: File descriptor of nvme device
891891
* @nsid: Return namespaces greater than this identifier
892892
* @csi: Command Set Identifier
@@ -1287,8 +1287,8 @@ static inline int nvme_get_log_supported_log_pages(int fd, bool rae,
12871287
* Return: The nvme command status if a response was received (see
12881288
* &enum nvme_status_field) or -1 with errno set otherwise.
12891289
*/
1290-
static inline int nvme_get_log_error(int fd, unsigned nr_entries, bool rae,
1291-
struct nvme_error_log_page *err_log)
1290+
static inline int nvme_get_log_error(int fd, unsigned int nr_entries, bool rae,
1291+
struct nvme_error_log_page *err_log)
12921292
{
12931293
return nvme_get_nsid_log(fd, rae, NVME_LOG_LID_ERROR,
12941294
NVME_NSID_ALL, sizeof(*err_log) * nr_entries,
@@ -1641,7 +1641,7 @@ static inline int nvme_get_log_predictable_lat_event(int fd, bool rae,
16411641
* &enum nvme_status_field) or -1 with errno set otherwise.
16421642
*/
16431643
static inline int nvme_get_log_ana(int fd, enum nvme_log_ana_lsp lsp, bool rae,
1644-
__u64 offset, __u32 len, void *log)
1644+
__u64 offset, __u32 len, void *log)
16451645
{
16461646
struct nvme_get_log_args args = {
16471647
.lpo = offset,
@@ -2249,7 +2249,7 @@ int nvme_set_features_auto_pst(int fd, bool apste, bool save,
22492249
* nvme_set_features_timestamp() - Set timestamp feature
22502250
* @fd: File descriptor of nvme device
22512251
* @save: Save value across power states
2252-
* @timestamp: The current timestamp value to assign to this this feature
2252+
* @timestamp: The current timestamp value to assign to this feature
22532253
*
22542254
* Return: The nvme command status if a response was received (see
22552255
* &enum nvme_status_field) or -1 with errno set otherwise.
@@ -2310,7 +2310,7 @@ int nvme_set_features_rrl(int fd, __u8 rrl, __u16 nvmsetid, bool save,
23102310
*/
23112311
int nvme_set_features_plm_config(int fd, bool enable, __u16 nvmsetid,
23122312
bool save, struct nvme_plm_config *data,
2313-
__u32*result);
2313+
__u32 *result);
23142314

23152315
/**
23162316
* nvme_set_features_plm_window() - Set window select feature
@@ -3067,7 +3067,7 @@ int nvme_security_send(struct nvme_security_send_args *args);
30673067

30683068
/**
30693069
* nvme_security_receive() - Security Receive command
3070-
* @args: &struct nvme_security_recevice argument structure
3070+
* @args: &struct nvme_security_receive argument structure
30713071
*
30723072
* Return: The nvme command status if a response was received (see
30733073
* &enum nvme_status_field) or -1 with errno set otherwise.
@@ -3250,7 +3250,7 @@ static inline int nvme_directive_recv_stream_parameters(int fd, __u32 nsid,
32503250
* &enum nvme_status_field) or -1 with errno set otherwise.
32513251
*/
32523252
static inline int nvme_directive_recv_stream_status(int fd, __u32 nsid,
3253-
unsigned nr_entries,
3253+
unsigned int nr_entries,
32543254
struct nvme_streams_directive_status *id)
32553255
{
32563256
struct nvme_directive_recv_args args = {
@@ -3409,7 +3409,8 @@ int nvme_virtual_mgmt(struct nvme_virtual_mgmt_args *args);
34093409
* Return: The nvme command status if a response was received (see
34103410
* &enum nvme_status_field) or -1 with errno set otherwise.
34113411
*/
3412-
static inline int nvme_flush(int fd, __u32 nsid) {
3412+
static inline int nvme_flush(int fd, __u32 nsid)
3413+
{
34133414
struct nvme_passthru_cmd cmd = {};
34143415

34153416
cmd.opcode = nvme_cmd_flush;

src/nvme/linux.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* @fd: File descriptor of nvme device
2626
* @size: Total size of the firmware image to transfer
2727
* @xfer: Maximum size to send with each partial transfer
28-
* @offset: Starting offset to send with this firmware downlaod
28+
* @offset: Starting offset to send with this firmware download
2929
* @buf: Address of buffer containing all or part of the firmware image.
3030
*
3131
* Return: The nvme command status if a response was received (see
@@ -109,7 +109,7 @@ int nvme_get_new_host_telemetry(int fd, struct nvme_telemetry_log **log,
109109
int nvme_get_log_page(int fd, __u32 xfer_len, struct nvme_get_log_args *args);
110110

111111
/**
112-
* nvme_get_ana_log_len() - Retreive size of the current ANA log
112+
* nvme_get_ana_log_len() - Retrieve size of the current ANA log
113113
* @fd: File descriptor of nvme device
114114
* @analen: Pointer to where the length will be set on success
115115
*
@@ -130,11 +130,11 @@ int nvme_get_ana_log_len(int fd, size_t *analen);
130130
int nvme_get_logical_block_size(int fd, __u32 nsid, int *blksize);
131131

132132
/**
133-
* nvme_get_lba_status_log() - Retreive the LBA Status log page
133+
* nvme_get_lba_status_log() - Retrieve the LBA Status log page
134134
* @fd: File descriptor of the nvme device
135135
* @rae: Retain asynchronous events
136-
* @log: On success, set to the value of the allocated and retreived log.
137-
*
136+
* @log: On success, set to the value of the allocated and retrieved log.
137+
*
138138
* Return: The nvme command status if a response was received (see
139139
* &enum nvme_status_field) or -1 with errno set otherwise.
140140
*/

0 commit comments

Comments
 (0)