aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_fs.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 81854586c081..55f240a363fe 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -106,7 +106,7 @@ static ssize_t driver_stats_read(struct file *file, char __user *buf,
106{ 106{
107 qib_stats.sps_ints = qib_sps_ints(); 107 qib_stats.sps_ints = qib_sps_ints();
108 return simple_read_from_buffer(buf, count, ppos, &qib_stats, 108 return simple_read_from_buffer(buf, count, ppos, &qib_stats,
109 sizeof qib_stats); 109 sizeof(qib_stats));
110} 110}
111 111
112/* 112/*
@@ -133,7 +133,7 @@ static ssize_t driver_names_read(struct file *file, char __user *buf,
133 size_t count, loff_t *ppos) 133 size_t count, loff_t *ppos)
134{ 134{
135 return simple_read_from_buffer(buf, count, ppos, qib_statnames, 135 return simple_read_from_buffer(buf, count, ppos, qib_statnames,
136 sizeof qib_statnames - 1); /* no null */ 136 sizeof(qib_statnames) - 1); /* no null */
137} 137}
138 138
139static const struct file_operations driver_ops[] = { 139static const struct file_operations driver_ops[] = {
@@ -379,7 +379,7 @@ static int add_cntr_files(struct super_block *sb, struct qib_devdata *dd)
379 int ret, i; 379 int ret, i;
380 380
381 /* create the per-unit directory */ 381 /* create the per-unit directory */
382 snprintf(unit, sizeof unit, "%u", dd->unit); 382 snprintf(unit, sizeof(unit), "%u", dd->unit);
383 ret = create_file(unit, S_IFDIR|S_IRUGO|S_IXUGO, sb->s_root, &dir, 383 ret = create_file(unit, S_IFDIR|S_IRUGO|S_IXUGO, sb->s_root, &dir,
384 &simple_dir_operations, dd); 384 &simple_dir_operations, dd);
385 if (ret) { 385 if (ret) {
@@ -482,7 +482,7 @@ static int remove_device_files(struct super_block *sb,
482 482
483 root = dget(sb->s_root); 483 root = dget(sb->s_root);
484 mutex_lock(&root->d_inode->i_mutex); 484 mutex_lock(&root->d_inode->i_mutex);
485 snprintf(unit, sizeof unit, "%u", dd->unit); 485 snprintf(unit, sizeof(unit), "%u", dd->unit);
486 dir = lookup_one_len(unit, root, strlen(unit)); 486 dir = lookup_one_len(unit, root, strlen(unit));
487 487
488 if (IS_ERR(dir)) { 488 if (IS_ERR(dir)) {
@@ -560,6 +560,7 @@ static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags,
560 const char *dev_name, void *data) 560 const char *dev_name, void *data)
561{ 561{
562 struct dentry *ret; 562 struct dentry *ret;
563
563 ret = mount_single(fs_type, flags, data, qibfs_fill_super); 564 ret = mount_single(fs_type, flags, data, qibfs_fill_super);
564 if (!IS_ERR(ret)) 565 if (!IS_ERR(ret))
565 qib_super = ret->d_sb; 566 qib_super = ret->d_sb;