ARC: cleanup show_faulting_vma()

- Remove unused variables
 - check return value of file_path

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
Eugeniy Paltsev 2018-08-06 19:44:23 +03:00 committed by Vineet Gupta
parent c83532fb0f
commit 1e3bece2de

View File

@ -83,9 +83,6 @@ done:
static void show_faulting_vma(unsigned long address, char *buf) static void show_faulting_vma(unsigned long address, char *buf)
{ {
struct vm_area_struct *vma; struct vm_area_struct *vma;
struct inode *inode;
unsigned long ino = 0;
dev_t dev = 0;
char *nm = buf; char *nm = buf;
struct mm_struct *active_mm = current->active_mm; struct mm_struct *active_mm = current->active_mm;
@ -99,12 +96,10 @@ static void show_faulting_vma(unsigned long address, char *buf)
* if the container VMA is not found * if the container VMA is not found
*/ */
if (vma && (vma->vm_start <= address)) { if (vma && (vma->vm_start <= address)) {
struct file *file = vma->vm_file; if (vma->vm_file) {
if (file) { nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1);
nm = file_path(file, buf, PAGE_SIZE - 1); if (IS_ERR(nm))
inode = file_inode(vma->vm_file); nm = "?";
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
} }
pr_info(" @off 0x%lx in [%s]\n" pr_info(" @off 0x%lx in [%s]\n"
" VMA: 0x%08lx to 0x%08lx\n", " VMA: 0x%08lx to 0x%08lx\n",