Skip to content

Commit 1826dc7

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: add nvme_set_features_iocs_profile2()"
This reverts commit cb9bdfd. 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 036c61e commit 1826dc7

3 files changed

Lines changed: 1 addition & 29 deletions

File tree

src/libnvme.map

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ LIBNVME_1.9 {
1313
nvme_set_features_timestamp2;
1414
nvme_set_features_host_behavior2;
1515
nvme_set_features_host_id2;
16-
nvme_set_features_iocs_profile2;
1716
};
1817

1918
LIBNVME_1_8 {

src/nvme/ioctl.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -793,25 +793,11 @@ int nvme_set_features_write_protect2(int fd, __u32 nsid,
793793
}
794794

795795
int nvme_set_features_iocs_profile(int fd, __u16 iocsi, bool save)
796-
{
797-
__u32 value = NVME_SET(iocsi, FEAT_IOCSP_IOCSCI);
798-
__u32 result = 0;
799-
int err;
800-
801-
err = __nvme_set_features(fd, NVME_FEAT_FID_IOCS_PROFILE, value,
802-
save, &result);
803-
if (err && result)
804-
err = result;
805-
return err;
806-
}
807-
808-
int nvme_set_features_iocs_profile2(int fd, __u16 iocsi, bool save,
809-
__u32 *result)
810796
{
811797
__u32 value = NVME_SET(iocsi, FEAT_IOCSP_IOCSCI);
812798

813799
return __nvme_set_features(fd, NVME_FEAT_FID_IOCS_PROFILE, value,
814-
save, result);
800+
save, NULL);
815801
}
816802

817803
int nvme_get_features(struct nvme_get_features_args *args)

src/nvme/ioctl.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,19 +3023,6 @@ int nvme_set_features_write_protect2(int fd, __u32 nsid,
30233023
*/
30243024
int nvme_set_features_iocs_profile(int fd, __u16 iocsi, bool save);
30253025

3026-
/**
3027-
* nvme_set_features_iocs_profile2() - Set I/O command set profile feature
3028-
* @fd: File descriptor of nvme device
3029-
* @iocsi: I/O Command Set Combination Index
3030-
* @save: Save value across power states
3031-
* @result: The command completion result from CQE dword0
3032-
*
3033-
* Return: 0 if the ioctl was successful, -1 with errno set to EPROTO when
3034-
* a non-zero state is returned in @result, or -1 with errno set otherwise.
3035-
*/
3036-
int nvme_set_features_iocs_profile2(int fd, __u16 iocsi, bool save,
3037-
__u32 *result);
3038-
30393026
/**
30403027
* nvme_get_features() - Retrieve a feature attribute
30413028
* @args: &struct nvme_get_features_args argument structure

0 commit comments

Comments
 (0)