mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile 1 from Al Viro:
"Unfortunately, this merge window it'll have a be a lot of small piles -
my fault, actually, for not keeping #for-next in anything that would
resemble a sane shape ;-/
This pile: assorted fixes (the first 3 are -stable fodder, IMO) and
cleanups + %pd/%pD formats (dentry/file pathname, up to 4 last
components) + several long-standing patches from various folks.
There definitely will be a lot more (starting with Miklos'
check_submount_and_drop() series)"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
direct-io: Handle O_(D)SYNC AIO
direct-io: Implement generic deferred AIO completions
add formats for dentry/file pathnames
kvm eventfd: switch to fdget
powerpc kvm: use fdget
switch fchmod() to fdget
switch epoll_ctl() to fdget
switch copy_module_from_fd() to fdget
git simplify nilfs check for busy subtree
ibmasmfs: don't bother passing superblock when not needed
don't pass superblock to hypfs_{mkdir,create*}
don't pass superblock to hypfs_diag_create_files
don't pass superblock to hypfs_vm_create_files()
oprofile: get rid of pointless forward declarations of struct super_block
oprofilefs_create_...() do not need superblock argument
oprofilefs_mkdir() doesn't need superblock argument
don't bother with passing superblock to oprofile_create_stats_files()
oprofile: don't bother with passing superblock to ->create_files()
don't bother passing sb to oprofile_create_files()
coh901318: don't open-code simple_read_from_buffer()
...
This commit is contained in:
commit
45d9a2220f
52 changed files with 738 additions and 502 deletions
|
|
@ -1339,15 +1339,14 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,
|
|||
{
|
||||
u64 started_channels = debugfs_dma_base->pm.started_channels;
|
||||
int pool_count = debugfs_dma_base->pool.debugfs_pool_counter;
|
||||
int i;
|
||||
int ret = 0;
|
||||
char *dev_buf;
|
||||
char *tmp;
|
||||
int dev_size;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
dev_buf = kmalloc(4*1024, GFP_KERNEL);
|
||||
if (dev_buf == NULL)
|
||||
goto err_kmalloc;
|
||||
return -ENOMEM;
|
||||
tmp = dev_buf;
|
||||
|
||||
tmp += sprintf(tmp, "DMA -- enabled dma channels\n");
|
||||
|
|
@ -1357,26 +1356,11 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,
|
|||
tmp += sprintf(tmp, "channel %d\n", i);
|
||||
|
||||
tmp += sprintf(tmp, "Pool alloc nbr %d\n", pool_count);
|
||||
dev_size = tmp - dev_buf;
|
||||
|
||||
/* No more to read if offset != 0 */
|
||||
if (*f_pos > dev_size)
|
||||
goto out;
|
||||
|
||||
if (count > dev_size - *f_pos)
|
||||
count = dev_size - *f_pos;
|
||||
|
||||
if (copy_to_user(buf, dev_buf + *f_pos, count))
|
||||
ret = -EINVAL;
|
||||
ret = count;
|
||||
*f_pos += count;
|
||||
|
||||
out:
|
||||
ret = simple_read_from_buffer(buf, count, f_pos, dev_buf,
|
||||
tmp - dev_buf);
|
||||
kfree(dev_buf);
|
||||
return ret;
|
||||
|
||||
err_kmalloc:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations coh901318_debugfs_status_operations = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue