Commit d9b4b319 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

fs/coda: replace printk by pr_foo()

No level printk converted to pr_warn or pr_info
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 817e1d90
...@@ -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))
printk("coda_cnode_make: coda_iget failed\n"); pr_warn("coda_cnode_make: coda_iget failed\n");
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 ) {
printk("coda_fid_to_inode: no sb!\n"); pr_warn("coda_fid_to_inode: no sb!\n");
return NULL; return NULL;
} }
......
...@@ -63,7 +63,7 @@ void coda_sysctl_clean(void); ...@@ -63,7 +63,7 @@ void coda_sysctl_clean(void);
else \ else \
ptr = (cast)vzalloc((unsigned long) size); \ ptr = (cast)vzalloc((unsigned long) size); \
if (!ptr) \ if (!ptr) \
printk("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \ pr_warn("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \
} while (0) } while (0)
......
...@@ -102,7 +102,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsig ...@@ -102,7 +102,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsig
int type = 0; int type = 0;
if (length > CODA_MAXNAMLEN) { if (length > CODA_MAXNAMLEN) {
printk(KERN_ERR "name too long: lookup, %s (%*s)\n", pr_err("name too long: lookup, %s (%*s)\n",
coda_i2s(dir), (int)length, name); coda_i2s(dir), (int)length, name);
return ERR_PTR(-ENAMETOOLONG); return ERR_PTR(-ENAMETOOLONG);
} }
...@@ -453,7 +453,7 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) ...@@ -453,7 +453,7 @@ 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) {
printk(KERN_ERR "coda readdir: read dir %s failed %d\n", pr_err("coda readdir: read dir %s failed %d\n",
coda_f2s(&cii->c_fid), ret); coda_f2s(&cii->c_fid), ret);
break; break;
} }
...@@ -461,14 +461,14 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) ...@@ -461,14 +461,14 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx)
/* 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) {
printk(KERN_ERR "coda readdir: short read on %s\n", pr_err("coda readdir: short read on %s\n",
coda_f2s(&cii->c_fid)); 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) {
printk(KERN_ERR "coda readdir: invalid dir %s\n", pr_err("coda readdir: invalid dir %s\n",
coda_f2s(&cii->c_fid)); coda_f2s(&cii->c_fid));
ret = -EBADF; ret = -EBADF;
break; break;
...@@ -589,8 +589,8 @@ int coda_revalidate_inode(struct inode *inode) ...@@ -589,8 +589,8 @@ int coda_revalidate_inode(struct inode *inode)
coda_vattr_to_iattr(inode, &attr); coda_vattr_to_iattr(inode, &attr);
if ((old_mode & S_IFMT) != (inode->i_mode & S_IFMT)) { if ((old_mode & S_IFMT) != (inode->i_mode & S_IFMT)) {
printk("Coda: inode %ld, fid %s changed type!\n", pr_warn("Coda: inode %ld, fid %s changed type!\n",
inode->i_ino, coda_f2s(&(cii->c_fid))); inode->i_ino, coda_f2s(&(cii->c_fid)));
} }
/* the following can happen when a local fid is replaced /* the following can happen when a local fid is replaced
......
...@@ -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) {
printk("coda_read_super: Bad mount data\n"); pr_warn("coda_read_super: Bad mount data\n");
return -1; return -1;
} }
if (data->version != CODA_MOUNT_VERSION) { if (data->version != CODA_MOUNT_VERSION) {
printk("coda_read_super: Bad mount version\n"); pr_warn("coda_read_super: Bad mount version\n");
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) {
printk("coda_read_super: Bad minor number\n"); pr_warn("coda_read_super: Bad minor number\n");
return -1; return -1;
} }
return idx; return idx;
Ebadf: Ebadf:
printk("coda_read_super: Bad file\n"); pr_warn("coda_read_super: Bad file\n");
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;
printk(KERN_INFO "coda_read_super: device index: %i\n", idx); pr_info("coda_read_super: device index: %i\n", 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) {
printk("coda_read_super: No pseudo device\n"); pr_warn("coda_read_super: No pseudo device\n");
error = -EINVAL; error = -EINVAL;
goto unlock_out; goto unlock_out;
} }
if (vc->vc_sb) { if (vc->vc_sb) {
printk("coda_read_super: Device already mounted\n"); pr_warn("coda_read_super: Device already mounted\n");
error = -EBUSY; error = -EBUSY;
goto unlock_out; goto unlock_out;
} }
...@@ -204,22 +204,23 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -204,22 +204,23 @@ 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 ) {
printk("coda_read_super: coda_get_rootfid failed with %d\n", pr_warn("coda_read_super: coda_get_rootfid failed with %d\n",
error); error);
goto error; goto error;
} }
printk("coda_read_super: rootfid is %s\n", coda_f2s(&fid)); pr_info("coda_read_super: rootfid is %s\n", coda_f2s(&fid));
/* make root inode */ /* make root inode */
root = coda_cnode_make(&fid, sb); root = coda_cnode_make(&fid, sb);
if (IS_ERR(root)) { if (IS_ERR(root)) {
error = PTR_ERR(root); error = PTR_ERR(root);
printk("Failure of coda_cnode_make for root: error %d\n", error); pr_warn("Failure of coda_cnode_make for root: error %d\n",
error);
goto error; goto error;
} }
printk("coda_read_super: rootinode is %ld dev %s\n", pr_info("coda_read_super: rootinode is %ld dev %s\n",
root->i_ino, root->i_sb->s_id); 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;
...@@ -246,7 +247,7 @@ static void coda_put_super(struct super_block *sb) ...@@ -246,7 +247,7 @@ static void coda_put_super(struct super_block *sb)
sb->s_fs_info = NULL; sb->s_fs_info = NULL;
mutex_unlock(&vcp->vc_mutex); mutex_unlock(&vcp->vc_mutex);
printk("Coda: Bye bye.\n"); pr_info("Coda: Bye bye.\n");
} }
static void coda_evict_inode(struct inode *inode) static void coda_evict_inode(struct inode *inode)
......
...@@ -114,14 +114,14 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -114,14 +114,14 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
int size = sizeof(*dcbuf); int size = sizeof(*dcbuf);
if ( nbytes < sizeof(struct coda_out_hdr) ) { if ( nbytes < sizeof(struct coda_out_hdr) ) {
printk("coda_downcall opc %d uniq %d, not enough!\n", pr_warn("coda_downcall opc %d uniq %d, not enough!\n",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
count = nbytes; count = nbytes;
goto out; goto out;
} }
if ( nbytes > size ) { if ( nbytes > size ) {
printk("Coda: downcall opc %d, uniq %d, too much!", pr_warn("Coda: downcall opc %d, uniq %d, too much!",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
nbytes = size; nbytes = size;
} }
CODA_ALLOC(dcbuf, union outputArgs *, nbytes); CODA_ALLOC(dcbuf, union outputArgs *, nbytes);
...@@ -136,7 +136,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -136,7 +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) {
printk("psdev_write: coda_downcall error: %d\n", error); pr_warn("psdev_write: coda_downcall error: %d\n",
error);
retval = error; retval = error;
goto out; goto out;
} }
...@@ -157,7 +158,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -157,7 +158,7 @@ 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) {
printk("psdev_write: msg (%d, %d) not found\n", pr_warn("psdev_write: msg (%d, %d) not found\n",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
retval = -ESRCH; retval = -ESRCH;
goto out; goto out;
...@@ -165,8 +166,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, ...@@ -165,8 +166,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
/* move data into response buffer. */ /* move data into response buffer. */
if (req->uc_outSize < nbytes) { if (req->uc_outSize < nbytes) {
printk("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n", pr_warn("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n",
req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); 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)) {
...@@ -240,7 +241,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf, ...@@ -240,7 +241,7 @@ 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) {
printk ("psdev_read: Venus read %ld bytes of %d in message\n", pr_warn("psdev_read: Venus read %ld bytes of %d in message\n",
(long)nbytes, req->uc_inSize); (long)nbytes, req->uc_inSize);
count = nbytes; count = nbytes;
} }
...@@ -305,7 +306,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) ...@@ -305,7 +306,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 ) {
printk("psdev_release: Not open.\n"); pr_warn("psdev_release: Not open.\n");
return -1; return -1;
} }
...@@ -354,8 +355,8 @@ static int init_coda_psdev(void) ...@@ -354,8 +355,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)) {
printk(KERN_ERR "coda_psdev: unable to get major %d\n", pr_err("coda_psdev: unable to get major %d\n",
CODA_PSDEV_MAJOR); CODA_PSDEV_MAJOR);
return -EIO; return -EIO;
} }
coda_psdev_class = class_create(THIS_MODULE, "coda"); coda_psdev_class = class_create(THIS_MODULE, "coda");
...@@ -393,13 +394,13 @@ static int __init init_coda(void) ...@@ -393,13 +394,13 @@ static int __init init_coda(void)
goto out2; goto out2;
status = init_coda_psdev(); status = init_coda_psdev();
if ( status ) { if ( status ) {
printk("Problem (%d) in init_coda_psdev\n", status); pr_warn("Problem (%d) in init_coda_psdev\n", status);
goto out1; goto out1;
} }
status = register_filesystem(&coda_fs_type); status = register_filesystem(&coda_fs_type);
if (status) { if (status) {
printk("coda: failed to register filesystem!\n"); pr_warn("coda: failed to register filesystem!\n");
goto out; goto out;
} }
return 0; return 0;
...@@ -420,9 +421,8 @@ static void __exit exit_coda(void) ...@@ -420,9 +421,8 @@ static void __exit exit_coda(void)
int err, i; int err, i;
err = unregister_filesystem(&coda_fs_type); err = unregister_filesystem(&coda_fs_type);
if ( err != 0 ) { if (err != 0)
printk("coda: failed to unregister filesystem\n"); pr_warn("coda: failed to unregister filesystem\n");
}
for (i = 0; i < MAX_CODADEVS; i++) for (i = 0; i < MAX_CODADEVS; i++)
device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
class_destroy(coda_psdev_class); class_destroy(coda_psdev_class);
......
...@@ -508,8 +508,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, ...@@ -508,8 +508,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
inp->coda_ioctl.data = (char *)(INSIZE(ioctl)); inp->coda_ioctl.data = (char *)(INSIZE(ioctl));
/* get the data out of user space */ /* get the data out of user space */
if ( copy_from_user((char*)inp + (long)inp->coda_ioctl.data, if (copy_from_user((char *)inp + (long)inp->coda_ioctl.data,
data->vi.in, data->vi.in_size) ) { data->vi.in, data->vi.in_size)) {
error = -EINVAL; error = -EINVAL;
goto exit; goto exit;
} }
...@@ -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) {
printk("coda_pioctl: Venus returns: %d for %s\n", pr_warn("coda_pioctl: Venus returns: %d for %s\n",
error, coda_f2s(fid)); error, coda_f2s(fid));
goto exit; goto exit;
} }
...@@ -675,7 +675,7 @@ static int coda_upcall(struct venus_comm *vcp, ...@@ -675,7 +675,7 @@ static int coda_upcall(struct venus_comm *vcp,
mutex_lock(&vcp->vc_mutex); mutex_lock(&vcp->vc_mutex);
if (!vcp->vc_inuse) { if (!vcp->vc_inuse) {
printk(KERN_NOTICE "coda: Venus dead, not sending upcall\n"); pr_notice("coda: Venus dead, not sending upcall\n");
error = -ENXIO; error = -ENXIO;
goto exit; goto exit;
} }
...@@ -725,7 +725,7 @@ static int coda_upcall(struct venus_comm *vcp, ...@@ -725,7 +725,7 @@ static int coda_upcall(struct venus_comm *vcp,
error = -EINTR; error = -EINTR;
if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) { if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) {
printk(KERN_WARNING "coda: Unexpected interruption.\n"); pr_warn("coda: Unexpected interruption.\n");
goto exit; goto exit;
} }
...@@ -735,7 +735,7 @@ static int coda_upcall(struct venus_comm *vcp, ...@@ -735,7 +735,7 @@ static int coda_upcall(struct venus_comm *vcp,
/* Venus saw the upcall, make sure we can send interrupt signal */ /* Venus saw the upcall, make sure we can send interrupt signal */
if (!vcp->vc_inuse) { if (!vcp->vc_inuse) {
printk(KERN_INFO "coda: Venus dead, not sending signal.\n"); pr_info("coda: Venus dead, not sending signal.\n");
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