From patchwork Mon May 14 17:04:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 10398935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CBEC6054A for ; Mon, 14 May 2018 17:04:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0444F2842D for ; Mon, 14 May 2018 17:04:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01A5E28433; Mon, 14 May 2018 17:04:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 073CB285FD for ; Mon, 14 May 2018 17:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=AA4UXgu4bMj5zKsRrnufKgMz/JnncOQmO+RhPWLR/LE=; b=HNA zww9H5fOOCflhzG7qDqHN3kZSk5zYJgNfLy5xSlkx6sV339bAnTLNYOzhBo6An/98VwmhEYo8qkaj yGbhQ0r4pWUpjYAX5Ec64ozWiouhx9eIGKwrQICPGJt06gG7Xp96nUTHsmDovaqr6Cl8X3ovZcxYR 2NoxoAPVMF9Ykk45zBBzhZ/mS8JNFIUrjZWbWWUanYm0uKONgCHsOESdnJaS5HmI3yG/Vt3knOvyq MKII6z9b1WhVm6Pt1BNOqEc+iFsYDav6idQCOaN3E+iP9vHf3e7KTA630TNOhwK1h0xI2FNg0CXKG B69rkEA1IeqQM7MOpVtCqSvCFZBCrDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIGqu-0003wf-BB; Mon, 14 May 2018 17:01:36 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIGqq-0003uk-7U for linux-arm-kernel@lists.infradead.org; Mon, 14 May 2018 17:01:33 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 10:01:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,400,1520924400"; d="scan'208";a="55083403" Received: from tthayer-hp-z620-workstation.an.intel.com ([10.122.105.144]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2018 10:01:20 -0700 From: thor.thayer@linux.intel.com To: bp@alien8.de, mchehab@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH] edac: altera: Fix ARM64 warning Date: Mon, 14 May 2018 12:04:01 -0500 Message-Id: <1526317441-4996-1-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180514_100132_303533_B34D405A X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thor.thayer@linux.intel.com, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer The kbuild test robot reported the following warning on altera_edac.c: 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 64bits and causes a build warning with arm64-allyesconfig Fix by casting to the correct size (unsigned long) instead of u32. Reported-by: kbuild test robot Fixes: c3eea1942a16 ("EDAC, altera: Add Altera L2 cache and OCRAM support") Signed-off-by: Thor Thayer --- drivers/edac/altera_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 5672f6718262..c5104ea7e1fb 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -1415,7 +1415,7 @@ static void *ocram_alloc_mem(size_t size, void **other) 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 = {