hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/mtd/ubi/io.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) International Business Machines Corp., 2006
34 * Copyright (c) Nokia Corporation, 2006, 2007
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13
- * the GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
185 *
196 * Author: Artem Bityutskiy (Битюцкий Артём)
207 */
....@@ -1307,10 +1294,10 @@
13071294 void *buf1;
13081295 loff_t addr = (loff_t)pnum * ubi->peb_size + offset;
13091296
1310
- if (!ubi_dbg_chk_io(ubi))
1297
+ if (false)
13111298 return 0;
13121299
1313
- buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);
1300
+ buf1 = __vmalloc(len, GFP_NOFS);
13141301 if (!buf1) {
13151302 ubi_err(ubi, "cannot allocate memory to check writes");
13161303 return 0;
....@@ -1374,7 +1361,7 @@
13741361 if (!ubi_dbg_chk_io(ubi))
13751362 return 0;
13761363
1377
- buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);
1364
+ buf = __vmalloc(len, GFP_NOFS);
13781365 if (!buf) {
13791366 ubi_err(ubi, "cannot allocate memory to check for 0xFFs");
13801367 return 0;