| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * BCM947xx nvram variable access |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2005 Broadcom Corporation |
|---|
| 5 | 6 | * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> |
|---|
| 6 | 7 | * Copyright (C) 2010-2012 Hauke Mehrtens <hauke@hauke-m.de> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 100 | 96 | nvram_len = size; |
|---|
| 101 | 97 | } |
|---|
| 102 | 98 | if (nvram_len >= NVRAM_SPACE) { |
|---|
| 103 | | - pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", |
|---|
| 99 | + pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", |
|---|
| 104 | 100 | nvram_len, NVRAM_SPACE - 1); |
|---|
| 105 | 101 | nvram_len = NVRAM_SPACE - 1; |
|---|
| 106 | 102 | } |
|---|
| .. | .. |
|---|
| 124 | 120 | void __iomem *iobase; |
|---|
| 125 | 121 | int err; |
|---|
| 126 | 122 | |
|---|
| 127 | | - iobase = ioremap_nocache(base, lim); |
|---|
| 123 | + iobase = ioremap(base, lim); |
|---|
| 128 | 124 | if (!iobase) |
|---|
| 129 | 125 | return -ENOMEM; |
|---|
| 130 | 126 | |
|---|
| .. | .. |
|---|
| 152 | 148 | header.len > sizeof(header)) { |
|---|
| 153 | 149 | nvram_len = header.len; |
|---|
| 154 | 150 | if (nvram_len >= NVRAM_SPACE) { |
|---|
| 155 | | - pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", |
|---|
| 156 | | - header.len, NVRAM_SPACE); |
|---|
| 151 | + pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", |
|---|
| 152 | + nvram_len, NVRAM_SPACE); |
|---|
| 157 | 153 | nvram_len = NVRAM_SPACE - 1; |
|---|
| 158 | 154 | } |
|---|
| 159 | 155 | |
|---|