hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/hexagon/mm/uaccess.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program; if not, write to the Free Software
15
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16
- * 02110-1301, USA.
174 */
185
196 /*
....@@ -24,7 +11,7 @@
2411 */
2512 #include <linux/types.h>
2613 #include <linux/uaccess.h>
27
-#include <asm/pgtable.h>
14
+#include <linux/pgtable.h>
2815
2916 /*
3017 * For clear_user(), exploit previously defined copy_to_user function
....@@ -51,7 +38,7 @@
5138
5239 unsigned long clear_user_hexagon(void __user *dest, unsigned long count)
5340 {
54
- if (!access_ok(VERIFY_WRITE, dest, count))
41
+ if (!access_ok(dest, count))
5542 return count;
5643 else
5744 return __clear_user_hexagon(dest, count);