From: gregkh@linuxfoundation•org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 4.9 087/144] EDAC, altera: Fix ARM64 build warning
Date: Wed, 1 Aug 2018 18:51:54 +0200 [thread overview]
Message-ID: <20180801164955.918159963@linuxfoundation.org> (raw)
In-Reply-To: <20180801164949.023217860@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thor Thayer <thor.thayer@linux•intel.com>
[ Upstream commit 9ef20753e044f7468c4113e5aecd785419b0b3cc ]
The kbuild test robot reported the following warning:
drivers/edac/altera_edac.c: In function 'ocram_free_mem':
drivers/edac/altera_edac.c:1410:42: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
gen_pool_free((struct gen_pool *)other, (u32)p, size);
^
After adding support for ARM64 architectures, the unsigned long
parameter is 64 bits and causes a build warning on 64-bit configs. Fix
by casting to the correct size (unsigned long) instead of u32.
Reported-by: kbuild test robot <lkp@intel•com>
Signed-off-by: Thor Thayer <thor.thayer@linux•intel.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-edac <linux-edac@vger•kernel.org>
Fixes: c3eea1942a16 ("EDAC, altera: Add Altera L2 cache and OCRAM support")
Link: http://lkml.kernel.org/r/1526317441-4996-1-git-send-email-thor.thayer at linux.intel.com
Signed-off-by: Borislav Petkov <bp@suse•de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft•com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
---
drivers/edac/altera_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1111,7 +1111,7 @@ static void *ocram_alloc_mem(size_t size
static void ocram_free_mem(void *p, size_t size, void *other)
{
- gen_pool_free((struct gen_pool *)other, (u32)p, size);
+ gen_pool_free((struct gen_pool *)other, (unsigned long)p, size);
}
static const struct edac_device_prv_data ocramecc_data = {
parent reply other threads:[~2018-08-01 16:51 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180801164949.023217860@linuxfoundation.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180801164955.918159963@linuxfoundation.org \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox