Commit 6d6bd94f authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

fs/coda: use __func__

Replace all function names by __func__ in pr_foo()
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f38cfb25
...@@ -101,7 +101,7 @@ struct inode *coda_cnode_make(struct CodaFid *fid, struct super_block *sb) ...@@ -101,7 +101,7 @@ struct inode *coda_cnode_make(struct CodaFid *fid, struct super_block *sb)
inode = coda_iget(sb, fid, &attr); inode = coda_iget(sb, fid, &attr);
if (IS_ERR(inode)) if (IS_ERR(inode))
pr_warn("coda_cnode_make: coda_iget failed\n"); pr_warn("%s: coda_iget failed\n", __func__);
return inode; return inode;
} }
...@@ -137,7 +137,7 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) ...@@ -137,7 +137,7 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb)
unsigned long hash = coda_f2i(fid); unsigned long hash = coda_f2i(fid);
if ( !sb ) { if ( !sb ) {
pr_warn("coda_fid_to_inode: no sb!\n"); pr_warn("%s: no sb!\n", __func__);
return NULL; return NULL;
} }
......
...@@ -453,23 +453,23 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) ...@@ -453,23 +453,23 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx)
ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir, ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir,
sizeof(*vdir)); sizeof(*vdir));
if (ret < 0) { if (ret < 0) {
pr_err("coda readdir: read dir %s failed %d\n", pr_err("%s: read dir %s failed %d\n",
coda_f2s(&cii->c_fid), ret); __func__, coda_f2s(&cii->c_fid), ret);
break; break;
} }
if (ret == 0) break; /* end of directory file reached */ if (ret == 0) break; /* end of directory file reached */
/* catch truncated reads */ /* catch truncated reads */
if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) {
pr_err("coda readdir: short read on %s\n", pr_err("%s: short read on %s\n",
coda_f2s(&cii->c_fid)); __func__, coda_f2s(&cii->c_fid));
ret = -EBADF; ret = -EBADF;
break; break;
} }
/* validate whether the directory file actually makes sense */ /* validate whether the directory file actually makes sense */
if (vdir->d_reclen < vdir_size + vdir->d_namlen) { if (vdir->d_reclen < vdir_size + vdir->d_namlen) {
pr_err("coda readdir: invalid dir %s\n", pr_err("%s: invalid dir %s\n",
coda_f2s(&cii->c_fid)); __func__, coda_f2s(&cii->c_fid));
ret = -EBADF; ret = -EBADF;
break; break;
} }
......
...@@ -119,12 +119,12 @@ static int get_device_index(struct coda_mount_data *data) ...@@ -119,12 +119,12 @@ static int get_device_index(struct coda_mount_data *data)
int idx; int idx;
if (data == NULL) { if (data == NULL) {
pr_warn("coda_read_super: Bad mount data\n"); pr_warn("%s: Bad mount data\n", __func__);
return -1; return -1;
} }
if (data->version != CODA_MOUNT_VERSION) { if (data->version != CODA_MOUNT_VERSION) {
pr_warn("coda_read_super: Bad mount version\n"); pr_warn("%s: Bad mount version\n", __func__);
return -1; return -1;
} }
...@@ -141,13 +141,13 @@ static int get_device_index(struct coda_mount_data *data) ...@@ -141,13 +141,13 @@ static int get_device_index(struct coda_mount_data *data)
fdput(f); fdput(f);
if (idx < 0 || idx >= MAX_CODADEVS) { if (idx < 0 || idx >= MAX_CODADEVS) {
pr_warn("coda_read_super: Bad minor number\n"); pr_warn("%s: Bad minor number\n", __func__);
return -1; return -1;
} }
return idx; return idx;
Ebadf: Ebadf:
pr_warn("coda_read_super: Bad file\n"); pr_warn("%s: Bad file\n", __func__);
return -1; return -1;
} }
...@@ -168,19 +168,19 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -168,19 +168,19 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
if(idx == -1) if(idx == -1)
idx = 0; idx = 0;
pr_info("coda_read_super: device index: %i\n", idx); pr_info("%s: device index: %i\n", __func__, idx);
vc = &coda_comms[idx]; vc = &coda_comms[idx];
mutex_lock(&vc->vc_mutex); mutex_lock(&vc->vc_mutex);
if (!vc->vc_inuse) { if (!vc->vc_inuse) {
pr_warn("coda_read_super: No pseudo device\n"); pr_warn("%s: No pseudo device\n", __func__);
error = -EINVAL; error = -EINVAL;
goto unlock_out; goto unlock_out;
} }
if (vc->vc_sb) { if (vc->vc_sb) {
pr_warn("coda_read_super: Device already mounted\n"); pr_warn("%s: Device already mounted\n", __func__);
error = -EBUSY; error = -EBUSY;
goto unlock_out; goto unlock_out;
} }
...@@ -204,11 +204,11 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -204,11 +204,11 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
/* get root fid from Venus: this needs the root inode */ /* get root fid from Venus: this needs the root inode */
error = venus_rootfid(sb, &fid); error = venus_rootfid(sb, &fid);
if ( error ) { if ( error ) {
pr_warn("coda_read_super: coda_get_rootfid failed with %d\n", pr_warn("%s: coda_get_rootfid failed with %d\n",
error); __func__, error);
goto error; goto error;
} }
pr_info("coda_read_super: rootfid is %s\n", coda_f2s(&fid)); pr_info("%s: rootfid is %s\n", __func__, coda_f2s(&fid));
/* make root inode */ /* make root inode */
root = coda_cnode_make(&fid, sb); root = coda_cnode_make(&fid, sb);
...@@ -219,8 +219,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -219,8 +219,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
goto error; goto error;
} }
pr_info("coda_read_super: rootinode is %ld dev %s\n", pr_info("%s: rootinode is %ld dev %s\n",
root->i_ino, root->i_sb->s_id); __func__, root->i_ino, root->i_sb->s_id);
sb->s_root = d_make_root(root); sb->s_root = d_make_root(root);
if (!sb->s_root) { if (!sb->s_root) {
error = -EINVAL; error = -EINVAL;
......
...@@ -136,8 +136,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -136,8 +136,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
CODA_FREE(dcbuf, nbytes); CODA_FREE(dcbuf, nbytes);
if (error) { if (error) {
pr_warn("psdev_write: coda_downcall error: %d\n", pr_warn("%s: coda_downcall error: %d\n",
error); __func__, error);
retval = error; retval = error;
goto out; goto out;
} }
...@@ -158,16 +158,17 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -158,16 +158,17 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
mutex_unlock(&vcp->vc_mutex); mutex_unlock(&vcp->vc_mutex);
if (!req) { if (!req) {
pr_warn("psdev_write: msg (%d, %d) not found\n", pr_warn("%s: msg (%d, %d) not found\n",
hdr.opcode, hdr.unique); __func__, hdr.opcode, hdr.unique);
retval = -ESRCH; retval = -ESRCH;
goto out; goto out;
} }
/* move data into response buffer. */ /* move data into response buffer. */
if (req->uc_outSize < nbytes) { if (req->uc_outSize < nbytes) {
pr_warn("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n", pr_warn("%s: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n",
req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); __func__, req->uc_outSize, (long)nbytes,
hdr.opcode, hdr.unique);
nbytes = req->uc_outSize; /* don't have more space! */ nbytes = req->uc_outSize; /* don't have more space! */
} }
if (copy_from_user(req->uc_data, buf, nbytes)) { 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,8 +242,8 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
/* Move the input args into userspace */ /* Move the input args into userspace */
count = req->uc_inSize; count = req->uc_inSize;
if (nbytes < req->uc_inSize) { if (nbytes < req->uc_inSize) {
pr_warn("psdev_read: Venus read %ld bytes of %d in message\n", pr_warn("%s: Venus read %ld bytes of %d in message\n",
(long)nbytes, req->uc_inSize); __func__, (long)nbytes, req->uc_inSize);
count = nbytes; count = nbytes;
} }
...@@ -306,7 +307,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) ...@@ -306,7 +307,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
struct upc_req *req, *tmp; struct upc_req *req, *tmp;
if (!vcp || !vcp->vc_inuse ) { if (!vcp || !vcp->vc_inuse ) {
pr_warn("psdev_release: Not open.\n"); pr_warn("%s: Not open.\n", __func__);
return -1; return -1;
} }
...@@ -355,8 +356,8 @@ static int init_coda_psdev(void) ...@@ -355,8 +356,8 @@ static int init_coda_psdev(void)
{ {
int i, err = 0; int i, err = 0;
if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) { if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) {
pr_err("coda_psdev: unable to get major %d\n", pr_err("%s: unable to get major %d\n",
CODA_PSDEV_MAJOR); __func__, CODA_PSDEV_MAJOR);
return -EIO; return -EIO;
} }
coda_psdev_class = class_create(THIS_MODULE, "coda"); coda_psdev_class = class_create(THIS_MODULE, "coda");
......
...@@ -518,8 +518,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, ...@@ -518,8 +518,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
&outsize, inp); &outsize, inp);
if (error) { if (error) {
pr_warn("coda_pioctl: Venus returns: %d for %s\n", pr_warn("%s: Venus returns: %d for %s\n",
error, coda_f2s(fid)); __func__, error, coda_f2s(fid));
goto exit; goto exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment