]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.17.12/edac-altera-fix-arm64-build-warning.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.17.12 / edac-altera-fix-arm64-build-warning.patch
1 From foo@baz Sat Jul 28 10:14:30 CEST 2018
2 From: Thor Thayer <thor.thayer@linux.intel.com>
3 Date: Mon, 14 May 2018 12:04:01 -0500
4 Subject: EDAC, altera: Fix ARM64 build warning
5
6 From: Thor Thayer <thor.thayer@linux.intel.com>
7
8 [ Upstream commit 9ef20753e044f7468c4113e5aecd785419b0b3cc ]
9
10 The kbuild test robot reported the following warning:
11
12 drivers/edac/altera_edac.c: In function 'ocram_free_mem':
13 drivers/edac/altera_edac.c:1410:42: warning: cast from pointer to integer
14 of different size [-Wpointer-to-int-cast]
15 gen_pool_free((struct gen_pool *)other, (u32)p, size);
16 ^
17
18 After adding support for ARM64 architectures, the unsigned long
19 parameter is 64 bits and causes a build warning on 64-bit configs. Fix
20 by casting to the correct size (unsigned long) instead of u32.
21
22 Reported-by: kbuild test robot <lkp@intel.com>
23 Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
24 Cc: linux-arm-kernel@lists.infradead.org
25 Cc: linux-edac <linux-edac@vger.kernel.org>
26 Fixes: c3eea1942a16 ("EDAC, altera: Add Altera L2 cache and OCRAM support")
27 Link: http://lkml.kernel.org/r/1526317441-4996-1-git-send-email-thor.thayer@linux.intel.com
28 Signed-off-by: Borislav Petkov <bp@suse.de>
29 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 ---
32 drivers/edac/altera_edac.c | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35 --- a/drivers/edac/altera_edac.c
36 +++ b/drivers/edac/altera_edac.c
37 @@ -1106,7 +1106,7 @@ static void *ocram_alloc_mem(size_t size
38
39 static void ocram_free_mem(void *p, size_t size, void *other)
40 {
41 - gen_pool_free((struct gen_pool *)other, (u32)p, size);
42 + gen_pool_free((struct gen_pool *)other, (unsigned long)p, size);
43 }
44
45 static const struct edac_device_prv_data ocramecc_data = {