hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/mtd/devices/lart.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12
23 /*
34 * MTD driver for the 28F160F3 Flash Memory (non-CFI) on LART.
....@@ -5,10 +6,6 @@
56 * Author: Abraham vd Merwe <abraham@2d3d.co.za>
67 *
78 * Copyright (c) 2001, 2d3D, Inc.
8
- *
9
- * This code is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 *
1310 * References:
1411 *
....@@ -439,7 +436,10 @@
439436 {
440437 int gap = BUSWIDTH - (from & (BUSWIDTH - 1));
441438
442
- while (len && gap--) *buf++ = read8 (from++), len--;
439
+ while (len && gap--) {
440
+ *buf++ = read8 (from++);
441
+ len--;
442
+ }
443443 }
444444
445445 /* now we read dwords until we reach a non-dword boundary */
....@@ -521,7 +521,10 @@
521521 i = n = 0;
522522
523523 while (gap--) tmp[i++] = 0xFF;
524
- while (len && i < BUSWIDTH) tmp[i++] = buf[n++], len--;
524
+ while (len && i < BUSWIDTH) {
525
+ tmp[i++] = buf[n++];
526
+ len--;
527
+ }
525528 while (i < BUSWIDTH) tmp[i++] = 0xFF;
526529
527530 if (!write_dword (aligned,*((__u32 *) tmp))) return (-EIO);