Return ENOTSUPP instead of ENOSYS for operations that are not supported

ENOSYS must only be used inside system calls.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-06-28 08:50:36 -07:00
parent 93aea54342
commit c74a2449c5
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1594,7 +1594,7 @@ qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
default:
bsg_job->reply->result = (DID_ERROR << 16);
bsg_job->job_done(bsg_job);
return -ENOSYS;
return -ENOTSUPP;
}
}
+1 -1
View File
@@ -7344,7 +7344,7 @@ static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev)
/* The same, pool size doesn't really matter */
res = bioset_integrity_create(virt_dev->vdisk_bioset, 2);
#else
res = -ENOSYS;
res = -ENOTSUPP;
#endif
if (res != 0) {
PRINT_ERROR("Failed to create integrity bioset "
+2 -2
View File
@@ -1404,7 +1404,7 @@ static ssize_t scst_proc_scsi_tgt_write(struct file *file,
TRACE_ENTRY();
if (vtt->tgtt->write_proc == NULL) {
res = -ENOSYS;
res = -ENOTSUPP;
goto out;
}
@@ -1559,7 +1559,7 @@ static ssize_t scst_proc_scsi_dev_handler_write(struct file *file,
TRACE_ENTRY();
if (dev_type->write_proc == NULL) {
res = -ENOSYS;
res = -ENOTSUPP;
goto out;
}
+1 -1
View File
@@ -4114,7 +4114,7 @@ static void srpt_add_one(struct ib_device *device)
#endif
sdev->srq = use_srq ? ib_create_srq(sdev->pd, &srq_attr) :
ERR_PTR(-ENOSYS);
ERR_PTR(-ENOTSUPP);
if (IS_ERR(sdev->srq)) {
pr_debug("ib_create_srq() failed: %ld\n", PTR_ERR(sdev->srq));