Skip to content

Commit 1069f90

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: add nvme_set_features_timestamp2()"
This reverts commit 99d5e26. The result field is undefined for many commands and thus can have random values. Thus we can't blindly evaluate these for all commands. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 0c06e40 commit 1069f90

3 files changed

Lines changed: 1 addition & 27 deletions

File tree

src/libnvme.map

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ LIBNVME_1.9 {
1010
nvme_submit_passthru64;
1111
nvme_update_key;
1212
nvme_ctrl_get_cntlid;
13-
nvme_set_features_timestamp2;
1413
};
1514

1615
LIBNVME_1_8 {

src/nvme/ioctl.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -530,18 +530,6 @@ int nvme_set_features_auto_pst(int fd, bool apste, bool save,
530530
}
531531

532532
int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp)
533-
{
534-
__u32 result = 0;
535-
int err;
536-
537-
err = nvme_set_features_timestamp2(fd, save, timestamp, &result);
538-
if (err && result)
539-
err = result;
540-
return err;
541-
}
542-
543-
int nvme_set_features_timestamp2(int fd, bool save, __u64 timestamp,
544-
__u32 *result)
545533
{
546534
__le64 t = cpu_to_le64(timestamp);
547535
struct nvme_timestamp ts = {};
@@ -558,7 +546,7 @@ int nvme_set_features_timestamp2(int fd, bool save, __u64 timestamp,
558546
.data_len = sizeof(ts),
559547
.data = &ts,
560548
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
561-
.result = result,
549+
.result = NULL,
562550
};
563551

564552
memcpy(ts.timestamp, &t, sizeof(ts.timestamp));

src/nvme/ioctl.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,19 +2730,6 @@ int nvme_set_features_auto_pst(int fd, bool apste, bool save,
27302730
*/
27312731
int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp);
27322732

2733-
/**
2734-
* nvme_set_features_timestamp2() - Set timestamp feature
2735-
* @fd: File descriptor of nvme device
2736-
* @save: Save value across power states
2737-
* @timestamp: The current timestamp value to assign to this feature
2738-
* @result: The command completion result from CQE dword0
2739-
*
2740-
* Return: 0 if the ioctl was successful, -1 with errno set to EPROTO when
2741-
* a non-zero state is returned in @result, or -1 with errno set otherwise.
2742-
*/
2743-
int nvme_set_features_timestamp2(int fd, bool save, __u64 timestamp,
2744-
__u32 *result);
2745-
27462733
/**
27472734
* nvme_set_features_hctm() - Set thermal management feature
27482735
* @fd: File descriptor of nvme device

0 commit comments

Comments
 (0)