Various fixes for issues detected by checkpatch

- Return EOPNOTSUPP instead of ENOTSUPP to user space.
- Do not terminate macro definitions with a trailing semicolon.
- Do not initialize static variables to zero.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-11-02 02:06:04 +00:00
parent ed163b4241
commit 98285d10fd
5 changed files with 7 additions and 7 deletions

View File

@@ -1135,7 +1135,7 @@ static inline int pcie_capability_read_word(struct pci_dev *dev, int pos,
{
WARN_ON_ONCE(true);
*val = 0;
return -ENOTSUPP;
return -EOPNOTSUPP;
}
static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos,
@@ -1143,7 +1143,7 @@ static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos,
{
WARN_ON_ONCE(true);
*val = 0;
return -ENOTSUPP;
return -EOPNOTSUPP;
}
#endif

View File

@@ -6797,7 +6797,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 = -ENOTSUPP;
res = -EOPNOTSUPP;
#endif
if (res != 0) {
PRINT_ERROR("Failed to create integrity bioset "

View File

@@ -1167,7 +1167,7 @@ int scst_pr_set_cluster_mode(struct scst_device *dev, bool cluster_mode,
out:
#else
res = cluster_mode ? -ENOTSUPP : 0;
res = cluster_mode ? -EOPNOTSUPP : 0;
#endif
return res;

View File

@@ -4880,7 +4880,7 @@ static struct kobj_type scst_session_ktype = {
scst_sess_latency_store); \
static struct kobj_attribute sess_lat_attr_b##size = \
__ATTR(b##size, S_IRUGO | S_IWUSR, scst_sess_latency_show, \
scst_sess_latency_store);
scst_sess_latency_store)
SCST_LAT_ATTR(512);
SCST_LAT_ATTR(1024);
SCST_LAT_ATTR(2048);

View File

@@ -164,7 +164,7 @@ module_param_call(srpt_service_guid, NULL, srpt_get_u64_x, &srpt_service_guid,
MODULE_PARM_DESC(srpt_service_guid,
"Using this value for ioc_guid, id_ext, and cm_listen_id instead of using the node_guid of the first HCA.");
static unsigned int max_sge_delta = 0;
static unsigned int max_sge_delta;
module_param(max_sge_delta, uint, 0444);
MODULE_PARM_DESC(max_sge_delta, "Number to subtract from max_sge (obsolete).");
@@ -4434,7 +4434,7 @@ static int srpt_add_one(struct ib_device *device)
#endif
sdev->srq = use_srq ? ib_create_srq(sdev->pd, &srq_attr) :
ERR_PTR(-ENOTSUPP);
ERR_PTR(-EOPNOTSUPP);
if (IS_ERR(sdev->srq)) {
if (use_srq)
pr_debug("ib_create_srq() failed: %ld\n",