mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-22 07:06:22 +00:00
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:
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -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
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user