From patchwork Wed Oct 7 12:29:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7345031 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 155D29F302 for ; Wed, 7 Oct 2015 12:30:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DBFD20616 for ; Wed, 7 Oct 2015 12:30:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A6742057F for ; Wed, 7 Oct 2015 12:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751330AbbJGMa2 (ORCPT ); Wed, 7 Oct 2015 08:30:28 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:64479 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbbJGMa1 (ORCPT ); Wed, 7 Oct 2015 08:30:27 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0LqYDd-1aERqS3zqT-00e6SQ; Wed, 07 Oct 2015 14:29:54 +0200 From: Arnd Bergmann To: Doug Ledford , Sean Hefty , Hal Rosenstock Cc: Roland Dreier , linux-rdma@vger.kernel.org, Matan Barak , Or Gerlitz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] IB/core: avoid 32-bit warning Date: Wed, 07 Oct 2015 14:29:51 +0200 Message-ID: <17269152.DqJfCm1LOx@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:X2fOWMWQKFhGnZnkU1sd8wXuLc6zzG99uYgomEoolyH5oTqq3v7 W86RhPem2cvtp/NT1bAk0mb7iEBvlBTbeH0kenXw56xwdMHBHDxKfiXjNo+peGTwyccG+FT vBG3/CUjs1zCDsBsqY4XCywraJkeVUE98SNrDoVHVElkPrlpJBtziS3DwF81O4V/Qq8vBnm pXFUEpbAOITFWpoBd5eQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:gKrZg+SpvA8=:OQdDZCT3QqzAiPPxg3oJgb 8kyYUtJ5pZ2uC45JvjK9l/tUSszKeECIeU+GTrJ9bBLYAk3YXSQzBseIA2UwKuYhWVdO0peoe kiyoealNn7hw2tlbh84954amJ7HTaWVKMpnUikvXR+JqsFgCqFIKFhCQ4AIYlwlpAOyFyy3sf Xr/tAaRyNV4O6Qx4yIa0t8teYyb+7Brl5tjBSVgz5kzbicuHrtWjieQyMuQNrTFzU0tfuVAS5 vV3f7FWttqYKnKA34iJs0k/piy9dgBWHL4XfRqBv4XEDVPUhKv3NZX2m70RyqDZf9j4E5BZAj cPMI8YifokXwDX3YyDTsew6Z/rf3dnLHWJ/oL54s36uyBR0TAyIAtBRlNi89N/PYzCoADSdoI 0eflYxzEX6HXzvzMnsyMolV8rjHbvdFd/iGoPv5X7niA+nsew9AEMirKj0kZxNluAkbayyR4D DIbn9ejAxqywYs34tAw6i8TkSoJUyDfH9RYbCRuqkEMkoDu2YCMUhq50mmGi07omeFQFPa9r0 4w/fKmRLscOFefBg2IrZGtms0sxW5XBQzmjFQm0RXXWSSWAXSPCi6krNLViGPs2r7rMqyGkv6 ty/NRbTASLg6wbGQUXH5tj14GqbUd6JNCtr5WigJFgJDknMaS7cwj2XQ/KuBcxYXiwc5UeLZ1 jKaIpKGCeIQhocvv9x1biooltTGQG0G1N0N94h94DMwTa3BREZ2bq/vMhKAmwZAUtuCxGX5VI xGdTLI91BTlqoHqa Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 INIT_UDATA() macro requires a pointer or unsigned long argument for both input and output buffer, and all callers had a cast from when the code was merged until a recent restructuring, so now we get core/uverbs_cmd.c: In function 'ib_uverbs_create_cq': core/uverbs_cmd.c:1481:66: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This makes the code behave as before by adding back the cast to unsigned long. Signed-off-by: Arnd Bergmann Fixes: 565197dd8fb1 ("IB/core: Extend ib_uverbs_create_cq") Reviewed-by: Yann Droneaud --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index be4cb9f04be3..88b3b78340f2 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1478,7 +1478,7 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof(cmd))) return -EFAULT; - INIT_UDATA(&ucore, buf, cmd.response, sizeof(cmd), sizeof(resp)); + INIT_UDATA(&ucore, buf, (unsigned long)cmd.response, sizeof(cmd), sizeof(resp)); INIT_UDATA(&uhw, buf + sizeof(cmd), (unsigned long)cmd.response + sizeof(resp),