Skip to content

Commit 359745d

Browse files
Muchun Songtorvalds
authored andcommitted
proc: remove PDE_DATA() completely
Remove PDE_DATA() completely and replace it with pde_data(). [[email protected]: fix naming clash in drivers/nubus/proc.c] [[email protected]: now fix it properly] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Muchun Song <[email protected]> Acked-by: Christian Brauner <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: Alexey Gladkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6dfbbae commit 359745d

File tree

50 files changed

+178
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+178
-180
lines changed

arch/alpha/kernel/srm_env.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ static int srm_env_proc_show(struct seq_file *m, void *v)
8383

8484
static int srm_env_proc_open(struct inode *inode, struct file *file)
8585
{
86-
return single_open(file, srm_env_proc_show, PDE_DATA(inode));
86+
return single_open(file, srm_env_proc_show, pde_data(inode));
8787
}
8888

8989
static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
9090
size_t count, loff_t *pos)
9191
{
9292
int res;
93-
unsigned long id = (unsigned long)PDE_DATA(file_inode(file));
93+
unsigned long id = (unsigned long)pde_data(file_inode(file));
9494
char *buf = (char *) __get_free_page(GFP_USER);
9595
unsigned long ret1, ret2;
9696

arch/arm/kernel/atags_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct buffer {
1313
static ssize_t atags_read(struct file *file, char __user *buf,
1414
size_t count, loff_t *ppos)
1515
{
16-
struct buffer *b = PDE_DATA(file_inode(file));
16+
struct buffer *b = pde_data(file_inode(file));
1717
return simple_read_from_buffer(buf, count, ppos, b->data, b->size);
1818
}
1919

arch/ia64/kernel/salinfo.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ salinfo_event_open(struct inode *inode, struct file *file)
282282
static ssize_t
283283
salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
284284
{
285-
struct salinfo_data *data = PDE_DATA(file_inode(file));
285+
struct salinfo_data *data = pde_data(file_inode(file));
286286
char cmd[32];
287287
size_t size;
288288
int i, n, cpu = -1;
@@ -340,7 +340,7 @@ static const struct proc_ops salinfo_event_proc_ops = {
340340
static int
341341
salinfo_log_open(struct inode *inode, struct file *file)
342342
{
343-
struct salinfo_data *data = PDE_DATA(inode);
343+
struct salinfo_data *data = pde_data(inode);
344344

345345
if (!capable(CAP_SYS_ADMIN))
346346
return -EPERM;
@@ -365,7 +365,7 @@ salinfo_log_open(struct inode *inode, struct file *file)
365365
static int
366366
salinfo_log_release(struct inode *inode, struct file *file)
367367
{
368-
struct salinfo_data *data = PDE_DATA(inode);
368+
struct salinfo_data *data = pde_data(inode);
369369

370370
if (data->state == STATE_NO_DATA) {
371371
vfree(data->log_buffer);
@@ -433,7 +433,7 @@ salinfo_log_new_read(int cpu, struct salinfo_data *data)
433433
static ssize_t
434434
salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
435435
{
436-
struct salinfo_data *data = PDE_DATA(file_inode(file));
436+
struct salinfo_data *data = pde_data(file_inode(file));
437437
u8 *buf;
438438
u64 bufsize;
439439

@@ -494,7 +494,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
494494
static ssize_t
495495
salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
496496
{
497-
struct salinfo_data *data = PDE_DATA(file_inode(file));
497+
struct salinfo_data *data = pde_data(file_inode(file));
498498
char cmd[32];
499499
size_t size;
500500
u32 offset;

arch/powerpc/kernel/proc_powerpc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes
2525
loff_t *ppos)
2626
{
2727
return simple_read_from_buffer(buf, nbytes, ppos,
28-
PDE_DATA(file_inode(file)), PAGE_SIZE);
28+
pde_data(file_inode(file)), PAGE_SIZE);
2929
}
3030

3131
static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
@@ -34,7 +34,7 @@ static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
3434
return -EINVAL;
3535

3636
remap_pfn_range(vma, vma->vm_start,
37-
__pa(PDE_DATA(file_inode(file))) >> PAGE_SHIFT,
37+
__pa(pde_data(file_inode(file))) >> PAGE_SHIFT,
3838
PAGE_SIZE, vma->vm_page_prot);
3939
return 0;
4040
}

arch/sh/mm/alignment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int alignment_proc_open(struct inode *inode, struct file *file)
140140
static ssize_t alignment_proc_write(struct file *file,
141141
const char __user *buffer, size_t count, loff_t *pos)
142142
{
143-
int *data = PDE_DATA(file_inode(file));
143+
int *data = pde_data(file_inode(file));
144144
char mode;
145145

146146
if (count > 0) {

arch/xtensa/platforms/iss/simdisk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int simdisk_detach(struct simdisk *dev)
208208
static ssize_t proc_read_simdisk(struct file *file, char __user *buf,
209209
size_t size, loff_t *ppos)
210210
{
211-
struct simdisk *dev = PDE_DATA(file_inode(file));
211+
struct simdisk *dev = pde_data(file_inode(file));
212212
const char *s = dev->filename;
213213
if (s) {
214214
ssize_t n = simple_read_from_buffer(buf, size, ppos,
@@ -225,7 +225,7 @@ static ssize_t proc_write_simdisk(struct file *file, const char __user *buf,
225225
size_t count, loff_t *ppos)
226226
{
227227
char *tmp = memdup_user_nul(buf, count);
228-
struct simdisk *dev = PDE_DATA(file_inode(file));
228+
struct simdisk *dev = pde_data(file_inode(file));
229229
int err;
230230

231231
if (IS_ERR(tmp))

drivers/acpi/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int
127127
acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file)
128128
{
129129
return single_open(file, acpi_system_wakeup_device_seq_show,
130-
PDE_DATA(inode));
130+
pde_data(inode));
131131
}
132132

133133
static const struct proc_ops acpi_system_wakeup_device_proc_ops = {

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int i8k_get_power_status(void)
451451

452452
static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
453453
{
454-
struct dell_smm_data *data = PDE_DATA(file_inode(fp));
454+
struct dell_smm_data *data = pde_data(file_inode(fp));
455455
int __user *argp = (int __user *)arg;
456456
int speed, err;
457457
int val = 0;
@@ -585,7 +585,7 @@ static int i8k_proc_show(struct seq_file *seq, void *offset)
585585

586586
static int i8k_open_fs(struct inode *inode, struct file *file)
587587
{
588-
return single_open(file, i8k_proc_show, PDE_DATA(inode));
588+
return single_open(file, i8k_proc_show, pde_data(inode));
589589
}
590590

591591
static const struct proc_ops i8k_proc_ops = {

drivers/net/bonding/bond_procfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
1212
__acquires(RCU)
1313
{
14-
struct bonding *bond = PDE_DATA(file_inode(seq->file));
14+
struct bonding *bond = pde_data(file_inode(seq->file));
1515
struct list_head *iter;
1616
struct slave *slave;
1717
loff_t off = 0;
@@ -30,7 +30,7 @@ static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
3030

3131
static void *bond_info_seq_next(struct seq_file *seq, void *v, loff_t *pos)
3232
{
33-
struct bonding *bond = PDE_DATA(file_inode(seq->file));
33+
struct bonding *bond = pde_data(file_inode(seq->file));
3434
struct list_head *iter;
3535
struct slave *slave;
3636
bool found = false;
@@ -57,7 +57,7 @@ static void bond_info_seq_stop(struct seq_file *seq, void *v)
5757

5858
static void bond_info_show_master(struct seq_file *seq)
5959
{
60-
struct bonding *bond = PDE_DATA(file_inode(seq->file));
60+
struct bonding *bond = pde_data(file_inode(seq->file));
6161
const struct bond_opt_value *optval;
6262
struct slave *curr, *primary;
6363
int i;
@@ -175,7 +175,7 @@ static void bond_info_show_master(struct seq_file *seq)
175175
static void bond_info_show_slave(struct seq_file *seq,
176176
const struct slave *slave)
177177
{
178-
struct bonding *bond = PDE_DATA(file_inode(seq->file));
178+
struct bonding *bond = pde_data(file_inode(seq->file));
179179

180180
seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
181181
seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link));

drivers/net/wireless/cisco/airo.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4672,7 +4672,7 @@ static ssize_t proc_write(struct file *file,
46724672
static int proc_status_open(struct inode *inode, struct file *file)
46734673
{
46744674
struct proc_data *data;
4675-
struct net_device *dev = PDE_DATA(inode);
4675+
struct net_device *dev = pde_data(inode);
46764676
struct airo_info *apriv = dev->ml_priv;
46774677
CapabilityRid cap_rid;
46784678
StatusRid status_rid;
@@ -4756,7 +4756,7 @@ static int proc_stats_rid_open(struct inode *inode,
47564756
u16 rid)
47574757
{
47584758
struct proc_data *data;
4759-
struct net_device *dev = PDE_DATA(inode);
4759+
struct net_device *dev = pde_data(inode);
47604760
struct airo_info *apriv = dev->ml_priv;
47614761
StatsRid stats;
47624762
int i, j;
@@ -4819,7 +4819,7 @@ static inline int sniffing_mode(struct airo_info *ai)
48194819
static void proc_config_on_close(struct inode *inode, struct file *file)
48204820
{
48214821
struct proc_data *data = file->private_data;
4822-
struct net_device *dev = PDE_DATA(inode);
4822+
struct net_device *dev = pde_data(inode);
48234823
struct airo_info *ai = dev->ml_priv;
48244824
char *line;
48254825

@@ -5030,7 +5030,7 @@ static const char *get_rmode(__le16 mode)
50305030
static int proc_config_open(struct inode *inode, struct file *file)
50315031
{
50325032
struct proc_data *data;
5033-
struct net_device *dev = PDE_DATA(inode);
5033+
struct net_device *dev = pde_data(inode);
50345034
struct airo_info *ai = dev->ml_priv;
50355035
int i;
50365036
__le16 mode;
@@ -5120,7 +5120,7 @@ static int proc_config_open(struct inode *inode, struct file *file)
51205120
static void proc_SSID_on_close(struct inode *inode, struct file *file)
51215121
{
51225122
struct proc_data *data = file->private_data;
5123-
struct net_device *dev = PDE_DATA(inode);
5123+
struct net_device *dev = pde_data(inode);
51245124
struct airo_info *ai = dev->ml_priv;
51255125
SsidRid SSID_rid;
51265126
int i;
@@ -5156,7 +5156,7 @@ static void proc_SSID_on_close(struct inode *inode, struct file *file)
51565156
static void proc_APList_on_close(struct inode *inode, struct file *file)
51575157
{
51585158
struct proc_data *data = file->private_data;
5159-
struct net_device *dev = PDE_DATA(inode);
5159+
struct net_device *dev = pde_data(inode);
51605160
struct airo_info *ai = dev->ml_priv;
51615161
APListRid *APList_rid = &ai->APList;
51625162
int i;
@@ -5280,7 +5280,7 @@ static int set_wep_tx_idx(struct airo_info *ai, u16 index, int perm, int lock)
52805280
static void proc_wepkey_on_close(struct inode *inode, struct file *file)
52815281
{
52825282
struct proc_data *data;
5283-
struct net_device *dev = PDE_DATA(inode);
5283+
struct net_device *dev = pde_data(inode);
52845284
struct airo_info *ai = dev->ml_priv;
52855285
int i, rc;
52865286
char key[16];
@@ -5331,7 +5331,7 @@ static void proc_wepkey_on_close(struct inode *inode, struct file *file)
53315331
static int proc_wepkey_open(struct inode *inode, struct file *file)
53325332
{
53335333
struct proc_data *data;
5334-
struct net_device *dev = PDE_DATA(inode);
5334+
struct net_device *dev = pde_data(inode);
53355335
struct airo_info *ai = dev->ml_priv;
53365336
char *ptr;
53375337
WepKeyRid wkr;
@@ -5379,7 +5379,7 @@ static int proc_wepkey_open(struct inode *inode, struct file *file)
53795379
static int proc_SSID_open(struct inode *inode, struct file *file)
53805380
{
53815381
struct proc_data *data;
5382-
struct net_device *dev = PDE_DATA(inode);
5382+
struct net_device *dev = pde_data(inode);
53835383
struct airo_info *ai = dev->ml_priv;
53845384
int i;
53855385
char *ptr;
@@ -5423,7 +5423,7 @@ static int proc_SSID_open(struct inode *inode, struct file *file)
54235423
static int proc_APList_open(struct inode *inode, struct file *file)
54245424
{
54255425
struct proc_data *data;
5426-
struct net_device *dev = PDE_DATA(inode);
5426+
struct net_device *dev = pde_data(inode);
54275427
struct airo_info *ai = dev->ml_priv;
54285428
int i;
54295429
char *ptr;
@@ -5462,7 +5462,7 @@ static int proc_APList_open(struct inode *inode, struct file *file)
54625462
static int proc_BSSList_open(struct inode *inode, struct file *file)
54635463
{
54645464
struct proc_data *data;
5465-
struct net_device *dev = PDE_DATA(inode);
5465+
struct net_device *dev = pde_data(inode);
54665466
struct airo_info *ai = dev->ml_priv;
54675467
char *ptr;
54685468
BSSListRid BSSList_rid;

0 commit comments

Comments
 (0)