Commit 6daaca52 authored by Dan Williams's avatar Dan Williams

device-dax: remove redundant __func__ in dev_dbg

Dynamic debug can be instructed to add the function name to the debug
output using the +f switch, so there is no need for the dax modules to
do it again. If a user decides to add the +f switch for the dax modules'
dynamic debug this results in double prints of the function name.
Reported-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reported-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 426824d6
...@@ -257,8 +257,8 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -257,8 +257,8 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
dax_region = dev_dax->region; dax_region = dev_dax->region;
if (dax_region->align > PAGE_SIZE) { if (dax_region->align > PAGE_SIZE) {
dev_dbg(dev, "%s: alignment (%#x) > fault size (%#x)\n", dev_dbg(dev, "alignment (%#x) > fault size (%#x)\n",
__func__, dax_region->align, fault_size); dax_region->align, fault_size);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -267,8 +267,7 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -267,8 +267,7 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
phys = dax_pgoff_to_phys(dev_dax, vmf->pgoff, PAGE_SIZE); phys = dax_pgoff_to_phys(dev_dax, vmf->pgoff, PAGE_SIZE);
if (phys == -1) { if (phys == -1) {
dev_dbg(dev, "%s: pgoff_to_phys(%#lx) failed\n", __func__, dev_dbg(dev, "pgoff_to_phys(%#lx) failed\n", vmf->pgoff);
vmf->pgoff);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -299,14 +298,14 @@ static int __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -299,14 +298,14 @@ static int __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
dax_region = dev_dax->region; dax_region = dev_dax->region;
if (dax_region->align > PMD_SIZE) { if (dax_region->align > PMD_SIZE) {
dev_dbg(dev, "%s: alignment (%#x) > fault size (%#x)\n", dev_dbg(dev, "alignment (%#x) > fault size (%#x)\n",
__func__, dax_region->align, fault_size); dax_region->align, fault_size);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
/* dax pmd mappings require pfn_t_devmap() */ /* dax pmd mappings require pfn_t_devmap() */
if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) != (PFN_DEV|PFN_MAP)) { if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) != (PFN_DEV|PFN_MAP)) {
dev_dbg(dev, "%s: region lacks devmap flags\n", __func__); dev_dbg(dev, "region lacks devmap flags\n");
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -323,8 +322,7 @@ static int __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -323,8 +322,7 @@ static int __dev_dax_pmd_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
pgoff = linear_page_index(vmf->vma, pmd_addr); pgoff = linear_page_index(vmf->vma, pmd_addr);
phys = dax_pgoff_to_phys(dev_dax, pgoff, PMD_SIZE); phys = dax_pgoff_to_phys(dev_dax, pgoff, PMD_SIZE);
if (phys == -1) { if (phys == -1) {
dev_dbg(dev, "%s: pgoff_to_phys(%#lx) failed\n", __func__, dev_dbg(dev, "pgoff_to_phys(%#lx) failed\n", pgoff);
pgoff);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -351,14 +349,14 @@ static int __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -351,14 +349,14 @@ static int __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
dax_region = dev_dax->region; dax_region = dev_dax->region;
if (dax_region->align > PUD_SIZE) { if (dax_region->align > PUD_SIZE) {
dev_dbg(dev, "%s: alignment (%#x) > fault size (%#x)\n", dev_dbg(dev, "alignment (%#x) > fault size (%#x)\n",
__func__, dax_region->align, fault_size); dax_region->align, fault_size);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
/* dax pud mappings require pfn_t_devmap() */ /* dax pud mappings require pfn_t_devmap() */
if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) != (PFN_DEV|PFN_MAP)) { if ((dax_region->pfn_flags & (PFN_DEV|PFN_MAP)) != (PFN_DEV|PFN_MAP)) {
dev_dbg(dev, "%s: region lacks devmap flags\n", __func__); dev_dbg(dev, "region lacks devmap flags\n");
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -375,8 +373,7 @@ static int __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf) ...@@ -375,8 +373,7 @@ static int __dev_dax_pud_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
pgoff = linear_page_index(vmf->vma, pud_addr); pgoff = linear_page_index(vmf->vma, pud_addr);
phys = dax_pgoff_to_phys(dev_dax, pgoff, PUD_SIZE); phys = dax_pgoff_to_phys(dev_dax, pgoff, PUD_SIZE);
if (phys == -1) { if (phys == -1) {
dev_dbg(dev, "%s: pgoff_to_phys(%#lx) failed\n", __func__, dev_dbg(dev, "pgoff_to_phys(%#lx) failed\n", pgoff);
pgoff);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
...@@ -399,9 +396,8 @@ static int dev_dax_huge_fault(struct vm_fault *vmf, ...@@ -399,9 +396,8 @@ static int dev_dax_huge_fault(struct vm_fault *vmf,
struct file *filp = vmf->vma->vm_file; struct file *filp = vmf->vma->vm_file;
struct dev_dax *dev_dax = filp->private_data; struct dev_dax *dev_dax = filp->private_data;
dev_dbg(&dev_dax->dev, "%s: %s: %s (%#lx - %#lx) size = %d\n", __func__, dev_dbg(&dev_dax->dev, "%s: %s (%#lx - %#lx) size = %d\n", current->comm,
current->comm, (vmf->flags & FAULT_FLAG_WRITE) (vmf->flags & FAULT_FLAG_WRITE) ? "write" : "read",
? "write" : "read",
vmf->vma->vm_start, vmf->vma->vm_end, pe_size); vmf->vma->vm_start, vmf->vma->vm_end, pe_size);
id = dax_read_lock(); id = dax_read_lock();
...@@ -450,7 +446,7 @@ static int dax_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -450,7 +446,7 @@ static int dax_mmap(struct file *filp, struct vm_area_struct *vma)
struct dev_dax *dev_dax = filp->private_data; struct dev_dax *dev_dax = filp->private_data;
int rc, id; int rc, id;
dev_dbg(&dev_dax->dev, "%s\n", __func__); dev_dbg(&dev_dax->dev, "trace\n");
/* /*
* We lock to check dax_dev liveness and will re-check at * We lock to check dax_dev liveness and will re-check at
...@@ -508,7 +504,7 @@ static int dax_open(struct inode *inode, struct file *filp) ...@@ -508,7 +504,7 @@ static int dax_open(struct inode *inode, struct file *filp)
struct inode *__dax_inode = dax_inode(dax_dev); struct inode *__dax_inode = dax_inode(dax_dev);
struct dev_dax *dev_dax = dax_get_private(dax_dev); struct dev_dax *dev_dax = dax_get_private(dax_dev);
dev_dbg(&dev_dax->dev, "%s\n", __func__); dev_dbg(&dev_dax->dev, "trace\n");
inode->i_mapping = __dax_inode->i_mapping; inode->i_mapping = __dax_inode->i_mapping;
inode->i_mapping->host = __dax_inode; inode->i_mapping->host = __dax_inode;
filp->f_mapping = inode->i_mapping; filp->f_mapping = inode->i_mapping;
...@@ -523,7 +519,7 @@ static int dax_release(struct inode *inode, struct file *filp) ...@@ -523,7 +519,7 @@ static int dax_release(struct inode *inode, struct file *filp)
{ {
struct dev_dax *dev_dax = filp->private_data; struct dev_dax *dev_dax = filp->private_data;
dev_dbg(&dev_dax->dev, "%s\n", __func__); dev_dbg(&dev_dax->dev, "trace\n");
return 0; return 0;
} }
...@@ -565,7 +561,7 @@ static void unregister_dev_dax(void *dev) ...@@ -565,7 +561,7 @@ static void unregister_dev_dax(void *dev)
struct inode *inode = dax_inode(dax_dev); struct inode *inode = dax_inode(dax_dev);
struct cdev *cdev = inode->i_cdev; struct cdev *cdev = inode->i_cdev;
dev_dbg(dev, "%s\n", __func__); dev_dbg(dev, "trace\n");
kill_dev_dax(dev_dax); kill_dev_dax(dev_dax);
cdev_device_del(cdev, dev); cdev_device_del(cdev, dev);
......
...@@ -34,7 +34,7 @@ static void dax_pmem_percpu_release(struct percpu_ref *ref) ...@@ -34,7 +34,7 @@ static void dax_pmem_percpu_release(struct percpu_ref *ref)
{ {
struct dax_pmem *dax_pmem = to_dax_pmem(ref); struct dax_pmem *dax_pmem = to_dax_pmem(ref);
dev_dbg(dax_pmem->dev, "%s\n", __func__); dev_dbg(dax_pmem->dev, "trace\n");
complete(&dax_pmem->cmp); complete(&dax_pmem->cmp);
} }
...@@ -43,7 +43,7 @@ static void dax_pmem_percpu_exit(void *data) ...@@ -43,7 +43,7 @@ static void dax_pmem_percpu_exit(void *data)
struct percpu_ref *ref = data; struct percpu_ref *ref = data;
struct dax_pmem *dax_pmem = to_dax_pmem(ref); struct dax_pmem *dax_pmem = to_dax_pmem(ref);
dev_dbg(dax_pmem->dev, "%s\n", __func__); dev_dbg(dax_pmem->dev, "trace\n");
wait_for_completion(&dax_pmem->cmp); wait_for_completion(&dax_pmem->cmp);
percpu_ref_exit(ref); percpu_ref_exit(ref);
} }
...@@ -53,7 +53,7 @@ static void dax_pmem_percpu_kill(void *data) ...@@ -53,7 +53,7 @@ static void dax_pmem_percpu_kill(void *data)
struct percpu_ref *ref = data; struct percpu_ref *ref = data;
struct dax_pmem *dax_pmem = to_dax_pmem(ref); struct dax_pmem *dax_pmem = to_dax_pmem(ref);
dev_dbg(dax_pmem->dev, "%s\n", __func__); dev_dbg(dax_pmem->dev, "trace\n");
percpu_ref_kill(ref); percpu_ref_kill(ref);
} }
......
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