forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/powerpc/platforms/ps3/os-area.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PS3 flash memory os area.
34 *
45 * Copyright (C) 2006 Sony Computer Entertainment Inc.
56 * Copyright 2006 Sony Corp.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; version 2 of the License.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
197 */
208
219 #include <linux/kernel.h>
....@@ -205,11 +193,11 @@
205193 * 3) The number of seconds from 1970 to 2000.
206194 */
207195
208
-struct saved_params {
196
+static struct saved_params {
209197 unsigned int valid;
210198 s64 rtc_diff;
211199 unsigned int av_multi_out;
212
-} static saved_params;
200
+} saved_params;
213201
214202 static struct property property_rtc_diff = {
215203 .name = "linux,rtc_diff",
....@@ -625,10 +613,8 @@
625613 /* Read in header and db from flash. */
626614
627615 header = kmalloc(buf_len, GFP_KERNEL);
628
- if (!header) {
629
- pr_debug("%s: kmalloc failed\n", __func__);
616
+ if (!header)
630617 return -ENOMEM;
631
- }
632618
633619 count = os_area_flash_read(header, buf_len, 0);
634620 if (count < 0) {