LoongArch: Requires __force attributes for any casts
[linux-2.6-microblaze.git] / arch / loongarch / include / asm / uaccess.h
index 2b44edc..a8ae2af 100644 (file)
@@ -229,13 +229,13 @@ extern unsigned long __copy_user(void *to, const void *from, __kernel_size_t n);
 static inline unsigned long __must_check
 raw_copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       return __copy_user(to, from, n);
+       return __copy_user(to, (__force const void *)from, n);
 }
 
 static inline unsigned long __must_check
 raw_copy_to_user(void __user *to, const void *from, unsigned long n)
 {
-       return __copy_user(to, from, n);
+       return __copy_user((__force void *)to, from, n);
 }
 
 #define INLINE_COPY_FROM_USER