mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
switch ->is_visible() to returning umode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -433,11 +433,11 @@ static int __init ibft_check_device(void)
|
||||
* Helper routiners to check to determine if the entry is valid
|
||||
* in the proper iBFT structure.
|
||||
*/
|
||||
static mode_t ibft_check_nic_for(void *data, int type)
|
||||
static umode_t ibft_check_nic_for(void *data, int type)
|
||||
{
|
||||
struct ibft_kobject *entry = data;
|
||||
struct ibft_nic *nic = entry->nic;
|
||||
mode_t rc = 0;
|
||||
umode_t rc = 0;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_ETH_INDEX:
|
||||
@@ -488,11 +488,11 @@ static mode_t ibft_check_nic_for(void *data, int type)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static mode_t __init ibft_check_tgt_for(void *data, int type)
|
||||
static umode_t __init ibft_check_tgt_for(void *data, int type)
|
||||
{
|
||||
struct ibft_kobject *entry = data;
|
||||
struct ibft_tgt *tgt = entry->tgt;
|
||||
mode_t rc = 0;
|
||||
umode_t rc = 0;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_TGT_INDEX:
|
||||
@@ -524,11 +524,11 @@ static mode_t __init ibft_check_tgt_for(void *data, int type)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static mode_t __init ibft_check_initiator_for(void *data, int type)
|
||||
static umode_t __init ibft_check_initiator_for(void *data, int type)
|
||||
{
|
||||
struct ibft_kobject *entry = data;
|
||||
struct ibft_initiator *init = entry->initiator;
|
||||
mode_t rc = 0;
|
||||
umode_t rc = 0;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_INI_INDEX:
|
||||
|
||||
@@ -413,7 +413,7 @@ static struct attribute *jc42_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t jc42_attribute_mode(struct kobject *kobj,
|
||||
static umode_t jc42_attribute_mode(struct kobject *kobj,
|
||||
struct attribute *attr, int index)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
||||
@@ -335,10 +335,10 @@ static struct attribute *max1668_attribute_unique[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t max1668_attribute_mode(struct kobject *kobj,
|
||||
static umode_t max1668_attribute_mode(struct kobject *kobj,
|
||||
struct attribute *attr, int index)
|
||||
{
|
||||
int ret = S_IRUGO;
|
||||
umode_t ret = S_IRUGO;
|
||||
if (read_only)
|
||||
return ret;
|
||||
if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr ||
|
||||
|
||||
@@ -464,7 +464,7 @@ static SENSOR_DEVICE_ATTR(gpio1_alarm, S_IRUGO, get_alarm, NULL,
|
||||
static SENSOR_DEVICE_ATTR(gpio2_alarm, S_IRUGO, get_alarm, NULL,
|
||||
MAX6650_ALRM_GPIO2);
|
||||
|
||||
static mode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a,
|
||||
static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a,
|
||||
int n)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
||||
@@ -157,7 +157,7 @@ static ssize_t show_fault(struct device *dev,
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static mode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a,
|
||||
static umode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a,
|
||||
int n)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
||||
@@ -638,7 +638,7 @@ iscsi_iser_ep_disconnect(struct iscsi_endpoint *ep)
|
||||
iser_conn_terminate(ib_conn);
|
||||
}
|
||||
|
||||
static mode_t iser_attr_is_visible(int param_type, int param)
|
||||
static umode_t iser_attr_is_visible(int param_type, int param)
|
||||
{
|
||||
switch (param_type) {
|
||||
case ISCSI_HOST_PARAM:
|
||||
|
||||
@@ -612,10 +612,10 @@ static struct attribute *ad7877_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t ad7877_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t ad7877_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int n)
|
||||
{
|
||||
mode_t mode = attr->mode;
|
||||
umode_t mode = attr->mode;
|
||||
|
||||
if (attr == &dev_attr_aux3.attr) {
|
||||
if (gpio3)
|
||||
|
||||
@@ -450,13 +450,13 @@ static struct attribute *tsc2005_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t tsc2005_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t tsc2005_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int n)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
struct spi_device *spi = to_spi_device(dev);
|
||||
struct tsc2005 *ts = spi_get_drvdata(spi);
|
||||
mode_t mode = attr->mode;
|
||||
umode_t mode = attr->mode;
|
||||
|
||||
if (attr == &dev_attr_selftest.attr) {
|
||||
if (!ts->set_reset)
|
||||
|
||||
@@ -89,7 +89,7 @@ find_smbios_instance_string(struct pci_dev *pdev, char *buf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static mode_t
|
||||
static umode_t
|
||||
smbios_instance_string_exist(struct kobject *kobj, struct attribute *attr,
|
||||
int n)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ device_has_dsm(struct device *dev)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static mode_t
|
||||
static umode_t
|
||||
acpi_index_string_exist(struct kobject *kobj, struct attribute *attr, int n)
|
||||
{
|
||||
struct device *dev;
|
||||
|
||||
@@ -1477,7 +1477,7 @@ static struct attribute *asus_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t asus_sysfs_is_visible(struct kobject *kobj,
|
||||
static umode_t asus_sysfs_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr,
|
||||
int idx)
|
||||
{
|
||||
|
||||
@@ -992,7 +992,7 @@ static struct attribute *hwmon_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
|
||||
static umode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int idx)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
@@ -1357,7 +1357,7 @@ static struct attribute *platform_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t asus_sysfs_is_visible(struct kobject *kobj,
|
||||
static umode_t asus_sysfs_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int idx)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
||||
@@ -368,7 +368,7 @@ static struct attribute *ideapad_attributes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t ideapad_is_visible(struct kobject *kobj,
|
||||
static umode_t ideapad_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr,
|
||||
int idx)
|
||||
{
|
||||
|
||||
@@ -176,13 +176,13 @@ static struct device_attribute power_supply_attrs[] = {
|
||||
static struct attribute *
|
||||
__power_supply_attrs[ARRAY_SIZE(power_supply_attrs) + 1];
|
||||
|
||||
static mode_t power_supply_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t power_supply_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr,
|
||||
int attrno)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
struct power_supply *psy = dev_get_drvdata(dev);
|
||||
mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
|
||||
umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
|
||||
int i;
|
||||
|
||||
if (attrno == POWER_SUPPLY_PROP_TYPE)
|
||||
|
||||
@@ -733,7 +733,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)
|
||||
iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep);
|
||||
}
|
||||
|
||||
mode_t be2iscsi_attr_is_visible(int param_type, int param)
|
||||
umode_t be2iscsi_attr_is_visible(int param_type, int param)
|
||||
{
|
||||
switch (param_type) {
|
||||
case ISCSI_HOST_PARAM:
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define BE2_IPV4 0x1
|
||||
#define BE2_IPV6 0x10
|
||||
|
||||
mode_t be2iscsi_attr_is_visible(int param_type, int param);
|
||||
umode_t be2iscsi_attr_is_visible(int param_type, int param);
|
||||
|
||||
void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
|
||||
struct beiscsi_offload_params *params);
|
||||
|
||||
@@ -325,9 +325,9 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf)
|
||||
}
|
||||
|
||||
|
||||
static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type)
|
||||
static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type)
|
||||
{
|
||||
int rc;
|
||||
umode_t rc;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_TGT_NAME:
|
||||
@@ -348,9 +348,9 @@ static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static mode_t beiscsi_ini_get_attr_visibility(void *data, int type)
|
||||
static umode_t beiscsi_ini_get_attr_visibility(void *data, int type)
|
||||
{
|
||||
int rc;
|
||||
umode_t rc;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_INI_INITIATOR_NAME:
|
||||
@@ -364,9 +364,9 @@ static mode_t beiscsi_ini_get_attr_visibility(void *data, int type)
|
||||
}
|
||||
|
||||
|
||||
static mode_t beiscsi_eth_get_attr_visibility(void *data, int type)
|
||||
static umode_t beiscsi_eth_get_attr_visibility(void *data, int type)
|
||||
{
|
||||
int rc;
|
||||
umode_t rc;
|
||||
|
||||
switch (type) {
|
||||
case ISCSI_BOOT_ETH_FLAGS:
|
||||
|
||||
@@ -2177,7 +2177,7 @@ static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static mode_t bnx2i_attr_is_visible(int param_type, int param)
|
||||
static umode_t bnx2i_attr_is_visible(int param_type, int param)
|
||||
{
|
||||
switch (param_type) {
|
||||
case ISCSI_HOST_PARAM:
|
||||
|
||||
@@ -2569,7 +2569,7 @@ void cxgbi_iscsi_cleanup(struct iscsi_transport *itp,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup);
|
||||
|
||||
mode_t cxgbi_attr_is_visible(int param_type, int param)
|
||||
umode_t cxgbi_attr_is_visible(int param_type, int param)
|
||||
{
|
||||
switch (param_type) {
|
||||
case ISCSI_HOST_PARAM:
|
||||
|
||||
@@ -709,7 +709,7 @@ int cxgbi_conn_xmit_pdu(struct iscsi_task *);
|
||||
|
||||
void cxgbi_cleanup_task(struct iscsi_task *task);
|
||||
|
||||
mode_t cxgbi_attr_is_visible(int param_type, int param);
|
||||
umode_t cxgbi_attr_is_visible(int param_type, int param);
|
||||
void cxgbi_get_conn_stats(struct iscsi_cls_conn *, struct iscsi_stats *);
|
||||
int cxgbi_set_conn_param(struct iscsi_cls_conn *,
|
||||
enum iscsi_param, char *, int);
|
||||
|
||||
@@ -112,7 +112,7 @@ static struct attribute *target_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int i)
|
||||
{
|
||||
struct iscsi_boot_kobj *boot_kobj =
|
||||
@@ -193,7 +193,7 @@ static struct attribute *ethernet_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int i)
|
||||
{
|
||||
struct iscsi_boot_kobj *boot_kobj =
|
||||
@@ -265,7 +265,7 @@ static struct attribute *initiator_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static mode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj,
|
||||
static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj,
|
||||
struct attribute *attr, int i)
|
||||
{
|
||||
struct iscsi_boot_kobj *boot_kobj =
|
||||
@@ -306,7 +306,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
|
||||
struct attribute_group *attr_group,
|
||||
const char *name, int index, void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type),
|
||||
umode_t (*is_visible) (void *data, int type),
|
||||
void (*release) (void *data))
|
||||
{
|
||||
struct iscsi_boot_kobj *boot_kobj;
|
||||
@@ -369,7 +369,7 @@ struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type),
|
||||
umode_t (*is_visible) (void *data, int type),
|
||||
void (*release) (void *data))
|
||||
{
|
||||
return iscsi_boot_create_kobj(boot_kset, &iscsi_boot_target_attr_group,
|
||||
@@ -394,7 +394,7 @@ struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type),
|
||||
umode_t (*is_visible) (void *data, int type),
|
||||
void (*release) (void *data))
|
||||
{
|
||||
return iscsi_boot_create_kobj(boot_kset,
|
||||
@@ -420,7 +420,7 @@ struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show) (void *data, int type, char *buf),
|
||||
mode_t (*is_visible) (void *data, int type),
|
||||
umode_t (*is_visible) (void *data, int type),
|
||||
void (*release) (void *data))
|
||||
{
|
||||
return iscsi_boot_create_kobj(boot_kset,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user