Skip to content

Commit

Permalink
Merge branch 'akpm' (Andrew's patch-bomb)
Browse files Browse the repository at this point in the history
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 <akpm@linux-foundation.org>: (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
  • Loading branch information
torvalds committed Apr 5, 2012
2 parents 43f63c8 + dac23b0 commit 5d32c88
Show file tree
Hide file tree
Showing 78 changed files with 518 additions and 631 deletions.
11 changes: 10 additions & 1 deletion MAINTAINERS
Expand Up @@ -5637,7 +5637,7 @@ M: Ohad Ben-Cohen <ohad@wizery.com>
S: Maintained S: Maintained
F: drivers/remoteproc/ F: drivers/remoteproc/
F: Documentation/remoteproc.txt F: Documentation/remoteproc.txt
F: include/linux/remoteproc.txt F: include/linux/remoteproc.h


RFKILL RFKILL
M: Johannes Berg <johannes@sipsolutions.net> M: Johannes Berg <johannes@sipsolutions.net>
Expand Down Expand Up @@ -6287,6 +6287,15 @@ F: drivers/tty/serial/sunsu.c
F: drivers/tty/serial/sunzilog.c F: drivers/tty/serial/sunzilog.c
F: drivers/tty/serial/sunzilog.h F: drivers/tty/serial/sunzilog.h


SPARSE CHECKER
M: "Christopher Li" <sparse@chrisli.org>
L: linux-sparse@vger.kernel.org
W: https://sparse.wiki.kernel.org/
T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git
T: git git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
S: Maintained
F: include/linux/compiler.h

SPEAR PLATFORM SUPPORT SPEAR PLATFORM SUPPORT
M: Viresh Kumar <viresh.kumar@st.com> M: Viresh Kumar <viresh.kumar@st.com>
L: spear-devel@list.st.com L: spear-devel@list.st.com
Expand Down
31 changes: 10 additions & 21 deletions arch/alpha/kernel/signal.c
Expand Up @@ -120,12 +120,13 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
*/ */
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
{ {
mask &= _BLOCKABLE; sigset_t blocked;
spin_lock_irq(&current->sighand->siglock);
current->saved_sigmask = current->blocked; current->saved_sigmask = current->blocked;
siginitset(&current->blocked, mask);
recalc_sigpending(); mask &= _BLOCKABLE;
spin_unlock_irq(&current->sighand->siglock); siginitset(&blocked, mask);
set_current_blocked(&blocked);


current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule(); schedule();
Expand Down Expand Up @@ -238,10 +239,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
goto give_sigsegv; goto give_sigsegv;


sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock); set_current_blocked(&set);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);


if (restore_sigcontext(sc, regs, sw)) if (restore_sigcontext(sc, regs, sw))
goto give_sigsegv; goto give_sigsegv;
Expand Down Expand Up @@ -276,10 +274,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
goto give_sigsegv; goto give_sigsegv;


sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock); set_current_blocked(&set);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);


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


if (ret == 0) { if (ret == 0)
spin_lock_irq(&current->sighand->siglock); block_sigmask(ka, sig);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
}


return ret; return ret;
} }
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-msm/smd_debug.c
Expand Up @@ -203,15 +203,9 @@ static ssize_t debug_read(struct file *file, char __user *buf,
return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize); return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize);
} }


static int debug_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}

static const struct file_operations debug_ops = { static const struct file_operations debug_ops = {
.read = debug_read, .read = debug_read,
.open = debug_open, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down
16 changes: 3 additions & 13 deletions arch/c6x/kernel/signal.c
Expand Up @@ -85,10 +85,7 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs)
goto badframe; goto badframe;


sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock); set_current_blocked(&set);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);


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


/* Set up the stack frame */ /* Set up the stack frame */
ret = setup_rt_frame(sig, ka, info, oldset, regs); ret = setup_rt_frame(sig, ka, info, oldset, regs);
if (ret == 0) { if (ret == 0)
spin_lock_irq(&current->sighand->siglock); block_sigmask(ka, sig);
sigorsets(&current->blocked, &current->blocked,
&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked, sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
}


return ret; return ret;
} }
Expand Down
9 changes: 1 addition & 8 deletions arch/x86/kernel/kdebugfs.c
Expand Up @@ -68,16 +68,9 @@ static ssize_t setup_data_read(struct file *file, char __user *user_buf,
return count; return count;
} }


static int setup_data_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;

return 0;
}

