From patchwork Fri Jul 20 02:50:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10535895 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 AC1C96029B for ; Fri, 20 Jul 2018 02:51:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CCE4298A6 for ; Fri, 20 Jul 2018 02:51:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90AA3299DA; Fri, 20 Jul 2018 02:51: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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A6C5298A6 for ; Fri, 20 Jul 2018 02:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731001AbeGTDhV (ORCPT ); Thu, 19 Jul 2018 23:37:21 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54564 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730514AbeGTDhV (ORCPT ); Thu, 19 Jul 2018 23:37:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77A74402B03F; Fri, 20 Jul 2018 02:51:19 +0000 (UTC) Received: from dhcp-129-124.nay.redhat.com (unknown [10.66.129.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3142111E406; Fri, 20 Jul 2018 02:51:17 +0000 (UTC) From: Honggang LI To: hal@mellanox.com Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [PATCH 2/6] Cast poniter type Date: Fri, 20 Jul 2018 10:50:34 +0800 Message-Id: <20180720025038.9365-3-honli@redhat.com> In-Reply-To: <20180720025038.9365-2-honli@redhat.com> References: <20180720025038.9365-1-honli@redhat.com> <20180720025038.9365-2-honli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 20 Jul 2018 02:51:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 20 Jul 2018 02:51:19 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'honli@redhat.com' RCPT:'' Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Honggang Li make[2]: Entering directory '/home/honli/upstream-repos/opensm/libvendor' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../include/opensm -I./../include -I./../../libibumad/include -I/usr/local/include -Werror -Wall -Wwrite-strings -g -g -O2 -MT libosmvendor_la-osm_vendor_ibumad.lo -MD -MP -MF .deps/libosmvendor_la-osm_vendor_ibumad.Tpo -c -o libosmvendor_la-osm_vendor_ibumad.lo `test -f 'osm_vendor_ibumad.c' || echo './'`osm_vendor_ibumad.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -I../include/opensm -I./../include -I./../../libibumad/include -I/usr/local/include -Werror -Wall -Wwrite-strings -g -g -O2 -MT libosmvendor_la-osm_vendor_ibumad.lo -MD -MP -MF .deps/libosmvendor_la-osm_vendor_ibumad.Tpo -c osm_vendor_ibumad.c -fPIC -DPIC -o .libs/libosmvendor_la-osm_vendor_ibumad.o osm_vendor_ibumad.c: In function ‘osm_vendor_open_port’: osm_vendor_ibumad.c:745:56: error: passing argument 2 of ‘umad_get_ca_portguids’ from incompatible pointer type [-Werror=incompatible-pointer-types] if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids, ^~~~~~~~~ In file included from ../include/vendor/osm_vendor_ibumad.h:44, from ../include/vendor/osm_vendor.h:65, from ../include/opensm/osm_madw.h:52, from osm_vendor_ibumad.c:66: /usr/include/infiniband/umad.h:178:56: note: expected ‘__be64 *’ {aka ‘long long unsigned int *’} but argument is of type ‘ib_net64_t *’ {aka ‘long unsigned int *’} int umad_get_ca_portguids(const char *ca_name, __be64 *portguids, int max); ~~~~~~~~^~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Honggang Li --- libvendor/osm_vendor_ibumad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c index 92696d3e6086..6a3665be81f6 100644 --- a/libvendor/osm_vendor_ibumad.c +++ b/libvendor/osm_vendor_ibumad.c @@ -742,7 +742,7 @@ osm_vendor_open_port(IN osm_vendor_t * const p_vend, } for (ca = 0; ca < p_vend->ca_count; ca++) { - if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids, + if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], (__be64 *)portguids, OSM_UMAD_MAX_PORTS_PER_CA + 1)) < 0) { #ifdef __WIN__ OSM_LOG(p_vend->p_log, OSM_LOG_VERBOSE,