Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f86b11f

Browse files
committed
mtdchar: remove no-longer-used vma helpers
With the conversion to vm_iomap_memory(), these vma helpers are no longer used. Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0fe09a4 commit f86b11f

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

drivers/mtd/mtdchar.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,33 +1123,6 @@ static unsigned long mtdchar_get_unmapped_area(struct file *file,
11231123
}
11241124
#endif
11251125

1126-
static inline unsigned long get_vm_size(struct vm_area_struct *vma)
1127-
{
1128-
return vma->vm_end - vma->vm_start;
1129-
}
1130-
1131-
static inline resource_size_t get_vm_offset(struct vm_area_struct *vma)
1132-
{
1133-
return (resource_size_t) vma->vm_pgoff << PAGE_SHIFT;
1134-
}
1135-
1136-
/*
1137-
* Set a new vm offset.
1138-
*
1139-
* Verify that the incoming offset really works as a page offset,
1140-
* and that the offset and size fit in a resource_size_t.
1141-
*/
1142-
static inline int set_vm_offset(struct vm_area_struct *vma, resource_size_t off)
1143-
{
1144-
pgoff_t pgoff = off >> PAGE_SHIFT;
1145-
if (off != (resource_size_t) pgoff << PAGE_SHIFT)
1146-
return -EINVAL;
1147-
if (off + get_vm_size(vma) - 1 < off)
1148-
return -EINVAL;
1149-
vma->vm_pgoff = pgoff;
1150-
return 0;
1151-
}
1152-
11531126
/*
11541127
* set up a mapping for shared memory segments
11551128
*/

0 commit comments

Comments
 (0)