Skip to content

Commit

Permalink
assorted conversions to %p[dD]
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Nov 19, 2014
1 parent 41d28bc commit a455589
Show file tree
Hide file tree
Showing 36 changed files with 194 additions and 260 deletions.
10 changes: 4 additions & 6 deletions arch/powerpc/oprofile/cell/spu_task_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,7 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,

if (mm->exe_file) {
app_cookie = fast_get_dcookie(&mm->exe_file->f_path);
pr_debug("got dcookie for %s\n",
mm->exe_file->f_dentry->d_name.name);
pr_debug("got dcookie for %pD\n", mm->exe_file);
}

for (vma = mm->mmap; vma; vma = vma->vm_next) {
Expand All @@ -342,15 +341,14 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
if (!vma->vm_file)
goto fail_no_image_cookie;

pr_debug("Found spu ELF at %X(object-id:%lx) for file %s\n",
my_offset, spu_ref,
vma->vm_file->f_dentry->d_name.name);
pr_debug("Found spu ELF at %X(object-id:%lx) for file %pD\n",
my_offset, spu_ref, vma->vm_file);
*offsetp = my_offset;
break;
}

*spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path);
pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name);
pr_debug("got dcookie for %pD\n", vma->vm_file);

up_read(&mm->mmap_sem);

Expand Down
3 changes: 1 addition & 2 deletions arch/s390/hypfs/hypfs_dbfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,

static long dbfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct hypfs_dbfs_file *df;
struct hypfs_dbfs_file *df = file_inode(file)->i_private;
long rc;

