Commit a70f7276 authored by Sven Schnelle's avatar Sven Schnelle Committed by Alexander Gordeev

s390/ipl: use octal values instead of S_* macros

octal values are easier to read and checkpatch also recommends
to use them, so replace all the S_* macros with their counterparts.
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent e2d2a296
...@@ -232,14 +232,14 @@ IPL_ATTR_SHOW_FN(_prefix, _name, "0.%x.%04x\n", \ ...@@ -232,14 +232,14 @@ IPL_ATTR_SHOW_FN(_prefix, _name, "0.%x.%04x\n", \
_ipl_blk.ssid, _ipl_blk.devno); \ _ipl_blk.ssid, _ipl_blk.devno); \
IPL_ATTR_CCW_STORE_FN(_prefix, _name, _ipl_blk); \ IPL_ATTR_CCW_STORE_FN(_prefix, _name, _ipl_blk); \
static struct kobj_attribute sys_##_prefix##_##_name##_attr = \ static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
__ATTR(_name, (S_IRUGO | S_IWUSR), \ __ATTR(_name, 0644, \
sys_##_prefix##_##_name##_show, \ sys_##_prefix##_##_name##_show, \
sys_##_prefix##_##_name##_store) \ sys_##_prefix##_##_name##_store) \
#define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \ #define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \
IPL_ATTR_SHOW_FN(_prefix, _name, _format, _value) \ IPL_ATTR_SHOW_FN(_prefix, _name, _format, _value) \
static struct kobj_attribute sys_##_prefix##_##_name##_attr = \ static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
__ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL) __ATTR(_name, 0444, sys_##_prefix##_##_name##_show, NULL)
#define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \ #define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \
IPL_ATTR_SHOW_FN(_prefix, _name, _fmt_out, (unsigned long long) _value) \ IPL_ATTR_SHOW_FN(_prefix, _name, _fmt_out, (unsigned long long) _value) \
...@@ -254,7 +254,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ ...@@ -254,7 +254,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
return len; \ return len; \
} \ } \
static struct kobj_attribute sys_##_prefix##_##_name##_attr = \ static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
__ATTR(_name,(S_IRUGO | S_IWUSR), \ __ATTR(_name, 0644, \
sys_##_prefix##_##_name##_show, \ sys_##_prefix##_##_name##_show, \
sys_##_prefix##_##_name##_store) sys_##_prefix##_##_name##_store)
...@@ -269,7 +269,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ ...@@ -269,7 +269,7 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
return len; \ return len; \
} \ } \
static struct kobj_attribute sys_##_prefix##_##_name##_attr = \ static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
__ATTR(_name,(S_IRUGO | S_IWUSR), \ __ATTR(_name, 0644, \
sys_##_prefix##_##_name##_show, \ sys_##_prefix##_##_name##_show, \
sys_##_prefix##_##_name##_store) sys_##_prefix##_##_name##_store)
...@@ -344,7 +344,7 @@ static ssize_t ipl_vm_parm_show(struct kobject *kobj, ...@@ -344,7 +344,7 @@ static ssize_t ipl_vm_parm_show(struct kobject *kobj,
} }
static struct kobj_attribute sys_ipl_vm_parm_attr = static struct kobj_attribute sys_ipl_vm_parm_attr =
__ATTR(parm, S_IRUGO, ipl_vm_parm_show, NULL); __ATTR(parm, 0444, ipl_vm_parm_show, NULL);
static ssize_t sys_ipl_device_show(struct kobject *kobj, static ssize_t sys_ipl_device_show(struct kobject *kobj,
struct kobj_attribute *attr, char *page) struct kobj_attribute *attr, char *page)
...@@ -369,7 +369,7 @@ static ssize_t sys_ipl_device_show(struct kobject *kobj, ...@@ -369,7 +369,7 @@ static ssize_t sys_ipl_device_show(struct kobject *kobj,
} }
static struct kobj_attribute sys_ipl_device_attr = static struct kobj_attribute sys_ipl_device_attr =
__ATTR(device, S_IRUGO, sys_ipl_device_show, NULL); __ATTR(device, 0444, sys_ipl_device_show, NULL);
static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj, static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf, struct bin_attribute *attr, char *buf,
...@@ -379,7 +379,7 @@ static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj, ...@@ -379,7 +379,7 @@ static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj,
ipl_block.hdr.len); ipl_block.hdr.len);
} }
static struct bin_attribute ipl_parameter_attr = static struct bin_attribute ipl_parameter_attr =
__BIN_ATTR(binary_parameter, S_IRUGO, ipl_parameter_read, NULL, __BIN_ATTR(binary_parameter, 0444, ipl_parameter_read, NULL,
PAGE_SIZE); PAGE_SIZE);
static ssize_t ipl_scp_data_read(struct file *filp, struct kobject *kobj, static ssize_t ipl_scp_data_read(struct file *filp, struct kobject *kobj,
...@@ -413,13 +413,13 @@ static ssize_t ipl_eckd_scp_data_read(struct file *filp, struct kobject *kobj, ...@@ -413,13 +413,13 @@ static ssize_t ipl_eckd_scp_data_read(struct file *filp, struct kobject *kobj,
} }
static struct bin_attribute ipl_scp_data_attr = static struct bin_attribute ipl_scp_data_attr =
__BIN_ATTR(scp_data, S_IRUGO, ipl_scp_data_read, NULL, PAGE_SIZE); __BIN_ATTR(scp_data, 0444, ipl_scp_data_read, NULL, PAGE_SIZE);
static struct bin_attribute ipl_nvme_scp_data_attr = static struct bin_attribute ipl_nvme_scp_data_attr =
__BIN_ATTR(scp_data, S_IRUGO, ipl_nvme_scp_data_read, NULL, PAGE_SIZE); __BIN_ATTR(scp_data, 0444, ipl_nvme_scp_data_read, NULL, PAGE_SIZE);
static struct bin_attribute ipl_eckd_scp_data_attr = static struct bin_attribute ipl_eckd_scp_data_attr =
__BIN_ATTR(scp_data, S_IRUGO, ipl_eckd_scp_data_read, NULL, PAGE_SIZE); __BIN_ATTR(scp_data, 0444, ipl_eckd_scp_data_read, NULL, PAGE_SIZE);
static struct bin_attribute *ipl_fcp_bin_attrs[] = { static struct bin_attribute *ipl_fcp_bin_attrs[] = {
&ipl_parameter_attr, &ipl_parameter_attr,
...@@ -530,17 +530,13 @@ err: \ ...@@ -530,17 +530,13 @@ err: \
IPL_ATTR_BR_CHR_SHOW_FN(ipl, ipl_block.eckd); IPL_ATTR_BR_CHR_SHOW_FN(ipl, ipl_block.eckd);
static struct kobj_attribute sys_ipl_eckd_br_chr_attr = static struct kobj_attribute sys_ipl_eckd_br_chr_attr =
__ATTR(br_chr, (S_IRUGO | S_IWUSR), __ATTR(br_chr, 0644, eckd_ipl_br_chr_show, NULL);
eckd_ipl_br_chr_show,
NULL);
IPL_ATTR_BR_CHR_SHOW_FN(reipl, reipl_block_eckd->eckd); IPL_ATTR_BR_CHR_SHOW_FN(reipl, reipl_block_eckd->eckd);
IPL_ATTR_BR_CHR_STORE_FN(reipl, reipl_block_eckd->eckd); IPL_ATTR_BR_CHR_STORE_FN(reipl, reipl_block_eckd->eckd);
static struct kobj_attribute sys_reipl_eckd_br_chr_attr = static struct kobj_attribute sys_reipl_eckd_br_chr_attr =
__ATTR(br_chr, (S_IRUGO | S_IWUSR), __ATTR(br_chr, 0644, eckd_reipl_br_chr_show, eckd_reipl_br_chr_store);
eckd_reipl_br_chr_show,
eckd_reipl_br_chr_store);
static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj,
struct kobj_attribute *attr, char *page) struct kobj_attribute *attr, char *page)
...@@ -783,11 +779,11 @@ static ssize_t reipl_ccw_vmparm_store(struct kobject *kobj, ...@@ -783,11 +779,11 @@ static ssize_t reipl_ccw_vmparm_store(struct kobject *kobj,
} }
static struct kobj_attribute sys_reipl_nss_vmparm_attr = static struct kobj_attribute sys_reipl_nss_vmparm_attr =
__ATTR(parm, S_IRUGO | S_IWUSR, reipl_nss_vmparm_show, __ATTR(parm, 0644, reipl_nss_vmparm_show,
reipl_nss_vmparm_store); reipl_nss_vmparm_store);
static struct kobj_attribute sys_reipl_ccw_vmparm_attr = static struct kobj_attribute sys_reipl_ccw_vmparm_attr =
__ATTR(parm, S_IRUGO | S_IWUSR, reipl_ccw_vmparm_show, __ATTR(parm, 0644, reipl_ccw_vmparm_show,
reipl_ccw_vmparm_store); reipl_ccw_vmparm_store);
/* FCP reipl device attributes */ /* FCP reipl device attributes */
...@@ -827,7 +823,7 @@ static ssize_t reipl_fcp_scpdata_write(struct file *filp, struct kobject *kobj, ...@@ -827,7 +823,7 @@ static ssize_t reipl_fcp_scpdata_write(struct file *filp, struct kobject *kobj,
return count; return count;
} }
static struct bin_attribute sys_reipl_fcp_scp_data_attr = static struct bin_attribute sys_reipl_fcp_scp_data_attr =
__BIN_ATTR(scp_data, (S_IRUGO | S_IWUSR), reipl_fcp_scpdata_read, __BIN_ATTR(scp_data, 0644, reipl_fcp_scpdata_read,
reipl_fcp_scpdata_write, DIAG308_SCPDATA_SIZE); reipl_fcp_scpdata_write, DIAG308_SCPDATA_SIZE);
static struct bin_attribute *reipl_fcp_bin_attrs[] = { static struct bin_attribute *reipl_fcp_bin_attrs[] = {
...@@ -907,8 +903,8 @@ static ssize_t reipl_fcp_loadparm_store(struct kobject *kobj, ...@@ -907,8 +903,8 @@ static ssize_t reipl_fcp_loadparm_store(struct kobject *kobj,
} }
static struct kobj_attribute sys_reipl_fcp_loadparm_attr = static struct kobj_attribute sys_reipl_fcp_loadparm_attr =
__ATTR(loadparm, S_IRUGO | S_IWUSR, reipl_fcp_loadparm_show, __ATTR(loadparm, 0644, reipl_fcp_loadparm_show,
reipl_fcp_loadparm_store); reipl_fcp_loadparm_store);
static ssize_t reipl_fcp_clear_show(struct kobject *kobj, static ssize_t reipl_fcp_clear_show(struct kobject *kobj,
struct kobj_attribute *attr, char *page) struct kobj_attribute *attr, char *page)
...@@ -981,7 +977,7 @@ static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj, ...@@ -981,7 +977,7 @@ static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj,
} }
static struct bin_attribute sys_reipl_nvme_scp_data_attr = static struct bin_attribute sys_reipl_nvme_scp_data_attr =
__BIN_ATTR(scp_data, (S_IRUGO | S_IWUSR), reipl_nvme_scpdata_read, __BIN_ATTR(scp_data, 0644, reipl_nvme_scpdata_read,
reipl_nvme_scpdata_write, DIAG308_SCPDATA_SIZE); reipl_nvme_scpdata_write, DIAG308_SCPDATA_SIZE);
static struct bin_attribute *reipl_nvme_bin_attrs[] = { static struct bin_attribute *reipl_nvme_bin_attrs[] = {
...@@ -1013,8 +1009,8 @@ static ssize_t reipl_nvme_loadparm_store(struct kobject *kobj, ...@@ -1013,8 +1009,8 @@ static ssize_t reipl_nvme_loadparm_store(struct kobject *kobj,
} }
static struct kobj_attribute sys_reipl_nvme_loadparm_attr = static struct kobj_attribute sys_reipl_nvme_loadparm_attr =
__ATTR(loadparm, S_IRUGO | S_IWUSR, reipl_nvme_loadparm_show, __ATTR(loadparm, 0644, reipl_nvme_loadparm_show,
reipl_nvme_loadparm_store); reipl_nvme_loadparm_store);
static struct attribute *reipl_nvme_attrs[] = { static struct attribute *reipl_nvme_attrs[] = {
&sys_reipl_nvme_fid_attr.attr, &sys_reipl_nvme_fid_attr.attr,
...@@ -1080,8 +1076,8 @@ static ssize_t reipl_ccw_loadparm_store(struct kobject *kobj, ...@@ -1080,8 +1076,8 @@ static ssize_t reipl_ccw_loadparm_store(struct kobject *kobj,
} }
static struct kobj_attribute sys_reipl_ccw_loadparm_attr = static struct kobj_attribute sys_reipl_ccw_loadparm_attr =
__ATTR(loadparm, S_IRUGO | S_IWUSR, reipl_ccw_loadparm_show, __ATTR(loadparm, 0644, reipl_ccw_loadparm_show,
reipl_ccw_loadparm_store); reipl_ccw_loadparm_store);
static ssize_t reipl_ccw_clear_show(struct kobject *kobj, static ssize_t reipl_ccw_clear_show(struct kobject *kobj,
struct kobj_attribute *attr, char *page) struct kobj_attribute *attr, char *page)
...@@ -1164,7 +1160,7 @@ static ssize_t reipl_eckd_scpdata_write(struct file *filp, struct kobject *kobj, ...@@ -1164,7 +1160,7 @@ static ssize_t reipl_eckd_scpdata_write(struct file *filp, struct kobject *kobj,
} }
static struct bin_attribute sys_reipl_eckd_scp_data_attr = static struct bin_attribute sys_reipl_eckd_scp_data_attr =
__BIN_ATTR(scp_data, (S_IRUGO | S_IWUSR), reipl_eckd_scpdata_read, __BIN_ATTR(scp_data, 0644, reipl_eckd_scpdata_read,
reipl_eckd_scpdata_write, DIAG308_SCPDATA_SIZE); reipl_eckd_scpdata_write, DIAG308_SCPDATA_SIZE);
static struct bin_attribute *reipl_eckd_bin_attrs[] = { static struct bin_attribute *reipl_eckd_bin_attrs[] = {
...@@ -1252,12 +1248,12 @@ static ssize_t reipl_nss_name_store(struct kobject *kobj, ...@@ -1252,12 +1248,12 @@ static ssize_t reipl_nss_name_store(struct kobject *kobj,
} }
static struct kobj_attribute sys_reipl_nss_name_attr = static struct kobj_attribute sys_reipl_nss_name_attr =
__ATTR(name, S_IRUGO | S_IWUSR, reipl_nss_name_show, __ATTR(name, 0644, reipl_nss_name_show,
reipl_nss_name_store); reipl_nss_name_store);
static struct kobj_attribute sys_reipl_nss_loadparm_attr = static struct kobj_attribute sys_reipl_nss_loadparm_attr =
__ATTR(loadparm, S_IRUGO | S_IWUSR, reipl_nss_loadparm_show, __ATTR(loadparm, 0644, reipl_nss_loadparm_show,
reipl_nss_loadparm_store); reipl_nss_loadparm_store);
static struct attribute *reipl_nss_attrs[] = { static struct attribute *reipl_nss_attrs[] = {
&sys_reipl_nss_name_attr.attr, &sys_reipl_nss_name_attr.attr,
...@@ -1758,9 +1754,7 @@ IPL_ATTR_BR_CHR_SHOW_FN(dump, dump_block_eckd->eckd); ...@@ -1758,9 +1754,7 @@ IPL_ATTR_BR_CHR_SHOW_FN(dump, dump_block_eckd->eckd);
IPL_ATTR_BR_CHR_STORE_FN(dump, dump_block_eckd->eckd); IPL_ATTR_BR_CHR_STORE_FN(dump, dump_block_eckd->eckd);
static struct kobj_attribute sys_dump_eckd_br_chr_attr = static struct kobj_attribute sys_dump_eckd_br_chr_attr =
__ATTR(br_chr, (S_IRUGO | S_IWUSR), __ATTR(br_chr, 0644, eckd_dump_br_chr_show, eckd_dump_br_chr_store);
eckd_dump_br_chr_show,
eckd_dump_br_chr_store);
static struct attribute *dump_eckd_attrs[] = { static struct attribute *dump_eckd_attrs[] = {
&sys_dump_eckd_device_attr.attr, &sys_dump_eckd_device_attr.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment