From patchwork Tue Nov 1 15:21:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Zoran X-Patchwork-Id: 9407501 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 03D6C600C8 for ; Tue, 1 Nov 2016 15:23:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB1992980E for ; Tue, 1 Nov 2016 15:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDEFF298C6; Tue, 1 Nov 2016 15:23:21 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D03D42980E for ; Tue, 1 Nov 2016 15:23:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c1ash-0003FN-AD; Tue, 01 Nov 2016 15:21:43 +0000 Received: from gw.crowfest.net ([52.42.241.221]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c1asc-00030y-Mf; Tue, 01 Nov 2016 15:21:39 +0000 Received: from mail.crowfest.net (unknown [192.168.1.2]) by gw.crowfest.net (Postfix) with ESMTP id A888E602A3; Tue, 1 Nov 2016 08:21:12 -0700 (PDT) Received: from debian-quad-i7.crowfest.net (unknown [192.168.1.100]) by mail.crowfest.net (Postfix) with ESMTP id 803DD10022D; Tue, 1 Nov 2016 08:21:16 -0700 (PDT) From: Michael Zoran To: gregkh@linuxfoundation.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161101_082138_796364_B129DCE1 X-CRM114-Status: UNSURE ( 7.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefan.wahren@i2se.com, devel@driverdev.osuosl.org, daniels@collabora.com, swarren@wwwdotorg.org, lee@kernel.org, linux-kernel@vger.kernel.org, eric@anholt.net, mzoran@crowfest.net, noralf@tronnes.org, weiyongjun1@huawei.com, linux-rpi-kernel@lists.infradead.org, popcornmix@gmail.com, bhumirks@gmail.com, linux-arm-kernel@lists.infradead.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 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 Reviewed-by: Eric Anholt --- 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;