df = file->f_path.dentry->d_inode->i_private;
mutex_lock(&df->lock);
if (df->unlocked_ioctl)
rc = df->unlocked_ioctl(file, cmd, arg);
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/ia32/ia32_aout.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ static int load_aout_binary(struct linux_binprm *bprm)
time_after(jiffies, error_time + 5*HZ)) {
printk(KERN_WARNING
"fd_offset is not page aligned. Please convert "
"program: %s\n",
bprm->file->f_path.dentry->d_name.name);
"program: %pD\n",
bprm->file);
error_time = jiffies;
}
#endif
Expand Down Expand Up @@ -429,8 +429,8 @@ static int load_aout_library(struct file *file)
if (time_after(jiffies, error_time + 5*HZ)) {
printk(KERN_WARNING
"N_TXTOFF is not page aligned. Please convert "
"library: %s\n",
file->f_path.dentry->d_name.name);
"library: %pD\n",
file);
error_time = jiffies;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/armada/armada_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct armada_gem_object *armada_gem_alloc_object(struct drm_device *dev,

obj->dev_addr = DMA_ERROR_CODE;

mapping = obj->obj.filp->f_path.dentry->d_inode->i_mapping;
mapping = file_inode(obj->obj.filp)->i_mapping;
mapping_set_gfp_mask(mapping, GFP_HIGHUSER | __GFP_RECLAIMABLE);

DRM_DEBUG_DRIVER("alloc obj %p size %zu\n", obj, size);
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/pci/zoran/zoran_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ static ssize_t zoran_write(struct file *file, const char __user *buffer,
return -EFAULT;
}
string[count] = 0;
dprintk(4, KERN_INFO "%s: write_proc: name=%s count=%zu zr=%p\n",
ZR_DEVNAME(zr), file->f_path.dentry->d_name.name, count, zr);
dprintk(4, KERN_INFO "%s: write_proc: name=%pD count=%zu zr=%p\n",
ZR_DEVNAME(zr), file, count, zr);
ldelim = " \t\n";
tdelim = "=";
line = strpbrk(sp, ldelim);
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/genwqe/card_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static void genwqe_vma_open(struct vm_area_struct *vma)
static void genwqe_vma_close(struct vm_area_struct *vma)
{
unsigned long vsize = vma->vm_end - vma->vm_start;
struct inode *inode = vma->vm_file->f_dentry->d_inode;
struct inode *inode = file_inode(vma->vm_file);
struct dma_mapping *dma_map;
struct genwqe_dev *cd = container_of(inode->i_cdev, struct genwqe_dev,
cdev_genwqe);
Expand Down
16 changes: 7 additions & 9 deletions drivers/s390/char/hmcdrv_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ static int hmcdrv_dev_open(struct inode *inode, struct file *fp)
if (rc)
module_put(THIS_MODULE);

pr_debug("open file '/dev/%s' with return code %d\n",
fp->f_dentry->d_name.name, rc);
pr_debug("open file '/dev/%pD' with return code %d\n", fp, rc);
return rc;
}

Expand All @@ -146,7 +145,7 @@ static int hmcdrv_dev_open(struct inode *inode, struct file *fp)
*/
static int hmcdrv_dev_release(struct inode *inode, struct file *fp)
{
pr_debug("closing file '/dev/%s'\n", fp->f_dentry->d_name.name);
pr_debug("closing file '/dev/%pD'\n", fp);
kfree(fp->private_data);
fp->private_data = NULL;
hmcdrv_ftp_shutdown();
Expand Down Expand Up @@ -231,8 +230,8 @@ static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf,
retlen = hmcdrv_dev_transfer((char *) fp->private_data,
*pos, ubuf, len);

pr_debug("read from file '/dev/%s' at %lld returns %zd/%zu\n",
fp->f_dentry->d_name.name, (long long) *pos, retlen, len);
pr_debug("read from file '/dev/%pD' at %lld returns %zd/%zu\n",
fp, (long long) *pos, retlen, len);

if (retlen > 0)
*pos += retlen;
Expand All @@ -248,8 +247,8 @@ static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
{
ssize_t retlen;

pr_debug("writing file '/dev/%s' at pos. %lld with length %zd\n",
fp->f_dentry->d_name.name, (long long) *pos, len);
pr_debug("writing file '/dev/%pD' at pos. %lld with length %zd\n",
fp, (long long) *pos, len);

if (!fp->private_data) { /* first expect a cmd write */
fp->private_data = kmalloc(len + 1, GFP_KERNEL);
Expand All @@ -272,8 +271,7 @@ static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
if (retlen > 0)
*pos += retlen;

pr_debug("write to file '/dev/%s' returned %zd\n",
fp->f_dentry->d_name.name, retlen);
pr_debug("write to file '/dev/%pD' returned %zd\n", fp, retlen);

return retlen;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/lpfc/lpfc_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file)
goto out;

/* Round to page boundary */
printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n",
__func__, _dump_buf_dif, file->f_dentry->d_name.name);
printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%pD\n",
__func__, _dump_buf_dif, file);
debug->buffer = _dump_buf_dif;
if (!debug->buffer) {
kfree(debug);
Expand Down
4 changes: 2 additions & 2 deletions fs/9p/vfs_inode_dotl.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,8 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
struct dentry *dir_dentry;
struct posix_acl *dacl = NULL, *pacl = NULL;

p9_debug(P9_DEBUG_VFS, " %lu,%s mode: %hx MAJOR: %u MINOR: %u\n",
dir->i_ino, dentry->d_name.name, omode,
p9_debug(P9_DEBUG_VFS, " %lu,%pd mode: %hx MAJOR: %u MINOR: %u\n",
dir->i_ino, dentry, omode,
MAJOR(rdev), MINOR(rdev));

if (!new_valid_dev(rdev))
Expand Down
4 changes: 2 additions & 2 deletions fs/affs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3
u32 block = 0;
int retval;

pr_debug("%s(dir=%u, inode=%u, \"%*s\", type=%d)\n",
pr_debug("%s(dir=%u, inode=%u, \"%pd\", type=%d)\n",
__func__, (u32)dir->i_ino,
(u32)inode->i_ino, (int)dentry->d_name.len, dentry->d_name.name, type);
(u32)inode->i_ino, dentry, type);

retval = -EIO;
bh = affs_bread(sb, inode->i_ino);
Expand Down
40 changes: 17 additions & 23 deletions fs/affs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ affs_find_entry(struct inode *dir, struct dentry *dentry)
toupper_t toupper = affs_get_toupper(sb);
u32 key;

pr_debug("%s(\"%.*s\")\n",
__func__, (int)dentry->d_name.len, dentry->d_name.name);
pr_debug("%s(\"%pd\")\n", __func__, dentry);

bh = affs_bread(sb, dir->i_ino);
if (!bh)
Expand Down Expand Up @@ -219,8 +218,7 @@ affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
struct buffer_head *bh;
struct inode *inode = NULL;

pr_debug("%s(\"%.*s\")\n",
__func__, (int)dentry->d_name.len, dentry->d_name.name);
pr_debug("%s(\"%pd\")\n", __func__, dentry);

affs_lock_dir(dir);
bh = affs_find_entry(dir, dentry);
Expand Down Expand Up @@ -250,9 +248,9 @@ affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
int
affs_unlink(struct inode *dir, struct dentry *dentry)
{
pr_debug("%s(dir=%d, %lu \"%.*s\")\n",
pr_debug("%s(dir=%d, %lu \"%pd\")\n",
__func__, (u32)dir->i_ino, dentry->d_inode->i_ino,
(int)dentry->d_name.len, dentry->d_name.name);
dentry);

return affs_remove_header(dentry);
}
Expand All @@ -264,9 +262,8 @@ affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
struct inode *inode;
int error;

pr_debug("%s(%lu,\"%.*s\",0%ho)\n",
__func__, dir->i_ino, (int)dentry->d_name.len,
dentry->d_name.name,mode);
pr_debug("%s(%lu,\"%pd\",0%ho)\n",
__func__, dir->i_ino, dentry, mode);

inode = affs_new_inode(dir);
if (!inode)
Expand Down Expand Up @@ -294,9 +291,8 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
struct inode *inode;
int error;

pr_debug("%s(%lu,\"%.*s\",0%ho)\n",
__func__, dir->i_ino, (int)dentry->d_name.len,
dentry->d_name.name, mode);
pr_debug("%s(%lu,\"%pd\",0%ho)\n",
__func__, dir->i_ino, dentry, mode);

inode = affs_new_inode(dir);
if (!inode)
Expand All @@ -321,9 +317,9 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
int
affs_rmdir(struct inode *dir, struct dentry *dentry)
{
pr_debug("%s(dir=%u, %lu \"%.*s\")\n",
pr_debug("%s(dir=%u, %lu \"%pd\")\n",
__func__, (u32)dir->i_ino, dentry->d_inode->i_ino,
(int)dentry->d_name.len, dentry->d_name.name);
dentry);

return affs_remove_header(dentry);
}
Expand All @@ -338,9 +334,8 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
int i, maxlen, error;
char c, lc;

pr_debug("%s(%lu,\"%.*s\" -> \"%s\")\n",
__func__, dir->i_ino, (int)dentry->d_name.len,
dentry->d_name.name, symname);
pr_debug("%s(%lu,\"%pd\" -> \"%s\")\n",
__func__, dir->i_ino, dentry, symname);

maxlen = AFFS_SB(sb)->s_hashsize * sizeof(u32) - 1;
inode = affs_new_inode(dir);
Expand Down Expand Up @@ -409,9 +404,9 @@ affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;

pr_debug("%s(%u, %u, \"%.*s\")\n",
pr_debug("%s(%u, %u, \"%pd\")\n",
__func__, (u32)inode->i_ino, (u32)dir->i_ino,
(int)dentry->d_name.len,dentry->d_name.name);
dentry);

return affs_add_entry(dir, inode, dentry, ST_LINKFILE);
}
Expand All @@ -424,10 +419,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct buffer_head *bh = NULL;
int retval;

pr_debug("%s(old=%u,\"%*s\" to new=%u,\"%*s\")\n",
__func__, (u32)old_dir->i_ino, (int)old_dentry->d_name.len,
old_dentry->d_name.name, (u32)new_dir->i_ino,
(int)new_dentry->d_name.len, new_dentry->d_name.name);
pr_debug("%s(old=%u,\"%pd\" to new=%u,\"%pd\")\n",
__func__, (u32)old_dir->i_ino, old_dentry,
(u32)new_dir->i_ino, new_dentry);

retval = affs_check_name(new_dentry->d_name.name,
new_dentry->d_name.len,
Expand Down
Loading

0 comments on commit a455589

Please sign in to comment.