static const struct file_operations fops_setup_data = { static const struct file_operations fops_setup_data = {
.read = setup_data_read, .read = setup_data_read,
.open = setup_data_open, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down
8 changes: 1 addition & 7 deletions drivers/acpi/ec_sys.c
Expand Up @@ -27,12 +27,6 @@ MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "


static struct dentry *acpi_ec_debugfs_dir; static struct dentry *acpi_ec_debugfs_dir;


static int acpi_ec_open_io(struct inode *i, struct file *f)
{
f->private_data = i->i_private;
return 0;
}

static ssize_t acpi_ec_read_io(struct file *f, char __user *buf, static ssize_t acpi_ec_read_io(struct file *f, char __user *buf,
size_t count, loff_t *off) size_t count, loff_t *off)
{ {
Expand Down Expand Up @@ -95,7 +89,7 @@ static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf,


static const struct file_operations acpi_ec_io_ops = { static const struct file_operations acpi_ec_io_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_ec_open_io, .open = simple_open,
.read = acpi_ec_read_io, .read = acpi_ec_read_io,
.write = acpi_ec_write_io, .write = acpi_ec_write_io,
.llseek = default_llseek, .llseek = default_llseek,
Expand Down
12 changes: 3 additions & 9 deletions drivers/base/regmap/regmap-debugfs.c
Expand Up @@ -27,12 +27,6 @@ static size_t regmap_calc_reg_len(int max_val, char *buf, size_t buf_size)
return strlen(buf); return strlen(buf);
} }


static int regmap_open_file(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}

static ssize_t regmap_name_read_file(struct file *file, static ssize_t regmap_name_read_file(struct file *file,
char __user *user_buf, size_t count, char __user *user_buf, size_t count,
loff_t *ppos) loff_t *ppos)
Expand All @@ -57,7 +51,7 @@ static ssize_t regmap_name_read_file(struct file *file,
} }


static const struct file_operations regmap_name_fops = { static const struct file_operations regmap_name_fops = {
.open = regmap_open_file, .open = simple_open,
.read = regmap_name_read_file, .read = regmap_name_read_file,
.llseek = default_llseek, .llseek = default_llseek,
}; };
Expand Down Expand Up @@ -174,7 +168,7 @@ static ssize_t regmap_map_write_file(struct file *file,
#endif #endif


static const struct file_operations regmap_map_fops = { static const struct file_operations regmap_map_fops = {
.open = regmap_open_file, .open = simple_open,
.read = regmap_map_read_file, .read = regmap_map_read_file,
.write = regmap_map_write_file, .write = regmap_map_write_file,
.llseek = default_llseek, .llseek = default_llseek,
Expand Down Expand Up @@ -243,7 +237,7 @@ static ssize_t regmap_access_read_file(struct file *file,
} }


static const struct file_operations regmap_access_fops = { static const struct file_operations regmap_access_fops = {
.open = regmap_open_file, .open = simple_open,
.read = regmap_access_read_file, .read = regmap_access_read_file,
.llseek = default_llseek, .llseek = default_llseek,
}; };
Expand Down
26 changes: 10 additions & 16 deletions drivers/bluetooth/btmrvl_debugfs.c
Expand Up @@ -45,12 +45,6 @@ struct btmrvl_debugfs_data {
struct dentry *txdnldready; struct dentry *txdnldready;
}; };


static int btmrvl_open_generic(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}

static ssize_t btmrvl_hscfgcmd_write(struct file *file, static ssize_t btmrvl_hscfgcmd_write(struct file *file,
const char __user *ubuf, size_t count, loff_t *ppos) const char __user *ubuf, size_t count, loff_t *ppos)
{ {
Expand Down Expand Up @@ -93,7 +87,7 @@ static ssize_t btmrvl_hscfgcmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_hscfgcmd_fops = { static const struct file_operations btmrvl_hscfgcmd_fops = {
.read = btmrvl_hscfgcmd_read, .read = btmrvl_hscfgcmd_read,
.write = btmrvl_hscfgcmd_write, .write = btmrvl_hscfgcmd_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down Expand Up @@ -134,7 +128,7 @@ static ssize_t btmrvl_psmode_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_psmode_fops = { static const struct file_operations btmrvl_psmode_fops = {
.read = btmrvl_psmode_read, .read = btmrvl_psmode_read,
.write = btmrvl_psmode_write, .write = btmrvl_psmode_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down Expand Up @@ -180,7 +174,7 @@ static ssize_t btmrvl_pscmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_pscmd_fops = { static const struct file_operations btmrvl_pscmd_fops = {
.read = btmrvl_pscmd_read, .read = btmrvl_pscmd_read,
.write = btmrvl_pscmd_write, .write = btmrvl_pscmd_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down Expand Up @@ -221,7 +215,7 @@ static ssize_t btmrvl_gpiogap_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_gpiogap_fops = { static const struct file_operations btmrvl_gpiogap_fops = {
.read = btmrvl_gpiogap_read, .read = btmrvl_gpiogap_read,
.write = btmrvl_gpiogap_write, .write = btmrvl_gpiogap_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down Expand Up @@ -265,7 +259,7 @@ static ssize_t btmrvl_hscmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_hscmd_fops = { static const struct file_operations btmrvl_hscmd_fops = {
.read = btmrvl_hscmd_read, .read = btmrvl_hscmd_read,
.write = btmrvl_hscmd_write, .write = btmrvl_hscmd_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down Expand Up @@ -305,7 +299,7 @@ static ssize_t btmrvl_hsmode_read(struct file *file, char __user * userbuf,
static const struct file_operations btmrvl_hsmode_fops = { static const struct file_operations btmrvl_hsmode_fops = {
.read = btmrvl_hsmode_read, .read = btmrvl_hsmode_read,
.write = btmrvl_hsmode_write, .write = btmrvl_hsmode_write,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


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


static const struct file_operations btmrvl_curpsmode_fops = { static const struct file_operations btmrvl_curpsmode_fops = {
.read = btmrvl_curpsmode_read, .read = btmrvl_curpsmode_read,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


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


static const struct file_operations btmrvl_psstate_fops = { static const struct file_operations btmrvl_psstate_fops = {
.read = btmrvl_psstate_read, .read = btmrvl_psstate_read,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


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


static const struct file_operations btmrvl_hsstate_fops = { static const struct file_operations btmrvl_hsstate_fops = {
.read = btmrvl_hsstate_read, .read = btmrvl_hsstate_read,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


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


static const struct file_operations btmrvl_txdnldready_fops = { static const struct file_operations btmrvl_txdnldready_fops = {
.read = btmrvl_txdnldready_read, .read = btmrvl_txdnldready_read,
.open = btmrvl_open_generic, .open = simple_open,
.llseek = default_llseek, .llseek = default_llseek,
}; };


Expand Down
8 changes: 1 addition & 7 deletions drivers/char/virtio_console.c
Expand Up @@ -1038,12 +1038,6 @@ static struct attribute_group port_attribute_group = {
.attrs = port_sysfs_entries, .attrs = port_sysfs_entries,
}; };


static int debugfs_open(struct inode *inode, struct file *filp)
{
filp->private_data = inode->i_private;
return 0;
}

static ssize_t debugfs_read(struct file *filp, char __user *ubuf, static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *offp) size_t count, loff_t *offp)
{ {
Expand Down Expand Up @@ -1087,7 +1081,7 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf,


static const struct file_operations port_debugfs_ops = { static const struct file_operations port_debugfs_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = debugfs_open, .open = simple_open,
.read = debugfs_read, .read = debugfs_read,
}; };


Expand Down
9 changes: 1 addition & 8 deletions drivers/dma/coh901318.c
Expand Up @@ -104,13 +104,6 @@ static void coh901318_list_print(struct coh901318_chan *cohc,
static struct coh901318_base *debugfs_dma_base; static struct coh901318_base *debugfs_dma_base;
static struct dentry *dma_dentry; static struct dentry *dma_dentry;


static int coh901318_debugfs_open(struct inode *inode, struct file *file)
{

file->private_data = inode->i_private;
return 0;
}

static int coh901318_debugfs_read(struct file *file, char __user *buf, static int coh901318_debugfs_read(struct file *file, char __user *buf,
size_t count, loff_t *f_pos) size_t count, loff_t *f_pos)
{ {
Expand Down Expand Up @@ -158,7 +151,7 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,


static const struct file_operations coh901318_debugfs_status_operations = { static const struct file_operations coh901318_debugfs_status_operations = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = coh901318_debugfs_open, .open = simple_open,
.read = coh901318_debugfs_read, .read = coh901318_debugfs_read,
.llseek = default_llseek, .llseek = default_llseek,
}; };
Expand Down

0 comments on commit 5d32c88

Please sign in to comment.