Skip to content

Commit

Permalink
mm: rmap: Fix invalid casting from a void to an enumerator.
Browse files Browse the repository at this point in the history
fixes:

../mm/rmap.c:1344:25: warning: cast to smaller integer type 'enum ttu_flags' from 'void *' [-Wvoid-pointer-to-enum-cast]
        enum ttu_flags flags = (enum ttu_flags)arg;
                               ^~~~~~~~~~~~~~~~~~~

Signed-off-by: techyminati <[email protected]>
Signed-off-by: Jyotiraditya Panda <[email protected]>
Signed-off-by: Sarthak Roy <[email protected]>
Signed-off-by: Cyber Knight <[email protected]>
Signed-off-by: ManshuTyagi <[email protected]>
Signed-off-by: Nishant Kumar <[email protected]>
Signed-off-by: nishant6342 <[email protected]>
  • Loading branch information
imjyotiraditya authored and techyminati committed Jul 12, 2023
1 parent d95ef12 commit 8e7bbdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
struct page *subpage;
bool ret = true;
unsigned long start = address, end;
enum ttu_flags flags = (enum ttu_flags)arg;
enum ttu_flags flags = (enum ttu_flags)(long)arg;

/* munlock has nothing to gain from examining un-locked vmas */
if ((flags & TTU_MUNLOCK) && !(vma->vm_flags & VM_LOCKED))
Expand Down

0 comments on commit 8e7bbdb

Please sign in to comment.