Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753899AbcKAPVU (ORCPT ); Tue, 1 Nov 2016 11:21:20 -0400 Received: from gw.crowfest.net ([52.42.241.221]:39806 "EHLO gw.crowfest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbcKAPVR (ORCPT ); Tue, 1 Nov 2016 11:21:17 -0400 From: Michael Zoran To: gregkh@linuxfoundation.org Cc: eric@anholt.net, swarren@wwwdotorg.org, lee@kernel.org, mzoran@crowfest.net, daniels@collabora.com, noralf@tronnes.org, weiyongjun1@huawei.com, popcornmix@gmail.com, bhumirks@gmail.com, stefan.wahren@i2se.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: vc04_services: parse_rx_slots() - Fix compiler warning Date: Tue, 1 Nov 2016 08:21:14 -0700 Message-Id: <20161101152114.19394-1-mzoran@crowfest.net> X-Mailer: git-send-email 2.10.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 37 vc04_services contains a debug logging mechanism. The log is maintained in a shared memory area between the kernel and the firmware. Changing the sizes of the data in this area would require a firmware change which is distributed independently from the kernel binary. One of the items logged is the address of received messages. This address is a pointer, but the debugging slot used to store the information is a 32 bit integer. Luckily, this value is never interpreted by anything other then debug tools and it is expected that a human debugging the kernel interpret it. This change adds a cast to long before the original cast to int to silence the warning. Signed-off-by: Michael Zoran --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index f3e1000..c187719 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1619,7 +1619,7 @@ parse_rx_slots(VCHIQ_STATE_T *state) header = (VCHIQ_HEADER_T *)(state->rx_data + (state->rx_pos & VCHIQ_SLOT_MASK)); - DEBUG_VALUE(PARSE_HEADER, (int)header); + DEBUG_VALUE(PARSE_HEADER, (int)(long)header); msgid = header->msgid; DEBUG_VALUE(PARSE_MSGID, msgid); size = header->size; -- 2.10.2