hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/drivers/ps3/ps3-lpm.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PS3 Logical Performance Monitor.
34 *
45 * Copyright (C) 2007 Sony Computer Entertainment Inc.
56 * Copyright 2007 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/slab.h>
....@@ -1108,8 +1096,8 @@
11081096 lpm_priv->tb_cache_internal = NULL;
11091097 lpm_priv->tb_cache = NULL;
11101098 } else if (tb_cache) {
1111
- if (tb_cache != (void *)_ALIGN_UP((unsigned long)tb_cache, 128)
1112
- || tb_cache_size != _ALIGN_UP(tb_cache_size, 128)) {
1099
+ if (tb_cache != (void *)ALIGN((unsigned long)tb_cache, 128)
1100
+ || tb_cache_size != ALIGN(tb_cache_size, 128)) {
11131101 dev_err(sbd_core(), "%s:%u: unaligned tb_cache\n",
11141102 __func__, __LINE__);
11151103 result = -EINVAL;
....@@ -1123,12 +1111,10 @@
11231111 lpm_priv->tb_cache_internal = kzalloc(
11241112 lpm_priv->tb_cache_size + 127, GFP_KERNEL);
11251113 if (!lpm_priv->tb_cache_internal) {
1126
- dev_err(sbd_core(), "%s:%u: alloc internal tb_cache "
1127
- "failed\n", __func__, __LINE__);
11281114 result = -ENOMEM;
11291115 goto fail_malloc;
11301116 }
1131
- lpm_priv->tb_cache = (void *)_ALIGN_UP(
1117
+ lpm_priv->tb_cache = (void *)ALIGN(
11321118 (unsigned long)lpm_priv->tb_cache_internal, 128);
11331119 }
11341120