wireless: Use octal not symbolic permissions
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Kalle Valo

ebeveyn
255dd5b79d
işleme
2ef00c5304
@@ -3538,7 +3538,7 @@ static ssize_t show_pci(struct device *d, struct device_attribute *attr,
|
||||
return out - buf;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL);
|
||||
static DEVICE_ATTR(pci, 0444, show_pci, NULL);
|
||||
|
||||
static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3547,7 +3547,7 @@ static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
|
||||
return sprintf(buf, "0x%08x\n", (int)p->config);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL);
|
||||
static DEVICE_ATTR(cfg, 0444, show_cfg, NULL);
|
||||
|
||||
static ssize_t show_status(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3556,7 +3556,7 @@ static ssize_t show_status(struct device *d, struct device_attribute *attr,
|
||||
return sprintf(buf, "0x%08x\n", (int)p->status);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);
|
||||
static DEVICE_ATTR(status, 0444, show_status, NULL);
|
||||
|
||||
static ssize_t show_capability(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3565,7 +3565,7 @@ static ssize_t show_capability(struct device *d, struct device_attribute *attr,
|
||||
return sprintf(buf, "0x%08x\n", (int)p->capability);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL);
|
||||
static DEVICE_ATTR(capability, 0444, show_capability, NULL);
|
||||
|
||||
#define IPW2100_REG(x) { IPW_ ##x, #x }
|
||||
static const struct {
|
||||
@@ -3822,7 +3822,7 @@ static ssize_t show_registers(struct device *d, struct device_attribute *attr,
|
||||
return out - buf;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
|
||||
static DEVICE_ATTR(registers, 0444, show_registers, NULL);
|
||||
|
||||
static ssize_t show_hardware(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3863,7 +3863,7 @@ static ssize_t show_hardware(struct device *d, struct device_attribute *attr,
|
||||
return out - buf;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL);
|
||||
static DEVICE_ATTR(hardware, 0444, show_hardware, NULL);
|
||||
|
||||
static ssize_t show_memory(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3957,7 +3957,7 @@ static ssize_t store_memory(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(memory, S_IWUSR | S_IRUGO, show_memory, store_memory);
|
||||
static DEVICE_ATTR(memory, 0644, show_memory, store_memory);
|
||||
|
||||
static ssize_t show_ordinals(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -3993,7 +3993,7 @@ static ssize_t show_ordinals(struct device *d, struct device_attribute *attr,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(ordinals, S_IRUGO, show_ordinals, NULL);
|
||||
static DEVICE_ATTR(ordinals, 0444, show_ordinals, NULL);
|
||||
|
||||
static ssize_t show_stats(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -4014,7 +4014,7 @@ static ssize_t show_stats(struct device *d, struct device_attribute *attr,
|
||||
return out - buf;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL);
|
||||
static DEVICE_ATTR(stats, 0444, show_stats, NULL);
|
||||
|
||||
static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
|
||||
{
|
||||
@@ -4112,7 +4112,7 @@ static ssize_t show_internals(struct device *d, struct device_attribute *attr,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(internals, S_IRUGO, show_internals, NULL);
|
||||
static DEVICE_ATTR(internals, 0444, show_internals, NULL);
|
||||
|
||||
static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -4157,7 +4157,7 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
|
||||
return out - buf;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL);
|
||||
static DEVICE_ATTR(bssinfo, 0444, show_bssinfo, NULL);
|
||||
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
static ssize_t debug_level_show(struct device_driver *d, char *buf)
|
||||
@@ -4216,8 +4216,7 @@ static ssize_t store_fatal_error(struct device *d,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fatal_error, S_IWUSR | S_IRUGO, show_fatal_error,
|
||||
store_fatal_error);
|
||||
static DEVICE_ATTR(fatal_error, 0644, show_fatal_error, store_fatal_error);
|
||||
|
||||
static ssize_t show_scan_age(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -4250,7 +4249,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age);
|
||||
static DEVICE_ATTR(scan_age, 0644, show_scan_age, store_scan_age);
|
||||
|
||||
static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -4304,7 +4303,7 @@ static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill);
|
||||
static DEVICE_ATTR(rf_kill, 0644, show_rf_kill, store_rf_kill);
|
||||
|
||||
static struct attribute *ipw2100_sysfs_entries[] = {
|
||||
&dev_attr_hardware.attr,
|
||||
|
@@ -1303,7 +1303,7 @@ static ssize_t show_event_log(struct device *d,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(event_log, S_IRUGO, show_event_log, NULL);
|
||||
static DEVICE_ATTR(event_log, 0444, show_event_log, NULL);
|
||||
|
||||
static ssize_t show_error(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1351,7 +1351,7 @@ static ssize_t clear_error(struct device *d,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(error, S_IRUGO | S_IWUSR, show_error, clear_error);
|
||||
static DEVICE_ATTR(error, 0644, show_error, clear_error);
|
||||
|
||||
static ssize_t show_cmd_log(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1378,7 +1378,7 @@ static ssize_t show_cmd_log(struct device *d,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cmd_log, S_IRUGO, show_cmd_log, NULL);
|
||||
static DEVICE_ATTR(cmd_log, 0444, show_cmd_log, NULL);
|
||||
|
||||
#ifdef CONFIG_IPW2200_PROMISCUOUS
|
||||
static void ipw_prom_free(struct ipw_priv *priv);
|
||||
@@ -1443,8 +1443,7 @@ static ssize_t show_rtap_iface(struct device *d,
|
||||
}
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(rtap_iface, S_IWUSR | S_IRUSR, show_rtap_iface,
|
||||
store_rtap_iface);
|
||||
static DEVICE_ATTR(rtap_iface, 0600, show_rtap_iface, store_rtap_iface);
|
||||
|
||||
static ssize_t store_rtap_filter(struct device *d,
|
||||
struct device_attribute *attr,
|
||||
@@ -1475,8 +1474,7 @@ static ssize_t show_rtap_filter(struct device *d,
|
||||
priv->prom_priv ? priv->prom_priv->filter : 0);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(rtap_filter, S_IWUSR | S_IRUSR, show_rtap_filter,
|
||||
store_rtap_filter);
|
||||
static DEVICE_ATTR(rtap_filter, 0600, show_rtap_filter, store_rtap_filter);
|
||||
#endif
|
||||
|
||||
static ssize_t show_scan_age(struct device *d, struct device_attribute *attr,
|
||||
@@ -1520,7 +1518,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age);
|
||||
static DEVICE_ATTR(scan_age, 0644, show_scan_age, store_scan_age);
|
||||
|
||||
static ssize_t show_led(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -1553,7 +1551,7 @@ static ssize_t store_led(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(led, S_IWUSR | S_IRUGO, show_led, store_led);
|
||||
static DEVICE_ATTR(led, 0644, show_led, store_led);
|
||||
|
||||
static ssize_t show_status(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1562,7 +1560,7 @@ static ssize_t show_status(struct device *d,
|
||||
return sprintf(buf, "0x%08x\n", (int)p->status);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);
|
||||
static DEVICE_ATTR(status, 0444, show_status, NULL);
|
||||
|
||||
static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -1571,7 +1569,7 @@ static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
|
||||
return sprintf(buf, "0x%08x\n", (int)p->config);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL);
|
||||
static DEVICE_ATTR(cfg, 0444, show_cfg, NULL);
|
||||
|
||||
static ssize_t show_nic_type(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1580,7 +1578,7 @@ static ssize_t show_nic_type(struct device *d,
|
||||
return sprintf(buf, "TYPE: %d\n", priv->nic_type);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(nic_type, S_IRUGO, show_nic_type, NULL);
|
||||
static DEVICE_ATTR(nic_type, 0444, show_nic_type, NULL);
|
||||
|
||||
static ssize_t show_ucode_version(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1594,7 +1592,7 @@ static ssize_t show_ucode_version(struct device *d,
|
||||
return sprintf(buf, "0x%08x\n", tmp);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(ucode_version, S_IWUSR | S_IRUGO, show_ucode_version, NULL);
|
||||
static DEVICE_ATTR(ucode_version, 0644, show_ucode_version, NULL);
|
||||
|
||||
static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -1608,7 +1606,7 @@ static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
|
||||
return sprintf(buf, "0x%08x\n", tmp);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(rtc, S_IWUSR | S_IRUGO, show_rtc, NULL);
|
||||
static DEVICE_ATTR(rtc, 0644, show_rtc, NULL);
|
||||
|
||||
/*
|
||||
* Add a device attribute to view/control the delay between eeprom
|
||||
@@ -1630,8 +1628,7 @@ static ssize_t store_eeprom_delay(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(eeprom_delay, S_IWUSR | S_IRUGO,
|
||||
show_eeprom_delay, store_eeprom_delay);
|
||||
static DEVICE_ATTR(eeprom_delay, 0644, show_eeprom_delay, store_eeprom_delay);
|
||||
|
||||
static ssize_t show_command_event_reg(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1654,7 +1651,7 @@ static ssize_t store_command_event_reg(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(command_event_reg, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(command_event_reg, 0644,
|
||||
show_command_event_reg, store_command_event_reg);
|
||||
|
||||
static ssize_t show_mem_gpio_reg(struct device *d,
|
||||
@@ -1678,8 +1675,7 @@ static ssize_t store_mem_gpio_reg(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(mem_gpio_reg, S_IWUSR | S_IRUGO,
|
||||
show_mem_gpio_reg, store_mem_gpio_reg);
|
||||
static DEVICE_ATTR(mem_gpio_reg, 0644, show_mem_gpio_reg, store_mem_gpio_reg);
|
||||
|
||||
static ssize_t show_indirect_dword(struct device *d,
|
||||
struct device_attribute *attr, char *buf)
|
||||
@@ -1705,7 +1701,7 @@ static ssize_t store_indirect_dword(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(indirect_dword, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(indirect_dword, 0644,
|
||||
show_indirect_dword, store_indirect_dword);
|
||||
|
||||
static ssize_t show_indirect_byte(struct device *d,
|
||||
@@ -1732,7 +1728,7 @@ static ssize_t store_indirect_byte(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(indirect_byte, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(indirect_byte, 0644,
|
||||
show_indirect_byte, store_indirect_byte);
|
||||
|
||||
static ssize_t show_direct_dword(struct device *d,
|
||||
@@ -1759,8 +1755,7 @@ static ssize_t store_direct_dword(struct device *d,
|
||||
return strnlen(buf, count);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(direct_dword, S_IWUSR | S_IRUGO,
|
||||
show_direct_dword, store_direct_dword);
|
||||
static DEVICE_ATTR(direct_dword, 0644, show_direct_dword, store_direct_dword);
|
||||
|
||||
static int rf_kill_active(struct ipw_priv *priv)
|
||||
{
|
||||
@@ -1831,7 +1826,7 @@ static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill);
|
||||
static DEVICE_ATTR(rf_kill, 0644, show_rf_kill, store_rf_kill);
|
||||
|
||||
static ssize_t show_speed_scan(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -1884,8 +1879,7 @@ static ssize_t store_speed_scan(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(speed_scan, S_IWUSR | S_IRUGO, show_speed_scan,
|
||||
store_speed_scan);
|
||||
static DEVICE_ATTR(speed_scan, 0644, show_speed_scan, store_speed_scan);
|
||||
|
||||
static ssize_t show_net_stats(struct device *d, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -1906,8 +1900,7 @@ static ssize_t store_net_stats(struct device *d, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(net_stats, S_IWUSR | S_IRUGO,
|
||||
show_net_stats, store_net_stats);
|
||||
static DEVICE_ATTR(net_stats, 0644, show_net_stats, store_net_stats);
|
||||
|
||||
static ssize_t show_channels(struct device *d,
|
||||
struct device_attribute *attr,
|
||||
@@ -1953,7 +1946,7 @@ static ssize_t show_channels(struct device *d,
|
||||
return len;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL);
|
||||
static DEVICE_ATTR(channels, 0400, show_channels, NULL);
|
||||
|
||||
static void notify_wx_assoc_event(struct ipw_priv *priv)
|
||||
{
|
||||
|
@@ -276,7 +276,7 @@ static int __init libipw_init(void)
|
||||
" proc directory\n");
|
||||
return -EIO;
|
||||
}
|
||||
e = proc_create("debug_level", S_IRUGO | S_IWUSR, libipw_proc,
|
||||
e = proc_create("debug_level", 0644, libipw_proc,
|
||||
&debug_level_proc_fops);
|
||||
if (!e) {
|
||||
remove_proc_entry(DRV_PROCNAME, init_net.proc_net);
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle