Skip to content

Commit 5d32c88

Browse files
committed
Merge branch 'akpm' (Andrew's patch-bomb)
Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <[email protected]>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
2 parents 43f63c8 + dac23b0 commit 5d32c88

File tree

78 files changed

+518
-631
lines changed

Some content is hidden

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

78 files changed

+518
-631
lines changed

MAINTAINERS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5637,7 +5637,7 @@ M: Ohad Ben-Cohen <[email protected]>
56375637
S: Maintained
56385638
F: drivers/remoteproc/
56395639
F: Documentation/remoteproc.txt
5640-
F: include/linux/remoteproc.txt
5640+
F: include/linux/remoteproc.h
56415641

56425642
RFKILL
56435643
M: Johannes Berg <[email protected]>
@@ -6287,6 +6287,15 @@ F: drivers/tty/serial/sunsu.c
62876287
F: drivers/tty/serial/sunzilog.c
62886288
F: drivers/tty/serial/sunzilog.h
62896289

6290+
SPARSE CHECKER
6291+
M: "Christopher Li" <[email protected]>
6292+
6293+
W: https://sparse.wiki.kernel.org/
6294+
T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git
6295+
T: git git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
6296+
S: Maintained
6297+
F: include/linux/compiler.h
6298+
62906299
SPEAR PLATFORM SUPPORT
62916300
M: Viresh Kumar <[email protected]>
62926301

arch/alpha/kernel/signal.c

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
120120
*/
121121
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
122122
{
123-
mask &= _BLOCKABLE;
124-
spin_lock_irq(&current->sighand->siglock);
123+
sigset_t blocked;
124+
125125
current->saved_sigmask = current->blocked;
126-
siginitset(&current->blocked, mask);
127-
recalc_sigpending();
128-
spin_unlock_irq(&current->sighand->siglock);
126+
127+
mask &= _BLOCKABLE;
128+
siginitset(&blocked, mask);
129+
set_current_blocked(&blocked);
129130

130131
current->state = TASK_INTERRUPTIBLE;
131132
schedule();
@@ -238,10 +239,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
238239
goto give_sigsegv;
239240

240241
sigdelsetmask(&set, ~_BLOCKABLE);
241-
spin_lock_irq(&current->sighand->siglock);
242-
current->blocked = set;
243-
recalc_sigpending();
244-
spin_unlock_irq(&current->sighand->siglock);
242+
set_current_blocked(&set);
245243

246244
if (restore_sigcontext(sc, regs, sw))
247245
goto give_sigsegv;
@@ -276,10 +274,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
276274
goto give_sigsegv;
277275

278276
sigdelsetmask(&set, ~_BLOCKABLE);
279-
spin_lock_irq(&current->sighand->siglock);
280-
current->blocked = set;
281-
recalc_sigpending();
282-
spin_unlock_irq(&current->sighand->siglock);
277+
set_current_blocked(&set);
283278

284279
if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
285280
goto give_sigsegv;
@@ -501,14 +496,8 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
501496
else
502497
ret = setup_frame(sig, ka, oldset, regs, sw);
503498

504-
if (ret == 0) {
505-
spin_lock_irq(&current->sighand->siglock);
506-
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
507-
if (!(ka->sa.sa_flags & SA_NODEFER))
508-
sigaddset(&current->blocked,sig);
509-
recalc_sigpending();
510-
spin_unlock_irq(&current->sighand->siglock);
511-
}
499+
if (ret == 0)
500+
block_sigmask(ka, sig);
512501

513502
return ret;
514503
}

arch/arm/mach-msm/smd_debug.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,9 @@ static ssize_t debug_read(struct file *file, char __user *buf,
203203
return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize);
204204
}
205205

206-
static int debug_open(struct inode *inode, struct file *file)
207-
{
208-
file->private_data = inode->i_private;
209-
return 0;
210-
}
211-
212206
static const struct file_operations debug_ops = {
213207
.read = debug_read,
214-
.open = debug_open,
208+
.open = simple_open,
215209
.llseek = default_llseek,
216210
};
217211

arch/c6x/kernel/signal.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs)
8585
goto badframe;
8686

8787
sigdelsetmask(&set, ~_BLOCKABLE);
88-
spin_lock_irq(&current->sighand->siglock);
89-
current->blocked = set;
90-
recalc_sigpending();
91-
spin_unlock_irq(&current->sighand->siglock);
88+
set_current_blocked(&set);
9289

9390
if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
9491
goto badframe;
@@ -279,15 +276,8 @@ static int handle_signal(int sig,
279276

280277
/* Set up the stack frame */
281278
ret = setup_rt_frame(sig, ka, info, oldset, regs);
282-
if (ret == 0) {
283-
spin_lock_irq(&current->sighand->siglock);
284-
sigorsets(&current->blocked, &current->blocked,
285-
&ka->sa.sa_mask);
286-
if (!(ka->sa.sa_flags & SA_NODEFER))
287-
sigaddset(&current->blocked, sig);
288-
recalc_sigpending();
289-
spin_unlock_irq(&current->sighand->siglock);
290-
}
279+
if (ret == 0)
280+
block_sigmask(ka, sig);
291281

292282
return ret;
293283
}

arch/x86/kernel/kdebugfs.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,9 @@ static ssize_t setup_data_read(struct file *file, char __user *user_buf,
6868
return count;
6969
}
7070

71-
static int setup_data_open(struct inode *inode, struct file *file)
72-
{
73-
file->private_data = inode->i_private;
74-
75-
return 0;
76-
}
77-
7871
static const struct file_operations fops_setup_data = {
7972
.read = setup_data_read,
80-
.open = setup_data_open,
73+
.open = simple_open,
8174
.llseek = default_llseek,
8275
};
8376

drivers/acpi/ec_sys.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "
2727

2828
static struct dentry *acpi_ec_debugfs_dir;
2929

30-
static int acpi_ec_open_io(struct inode *i, struct file *f)
31-
{
32-
f->private_data = i->i_private;
33-
return 0;
34-
}
35-
3630
static ssize_t acpi_ec_read_io(struct file *f, char __user *buf,
3731
size_t count, loff_t *off)
3832
{
@@ -95,7 +89,7 @@ static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf,
9589

9690
static const struct file_operations acpi_ec_io_ops = {
9791
.owner = THIS_MODULE,
98-
.open = acpi_ec_open_io,
92+
.open = simple_open,
9993
.read = acpi_ec_read_io,
10094
.write = acpi_ec_write_io,
10195
.llseek = default_llseek,

drivers/base/regmap/regmap-debugfs.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ static size_t regmap_calc_reg_len(int max_val, char *buf, size_t buf_size)
2727
return strlen(buf);
2828
}
2929

30-
static int regmap_open_file(struct inode *inode, struct file *file)
31-
{
32-
file->private_data = inode->i_private;
33-
return 0;
34-
}
35-
3630
static ssize_t regmap_name_read_file(struct file *file,
3731
char __user *user_buf, size_t count,
3832
loff_t *ppos)
@@ -57,7 +51,7 @@ static ssize_t regmap_name_read_file(struct file *file,
5751
}
5852

5953
static const struct file_operations regmap_name_fops = {
60-
.open = regmap_open_file,
54+
.open = simple_open,
6155
.read = regmap_name_read_file,
6256
.llseek = default_llseek,
6357
};
@@ -174,7 +168,7 @@ static ssize_t regmap_map_write_file(struct file *file,
174168
#endif
175169

176170
static const struct file_operations regmap_map_fops = {
177-
.open = regmap_open_file,
171+
.open = simple_open,
178172
.read = regmap_map_read_file,
179173
.write = regmap_map_write_file,
180174
.llseek = default_llseek,
@@ -243,7 +237,7 @@ static ssize_t regmap_access_read_file(struct file *file,
243237
}
244238

245239
static const struct file_operations regmap_access_fops = {
246-
.open = regmap_open_file,
240+
.open = simple_open,
247241
.read = regmap_access_read_file,
248242
.llseek = default_llseek,
249243
};

drivers/bluetooth/btmrvl_debugfs.c

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ struct btmrvl_debugfs_data {
4545
struct dentry *txdnldready;
4646
};
4747

48-
static int btmrvl_open_generic(struct inode *inode, struct file *file)
49-
{
50-
file->private_data = inode->i_private;
51-
return 0;
52-
}
53-
5448
static ssize_t btmrvl_hscfgcmd_write(struct file *file,
5549
const char __user *ubuf, size_t count, loff_t *ppos)
5650
{
@@ -93,7 +87,7 @@ static ssize_t btmrvl_hscfgcmd_read(struct file *file, char __user *userbuf,
9387
static const struct file_operations btmrvl_hscfgcmd_fops = {
9488
.read = btmrvl_hscfgcmd_read,
9589
.write = btmrvl_hscfgcmd_write,
96-
.open = btmrvl_open_generic,
90+
.open = simple_open,
9791
.llseek = default_llseek,
9892
};
9993

@@ -134,7 +128,7 @@ static ssize_t btmrvl_psmode_read(struct file *file, char __user *userbuf,
134128
static const struct file_operations btmrvl_psmode_fops = {
135129
.read = btmrvl_psmode_read,
136130
.write = btmrvl_psmode_write,
137-
.open = btmrvl_open_generic,
131+
.open = simple_open,
138132
.llseek = default_llseek,
139133
};
140134

@@ -180,7 +174,7 @@ static ssize_t btmrvl_pscmd_read(struct file *file, char __user *userbuf,
180174
static const struct file_operations btmrvl_pscmd_fops = {
181175
.read = btmrvl_pscmd_read,
182176
.write = btmrvl_pscmd_write,
183-
.open = btmrvl_open_generic,
177+
.open = simple_open,
184178
.llseek = default_llseek,
185179
};
186180

@@ -221,7 +215,7 @@ static ssize_t btmrvl_gpiogap_read(struct file *file, char __user *userbuf,
221215
static const struct file_operations btmrvl_gpiogap_fops = {
222216
.read = btmrvl_gpiogap_read,
223217
.write = btmrvl_gpiogap_write,
224-
.open = btmrvl_open_generic,
218+
.open = simple_open,
225219
.llseek = default_llseek,
226220
};
227221

@@ -265,7 +259,7 @@ static ssize_t btmrvl_hscmd_read(struct file *file, char __user *userbuf,
265259
static const struct file_operations btmrvl_hscmd_fops = {
266260
.read = btmrvl_hscmd_read,
267261
.write = btmrvl_hscmd_write,
268-
.open = btmrvl_open_generic,
262+
.open = simple_open,
269263
.llseek = default_llseek,
270264
};
271265

@@ -305,7 +299,7 @@ static ssize_t btmrvl_hsmode_read(struct file *file, char __user * userbuf,
305299
static const struct file_operations btmrvl_hsmode_fops = {
306300
.read = btmrvl_hsmode_read,
307301
.write = btmrvl_hsmode_write,
308-
.open = btmrvl_open_generic,
302+
.open = simple_open,
309303
.llseek = default_llseek,
310304
};
311305

@@ -323,7 +317,7 @@ static ssize_t btmrvl_curpsmode_read(struct file *file, char __user *userbuf,
323317

324318
static const struct file_operations btmrvl_curpsmode_fops = {
325319
.read = btmrvl_curpsmode_read,
326-
.open = btmrvl_open_generic,
320+
.open = simple_open,
327321
.llseek = default_llseek,
328322
};
329323

@@ -341,7 +335,7 @@ static ssize_t btmrvl_psstate_read(struct file *file, char __user * userbuf,
341335

342336
static const struct file_operations btmrvl_psstate_fops = {
343337
.read = btmrvl_psstate_read,
344-
.open = btmrvl_open_generic,
338+
.open = simple_open,
345339
.llseek = default_llseek,
346340
};
347341

@@ -359,7 +353,7 @@ static ssize_t btmrvl_hsstate_read(struct file *file, char __user *userbuf,
359353

360354
static const struct file_operations btmrvl_hsstate_fops = {
361355
.read = btmrvl_hsstate_read,
362-
.open = btmrvl_open_generic,
356+
.open = simple_open,
363357
.llseek = default_llseek,
364358
};
365359

@@ -378,7 +372,7 @@ static ssize_t btmrvl_txdnldready_read(struct file *file, char __user *userbuf,
378372

379373
static const struct file_operations btmrvl_txdnldready_fops = {
380374
.read = btmrvl_txdnldready_read,
381-
.open = btmrvl_open_generic,
375+
.open = simple_open,
382376
.llseek = default_llseek,
383377
};
384378

drivers/char/virtio_console.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,12 +1038,6 @@ static struct attribute_group port_attribute_group = {
10381038
.attrs = port_sysfs_entries,
10391039
};
10401040

1041-
static int debugfs_open(struct inode *inode, struct file *filp)
1042-
{
1043-
filp->private_data = inode->i_private;
1044-
return 0;
1045-
}
1046-
10471041
static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
10481042
size_t count, loff_t *offp)
10491043
{
@@ -1087,7 +1081,7 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
10871081

10881082
static const struct file_operations port_debugfs_ops = {
10891083
.owner = THIS_MODULE,
1090-
.open = debugfs_open,
1084+
.open = simple_open,
10911085
.read = debugfs_read,
10921086
};
10931087

drivers/dma/coh901318.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ static void coh901318_list_print(struct coh901318_chan *cohc,
104104
static struct coh901318_base *debugfs_dma_base;
105105
static struct dentry *dma_dentry;
106106

107-
static int coh901318_debugfs_open(struct inode *inode, struct file *file)
108-
{
109-
110-
file->private_data = inode->i_private;
111-
return 0;
112-
}
113-
114107
static int coh901318_debugfs_read(struct file *file, char __user *buf,
115108
size_t count, loff_t *f_pos)
116109
{
@@ -158,7 +151,7 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,
158151

159152
static const struct file_operations coh901318_debugfs_status_operations = {
160153
.owner = THIS_MODULE,
161-
.open = coh901318_debugfs_open,
154+
.open = simple_open,
162155
.read = coh901318_debugfs_read,
163156
.llseek = default_llseek,
164157
};

0 commit comments

Comments
 (0)