aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-06 17:36:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:08:09 -0400
commit6d6bd94f4d83d70cdff67d0bf2a64ef6878216e7 (patch)
tree305ab4f98bcdc25669129ded4f530dd12f5f6407 /fs/coda
parentf38cfb2564f5fead53eebd9617258ee0376b1906 (diff)
fs/coda: use __func__
Replace all function names by __func__ in pr_foo() Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Jan Harkes <jaharkes@cs.cmu.edu> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/cnode.c4
-rw-r--r--fs/coda/dir.c12
-rw-r--r--fs/coda/inode.c24
-rw-r--r--fs/coda/psdev.c23
-rw-r--r--fs/coda/upcall.c4
5 files changed, 34 insertions, 33 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c
index 4bb74b3d3901..7740b1c871c1 100644
--- a/fs/coda/cnode.c
+++ b/fs/coda/cnode.c
@@ -101,7 +101,7 @@ struct inode *coda_cnode_make(struct CodaFid *fid, struct super_block *sb)
101 101
102 inode = coda_iget(sb, fid, &attr); 102 inode = coda_iget(sb, fid, &attr);
103 if (IS_ERR(inode)) 103 if (IS_ERR(inode))
104 pr_warn("coda_cnode_make: coda_iget failed\n"); 104 pr_warn("%s: coda_iget failed\n", __func__);
105 return inode; 105 return inode;
106} 106}
107 107
@@ -137,7 +137,7 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb)
137 unsigned long hash = coda_f2i(fid); 137 unsigned long hash = coda_f2i(fid);
138 138
139 if ( !sb ) { 139 if ( !sb ) {
140 pr_warn("coda_fid_to_inode: no sb!\n"); 140 pr_warn("%s: no sb!\n", __func__);
141 return NULL; 141 return NULL;
142 } 142 }
143 143
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index cf2735c2ba6f..cd8a63238b11 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -453,23 +453,23 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx)
453 ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir, 453 ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir,
454 sizeof(*vdir)); 454 sizeof(*vdir));
455 if (ret < 0) { 455 if (ret < 0) {
456 pr_err("coda readdir: read dir %s failed %d\n", 456 pr_err("%s: read dir %s failed %d\n",
457 coda_f2s(&cii->c_fid), ret); 457 __func__, coda_f2s(&cii->c_fid), ret);
458 break; 458 break;
459 } 459 }
460 if (ret == 0) break; /* end of directory file reached */ 460 if (ret == 0) break; /* end of directory file reached */
461 461
462 /* catch truncated reads */ 462 /* catch truncated reads */
463 if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { 463 if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) {
464 pr_err("coda readdir: short read on %s\n", 464 pr_err("%s: short read on %s\n",
465 coda_f2s(&cii->c_fid)); 465 __func__, coda_f2s(&cii->c_fid));
466 ret = -EBADF; 466 ret = -EBADF;
467 break; 467 break;
468 } 468 }
469 /* validate whether the directory file actually makes sense */ 469 /* validate whether the directory file actually makes sense */
470 if (vdir->d_reclen < vdir_size + vdir->d_namlen) { 470 if (vdir->d_reclen < vdir_size + vdir->d_namlen) {
471 pr_err("coda readdir: invalid dir %s\n", 471 pr_err("%s: invalid dir %s\n",
472 coda_f2s(&cii->c_fid)); 472 __func__, coda_f2s(&cii->c_fid));
473 ret = -EBADF; 473 ret = -EBADF;
474 break; 474 break;
475 } 475 }
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index b5ee5903c7f7..fe3afb2de880 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -119,12 +119,12 @@ static int get_device_index(struct coda_mount_data *data)
119 int idx; 119 int idx;
120 120
121 if (data == NULL) { 121 if (data == NULL) {
122 pr_warn("coda_read_super: Bad mount data\n"); 122 pr_warn("%s: Bad mount data\n", __func__);
123 return -1; 123 return -1;
124 } 124 }
125 125
126 if (data->version != CODA_MOUNT_VERSION) { 126 if (data->version != CODA_MOUNT_VERSION) {
127 pr_warn("coda_read_super: Bad mount version\n"); 127 pr_warn("%s: Bad mount version\n", __func__);
128 return -1; 128 return -1;
129 } 129 }
130 130
@@ -141,13 +141,13 @@ static int get_device_index(struct coda_mount_data *data)
141 fdput(f); 141 fdput(f);
142 142
143 if (idx < 0 || idx >= MAX_CODADEVS) { 143 if (idx < 0 || idx >= MAX_CODADEVS) {
144 pr_warn("coda_read_super: Bad minor number\n"); 144 pr_warn("%s: Bad minor number\n", __func__);
145 return -1; 145 return -1;
146 } 146 }
147 147
148 return idx; 148 return idx;
149Ebadf: 149Ebadf:
150 pr_warn("coda_read_super: Bad file\n"); 150 pr_warn("%s: Bad file\n", __func__);
151 return -1; 151 return -1;
152} 152}
153 153
@@ -168,19 +168,19 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
168 if(idx == -1) 168 if(idx == -1)
169 idx = 0; 169 idx = 0;
170 170
171 pr_info("coda_read_super: device index: %i\n", idx); 171 pr_info("%s: device index: %i\n", __func__, idx);
172 172
173 vc = &coda_comms[idx]; 173 vc = &coda_comms[idx];
174 mutex_lock(&vc->vc_mutex); 174 mutex_lock(&vc->vc_mutex);
175 175
176 if (!vc->vc_inuse) { 176 if (!vc->vc_inuse) {
177 pr_warn("coda_read_super: No pseudo device\n"); 177 pr_warn("%s: No pseudo device\n", __func__);
178 error = -EINVAL; 178 error = -EINVAL;
179 goto unlock_out; 179 goto unlock_out;
180 } 180 }
181 181
182 if (vc->vc_sb) { 182 if (vc->vc_sb) {
183 pr_warn("coda_read_super: Device already mounted\n"); 183 pr_warn("%s: Device already mounted\n", __func__);
184 error = -EBUSY; 184 error = -EBUSY;
185 goto unlock_out; 185 goto unlock_out;
186 } 186 }
@@ -204,11 +204,11 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
204 /* get root fid from Venus: this needs the root inode */ 204 /* get root fid from Venus: this needs the root inode */
205 error = venus_rootfid(sb, &fid); 205 error = venus_rootfid(sb, &fid);
206 if ( error ) { 206 if ( error ) {
207 pr_warn("coda_read_super: coda_get_rootfid failed with %d\n", 207 pr_warn("%s: coda_get_rootfid failed with %d\n",
208 error); 208 __func__, error);
209 goto error; 209 goto error;
210 } 210 }
211 pr_info("coda_read_super: rootfid is %s\n", coda_f2s(&fid)); 211 pr_info("%s: rootfid is %s\n", __func__, coda_f2s(&fid));
212 212
213 /* make root inode */ 213 /* make root inode */
214 root = coda_cnode_make(&fid, sb); 214 root = coda_cnode_make(&fid, sb);
@@ -219,8 +219,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
219 goto error; 219 goto error;
220 } 220 }
221 221
222 pr_info("coda_read_super: rootinode is %ld dev %s\n", 222 pr_info("%s: rootinode is %ld dev %s\n",
223 root->i_ino, root->i_sb->s_id); 223 __func__, root->i_ino, root->i_sb->s_id);
224 sb->s_root = d_make_root(root); 224 sb->s_root = d_make_root(root);
225 if (!sb->s_root) { 225 if (!sb->s_root) {
226 error = -EINVAL; 226 error = -EINVAL;
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index 39ebb148d0d8..5c1e4242368b 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -136,8 +136,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
136 136
137 CODA_FREE(dcbuf, nbytes); 137 CODA_FREE(dcbuf, nbytes);
138 if (error) { 138 if (error) {
139 pr_warn("psdev_write: coda_downcall error: %d\n", 139 pr_warn("%s: coda_downcall error: %d\n",
140 error); 140 __func__, error);
141 retval = error; 141 retval = error;
142 goto out; 142 goto out;
143 } 143 }
@@ -158,16 +158,17 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
158 mutex_unlock(&vcp->vc_mutex); 158 mutex_unlock(&vcp->vc_mutex);
159 159
160 if (!req) { 160 if (!req) {
161 pr_warn("psdev_write: msg (%d, %d) not found\n", 161 pr_warn("%s: msg (%d, %d) not found\n",
162 hdr.opcode, hdr.unique); 162 __func__, hdr.opcode, hdr.unique);
163 retval = -ESRCH; 163 retval = -ESRCH;
164 goto out; 164 goto out;
165 } 165 }
166 166
167 /* move data into response buffer. */ 167 /* move data into response buffer. */
168 if (req->uc_outSize < nbytes) { 168 if (req->uc_outSize < nbytes) {
169 pr_warn("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n", 169 pr_warn("%s: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n",
170 req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); 170 __func__, req->uc_outSize, (long)nbytes,
171 hdr.opcode, hdr.unique);
171 nbytes = req->uc_outSize; /* don't have more space! */ 172 nbytes = req->uc_outSize; /* don't have more space! */
172 } 173 }
173 if (copy_from_user(req->uc_data, buf, nbytes)) { 174 if (copy_from_user(req->uc_data, buf, nbytes)) {
@@ -241,8 +242,8 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
241 /* Move the input args into userspace */ 242 /* Move the input args into userspace */
242 count = req->uc_inSize; 243 count = req->uc_inSize;
243 if (nbytes < req->uc_inSize) { 244 if (nbytes < req->uc_inSize) {
244 pr_warn("psdev_read: Venus read %ld bytes of %d in message\n", 245 pr_warn("%s: Venus read %ld bytes of %d in message\n",
245 (long)nbytes, req->uc_inSize); 246 __func__, (long)nbytes, req->uc_inSize);
246 count = nbytes; 247 count = nbytes;
247 } 248 }
248 249
@@ -306,7 +307,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
306 struct upc_req *req, *tmp; 307 struct upc_req *req, *tmp;
307 308
308 if (!vcp || !vcp->vc_inuse ) { 309 if (!vcp || !vcp->vc_inuse ) {
309 pr_warn("psdev_release: Not open.\n"); 310 pr_warn("%s: Not open.\n", __func__);
310 return -1; 311 return -1;
311 } 312 }
312 313
@@ -355,8 +356,8 @@ static int init_coda_psdev(void)
355{ 356{
356 int i, err = 0; 357 int i, err = 0;
357 if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) { 358 if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) {
358 pr_err("coda_psdev: unable to get major %d\n", 359 pr_err("%s: unable to get major %d\n",
359 CODA_PSDEV_MAJOR); 360 __func__, CODA_PSDEV_MAJOR);
360 return -EIO; 361 return -EIO;
361 } 362 }
362 coda_psdev_class = class_create(THIS_MODULE, "coda"); 363 coda_psdev_class = class_create(THIS_MODULE, "coda");
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index 0780de514bf2..21fcf8dcb9cd 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -518,8 +518,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
518 &outsize, inp); 518 &outsize, inp);
519 519
520 if (error) { 520 if (error) {
521 pr_warn("coda_pioctl: Venus returns: %d for %s\n", 521 pr_warn("%s: Venus returns: %d for %s\n",
522 error, coda_f2s(fid)); 522 __func__, error, coda_f2s(fid));
523 goto exit; 523 goto exit;
524 } 524 }
525 525