Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eugeniy Paltsev and committed by
Vineet Gupta
1e3bece2 c83532fb

+4 -9
+4 -9
arch/arc/kernel/troubleshoot.c
··· 83 83 static void show_faulting_vma(unsigned long address, char *buf) 84 84 { 85 85 struct vm_area_struct *vma; 86 - struct inode *inode; 87 - unsigned long ino = 0; 88 - dev_t dev = 0; 89 86 char *nm = buf; 90 87 struct mm_struct *active_mm = current->active_mm; 91 88 ··· 96 99 * if the container VMA is not found 97 100 */ 98 101 if (vma && (vma->vm_start <= address)) { 99 - struct file *file = vma->vm_file; 100 - if (file) { 101 - nm = file_path(file, buf, PAGE_SIZE - 1); 102 - inode = file_inode(vma->vm_file); 103 - dev = inode->i_sb->s_dev; 104 - ino = inode->i_ino; 102 + if (vma->vm_file) { 103 + nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1); 104 + if (IS_ERR(nm)) 105 + nm = "?"; 105 106 } 106 107 pr_info(" @off 0x%lx in [%s]\n" 107 108 " VMA: 0x%08lx to 0x%08lx\n",