From patchwork Fri Nov 13 17:15:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7613111 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D2105BF90C for ; Fri, 13 Nov 2015 17:16:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 100EA2065D for ; Fri, 13 Nov 2015 17:16:27 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 0424020658 for ; Fri, 13 Nov 2015 17:16:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZxHxY-0008GC-Ds; Fri, 13 Nov 2015 17:16:24 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZxHxV-00087I-C4; Fri, 13 Nov 2015 17:16:22 +0000 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0Lk9Fq-1aYGKV1fGE-00c6tG; Fri, 13 Nov 2015 18:15:57 +0100 From: Arnd Bergmann To: Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH] ASoC: fix rockchip 64-bit build warning Date: Fri, 13 Nov 2015 18:15:56 +0100 Message-ID: <5376543.c9BV6sJg6q@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:Ge6A7xtuIWl3XpHG/3Y6NfvS2Y7+hXJwtxZvnm99k6qHU7ErpP5 LzTiQMVQI1o3cuKrNFkGTYIS/YUU57XVPAb3myuPNphhLK1feSnlotjvgsQEF/qANC5yVdq 3ksoDwCf1q+w0+fyqaUix0tIgnG9pCcNLnjNoANu9YefRD51PwQPhdON70+VduIKSXgV8GT 3dMF695NCzFetORvLjmnA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ub+1WyRlQBk=:mkp2VydJ22zAZBB+XmqgEl Bb1bap7diyuYloH5OeruuszCTlQorDM0upb+DeinKrY0U+4HtOWCO+0s2+S9p426H7S3norl+ 2xefVHanJr5lJQggOBjUjV7Zx6vr6mvQBRzxA9FyoaAc1loB9Ioe4Sj9S1H56VfoSVSJUz7cj NkNYS746/+l5e4cx3lIKC74/SFQfL3+zrJXb52telNf4yWIXKRjaoZIIvMipDxJKQjwuGd/hw tm7z91GPDnIHCA78RwH5Dc4YIMpYFfYXBMmU/vu6cAjGkck6Pe2Oki3N/WUIoQKLZsP5gjLpd z2eCdrFgQLuTCC0pBZoj2T/yJibGtBY3Gcdm5akIK3Phjqhi4WlSlJW29jn6C6ToBrM4MfuBo wrE5oeKwfnXyulbOxSqgeybqUT6qf2A3zRReQkY8IJv2mrTQPvUSeht5EPj0VVWP4owuQuYMC NOjJLb/pGSYMjg/1rU1K0Ey/1Tb7q2zwZFAwZzTFlu82/xYzQX0CZjLjnI0jF2UxdC6wK1q7m +om2mRdNIGsEEZiwdK3s+kwZGiP3tdYMhLkt78nxKPYpyp3ZtTCXVAgBAouA3CX8gTef56qGc rAN125SU+8pfnoSFp7u87CtHHYi72YX6dCQxCjfPw9EOjsYCSr0KUEf8BX/747kv89/7CBoRc ZoJOBD5pWKh4xjvdvd9rTGFWfyzmB/1KU8we4uIMkmZYaE9mkHXtwnpDF03PIMnzV/shXuf+5 FKs62xwpXodsi3fv X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151113_091621_872290_8796ECBD X-CRM114-Status: GOOD ( 11.66 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, Liam Girdwood , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rk_spdif_probe uses the device match data as a token to identify a particular device, but accidentally casts a pointer to 'int', which is not portable, as gcc points out in this warning on arm64: rockchip_spdif.c: In function 'rk_spdif_probe': rockchip_spdif.c:283:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] This changes the logic to compare two pointer values instead, using the same cast that was used for initializing the value in the first place. Signed-off-by: Arnd Bergmann diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index a38a3029062c..ac72ff5055bb 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -280,7 +280,7 @@ static int rk_spdif_probe(struct platform_device *pdev) int ret; match = of_match_node(rk_spdif_match, np); - if ((int) match->data == RK_SPDIF_RK3288) { + if (match->data == (void *)RK_SPDIF_RK3288) { struct regmap *grf; grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");