From patchwork Sat Jan 12 15:02:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 10760995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BD1591E for ; Sat, 12 Jan 2019 15:05:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B3C229263 for ; Sat, 12 Jan 2019 15:05:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EDDA29473; Sat, 12 Jan 2019 15:05:53 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0317D29263 for ; Sat, 12 Jan 2019 15:05:52 +0000 (UTC) Received: from localhost ([127.0.0.1]:55579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKrA-000557-AD for patchwork-qemu-devel@patchwork.kernel.org; Sat, 12 Jan 2019 10:05:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKo2-0003n8-8W for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giKo1-0002sf-Bh for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:38 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33321) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giKo1-0002p0-5A; Sat, 12 Jan 2019 10:02:37 -0500 Received: by mail-wr1-x442.google.com with SMTP id c14so18313012wrr.0; Sat, 12 Jan 2019 07:02:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F4/hTzT7WrOHkWFiv7iSm1u2YS+rDnkYiaRHoaHz5Qw=; b=HFLYlzel63LLCUCNQ5NDUcrZ1Y993O8XJ/ct81RqQ9V/ZRMQtluqtNann8bU8aSTkp Tb7gUw3T7vGaJHKn9xTNO5pm/wXfHQQEf0MK2FY8cP6tGEhrJ5QxvG58SYBZdVzwubQS K2TpEYA1n4MmnWc377IZXVzI25Te2mNEJBjUU6zZc7fzaFcxZQymh2NqTCGoonw6Ktss QUhAtoXbvK6a2fbuxP9xKxGBcJQO9QItEFAmbSLxY6IeWVE3uok2quqn5wMoNEWA7vZ6 8TMBRUmauA/ZMBXhwV8GNkuPC0ZOEywBp90vnD8Hzl6y5eKENOR3YKmflf/Xb5VaSk9H GW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F4/hTzT7WrOHkWFiv7iSm1u2YS+rDnkYiaRHoaHz5Qw=; b=PRg/G5BkSkawQ4LYrrPTnoyjpsw+uq5BwlWDd/ngEt0eaXJncvtuRYMAjMxBGD39XD 5fuxZyXPzjtRZP7cUpjSP1Yv7p+lOiC3LNjKFELiJmzs6jBZnpf0QamtkVwWsCoP1C0a e2YKfbnpBXQ+Q/NJ9ZT0aZ139Kx7/zkODfL4nJ6mOKDcGRh0LsO6RSjnOpQ/0L3BDNmR 28RMXwJrrnRyO1RTcPF8Zi4N7sjDuRIqCC3UQyP+xLBtyD56QF37eLbPsLgcDFkYjWVT 66zEes0jK1Yn7Thv+niyRSlOOCJlKiypJxdCyId1bPNSyoabSJWbViYueAzWOarJ/sub Kj5Q== X-Gm-Message-State: AJcUukfbSpe+FkXLdlzz8nlssSLldEQz5zqbDyDJWnjTlw+GCaulzZ97 eHfERmXfHAHc5+WIVl6omFdSFhEK X-Google-Smtp-Source: ALg8bN56MypAPprurblBApgIj4S/Dk4MrfwybkKSnqCcR4TOtgTduBFpOFuZ/Xi4YD1fbrRtQpFTww== X-Received: by 2002:adf:9c8a:: with SMTP id d10mr16982133wre.244.1547305349345; Sat, 12 Jan 2019 07:02:29 -0800 (PST) Received: from localhost.localdomain ([176.228.155.165]) by smtp.gmail.com with ESMTPSA id o81sm38222581wmd.10.2019.01.12.07.02.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 07:02:28 -0800 (PST) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Sat, 12 Jan 2019 17:02:23 +0200 Message-Id: <20190112150225.20294-2-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> References: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 1/3] contrib/rdmacm-mux: remove Wno-format-truncation flag X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cohuck@redhat.com, qemu-stable@nongnu.org, yuval.shaia@oracle.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The flag is not recognized by some CLANG versions. Add proper constraints in code instead. Signed-off-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia --- contrib/rdmacm-mux/Makefile.objs | 2 +- contrib/rdmacm-mux/main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/rdmacm-mux/Makefile.objs b/contrib/rdmacm-mux/Makefile.objs index be3eacb6f7..e1ff4fe569 100644 --- a/contrib/rdmacm-mux/Makefile.objs +++ b/contrib/rdmacm-mux/Makefile.objs @@ -1,4 +1,4 @@ ifdef CONFIG_PVRDMA -CFLAGS += -libumad -Wno-format-truncation +CFLAGS += -libumad rdmacm-mux-obj-y = main.o endif diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c index 835a7f9214..64676030c5 100644 --- a/contrib/rdmacm-mux/main.c +++ b/contrib/rdmacm-mux/main.c @@ -42,6 +42,8 @@ /* The below can be override by command line parameter */ #define UNIX_SOCKET_PATH "/var/run/rdmacm-mux" +/* Has format %s-%s-%d" -- */ +#define SOCKET_PATH_MAX (PATH_MAX - NAME_MAX - sizeof(int) - 2) #define RDMA_PORT_NUM 1 typedef struct RdmaCmServerArgs { @@ -95,7 +97,7 @@ static void help(const char *progname) static void parse_args(int argc, char *argv[]) { int c; - char unix_socket_path[PATH_MAX]; + char unix_socket_path[SOCKET_PATH_MAX]; strcpy(server.args.rdma_dev_name, ""); strcpy(unix_socket_path, UNIX_SOCKET_PATH); @@ -113,7 +115,7 @@ static void parse_args(int argc, char *argv[]) case 's': /* This is temporary, final name will build below */ - strncpy(unix_socket_path, optarg, PATH_MAX); + strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX); break; case 'p': From patchwork Sat Jan 12 15:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 10760997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C6306C2 for ; Sat, 12 Jan 2019 15:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BBFB29263 for ; Sat, 12 Jan 2019 15:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2008A29473; Sat, 12 Jan 2019 15:05:54 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3E1A29263 for ; Sat, 12 Jan 2019 15:05:53 +0000 (UTC) Received: from localhost ([127.0.0.1]:55866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKrB-0005sD-37 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 12 Jan 2019 10:05:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKo2-0003n9-BN for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giKo1-0002sl-Cl for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:38 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:44168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giKo1-0002pj-5O; Sat, 12 Jan 2019 10:02:37 -0500 Received: by mail-wr1-x443.google.com with SMTP id z5so18193834wrt.11; Sat, 12 Jan 2019 07:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nZZl+vB0VqGlKcSyYzqyk0hdM8SZnBVk6joA3EBQ/bc=; b=Slgs+G/yxRwmRrnTOucB0x/bWxEQKHnyZzJnG+H+FqJC7/FvKaF4qy+hJ6wac2oDCM J04jpqXRAO4pFtZ2I9kZuJ0yG/f1wXw0fN1lodEuTyWQYn3S4Orsb+pgGP/xEB48igCX djOqnifVeHp97cz7dOqye+JqJA4/6JopRYh7Jcn4QA6YDPkWM9/LfXZuMU/evMNOXxKJ 3OZgeWpTBqz0nVtK6ffOnQqzIgv4PwaO0/uGATuN4kvKDjGQ3Xv/zLFm6iKVuf2In3P5 9/hyAMgWBda8ZEtK24VfNadnJzIpiyM/nrsDbksgdpyMjKm+3hYpOcb6H60LGmVdmGaL N0ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nZZl+vB0VqGlKcSyYzqyk0hdM8SZnBVk6joA3EBQ/bc=; b=IAtyj6OwtmUTHZxaS9VDW0s8Zif8iKzowMxnT6K7Q5apOm56BoeuMWCyi1YyeRo5Lv A/+NXt6FlbwAmgvvmWV4dcuO6Fwh7z+rwEGf9H8skSHFalBP7WO4KNsA9UtaXtdnE8vk hWbnbsJqHcdV4s61xCXh8Tm+DMxrRM+R1uRkNgX5AABkpkTiSXxdfGhNPk6hSGN4bQWg hsdjMFG+8uQGf6tUi1tHtrQHtSWb2h+Nyg6AzbZrkmFCPePa6BopAmEgwzJiUrT8Zr5U J0kDzcurNZFN3bkekNmXTaOh/dLb9U5npR9qGp3aBTcAE6YEUlRUrDwn2e+NtRjY5sfr mlNw== X-Gm-Message-State: AJcUukenu5hlctwZTA0vyaz63K0bi1ayizCcc3/8CHDAy+LGX7z7IN9U 8tqbtaDVjUAKR0x7wu3sUQkCxb9+ X-Google-Smtp-Source: ALg8bN7M1MQBXAoZzmNOTlm/JT9s0EAYrQXERg1IrCvtfw3RXbuvTJi/O5SjyQ2UwCL5A+hgrxJgXg== X-Received: by 2002:a5d:558a:: with SMTP id i10mr17050102wrv.287.1547305350712; Sat, 12 Jan 2019 07:02:30 -0800 (PST) Received: from localhost.localdomain ([176.228.155.165]) by smtp.gmail.com with ESMTPSA id o81sm38222581wmd.10.2019.01.12.07.02.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 07:02:30 -0800 (PST) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Sat, 12 Jan 2019 17:02:24 +0200 Message-Id: <20190112150225.20294-3-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> References: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH 2/3] hw/rdma: modify struct initialization X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cohuck@redhat.com, qemu-stable@nongnu.org, yuval.shaia@oracle.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Do not initialize structs with {0} since some CLANG versions do not support it. Use memset instead. Signed-off-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia --- contrib/rdmacm-mux/main.c | 12 +++++++++--- hw/rdma/rdma_backend.c | 16 ++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c index 64676030c5..d01dc76927 100644 --- a/contrib/rdmacm-mux/main.c +++ b/contrib/rdmacm-mux/main.c @@ -350,9 +350,11 @@ static int get_fd(const char *mad, int *fd, __be64 *gid_ifid) static void *umad_recv_thread_func(void *args) { int rc; - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; int fd = -2; + memset(&msg, 0, sizeof(msg)); + msg.hdr.msg_type = RDMACM_MUX_MSG_TYPE_REQ; msg.hdr.op_code = RDMACM_MUX_OP_CODE_MAD; @@ -387,11 +389,13 @@ static void *umad_recv_thread_func(void *args) static int read_and_process(int fd) { int rc; - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; struct umad_hdr *hdr; uint32_t *comm_id = 0; uint16_t attr_id; + memset(&msg, 0, sizeof(msg)); + rc = recv(fd, &msg, sizeof(msg), 0); syslog(LOG_DEBUG, "Socket %d, recv %d\n", fd, rc); @@ -744,7 +748,9 @@ static void signal_handler(int sig, siginfo_t *siginfo, void *context) static int init(void) { int rc; - struct sigaction sig = {0}; + struct sigaction sig; + + memset(&sig, 0, sizeof(sig)); rc = init_listener(); if (rc) { diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index c28bfbd44d..92e95aa640 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -190,9 +190,11 @@ static inline int rdmacm_mux_can_process_async(RdmaBackendDev *backend_dev) static int check_mux_op_status(CharBackend *mad_chr_be) { - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; int ret; + memset(&msg, 0, sizeof(msg)); + pr_dbg("Reading response\n"); ret = qemu_chr_fe_read_all(mad_chr_be, (uint8_t *)&msg, sizeof(msg)); if (ret != sizeof(msg)) { @@ -387,10 +389,12 @@ static int build_host_sge_array(RdmaDeviceResources *rdma_dev_res, static int mad_send(RdmaBackendDev *backend_dev, uint8_t sgid_idx, union ibv_gid *sgid, struct ibv_sge *sge, uint32_t num_sge) { - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; char *hdr, *data; int ret; + memset(&msg, 0, sizeof(msg)); + pr_dbg("num_sge=%d\n", num_sge); if (num_sge != 2) { @@ -1112,9 +1116,11 @@ int rdma_backend_get_gid_index(RdmaBackendDev *backend_dev, int rdma_backend_add_gid(RdmaBackendDev *backend_dev, const char *ifname, union ibv_gid *gid) { - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; int ret; + memset(&msg, 0, sizeof(msg)); + pr_dbg("0x%llx, 0x%llx\n", (long long unsigned int)be64_to_cpu(gid->global.subnet_prefix), (long long unsigned int)be64_to_cpu(gid->global.interface_id)); @@ -1138,9 +1144,11 @@ int rdma_backend_add_gid(RdmaBackendDev *backend_dev, const char *ifname, int rdma_backend_del_gid(RdmaBackendDev *backend_dev, const char *ifname, union ibv_gid *gid) { - RdmaCmMuxMsg msg = {0}; + RdmaCmMuxMsg msg; int ret; + memset(&msg, 0, sizeof(msg)); + pr_dbg("0x%llx, 0x%llx\n", (long long unsigned int)be64_to_cpu(gid->global.subnet_prefix), (long long unsigned int)be64_to_cpu(gid->global.interface_id)); From patchwork Sat Jan 12 15:02:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 10760991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D2636C2 for ; Sat, 12 Jan 2019 15:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E1CF29472 for ; Sat, 12 Jan 2019 15:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EA7129476; Sat, 12 Jan 2019 15:03:46 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9E3E529472 for ; Sat, 12 Jan 2019 15:03:45 +0000 (UTC) Received: from localhost ([127.0.0.1]:55367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKp6-0004Ql-On for patchwork-qemu-devel@patchwork.kernel.org; Sat, 12 Jan 2019 10:03:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giKo1-0003n7-UR for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giKo1-0002sV-7b for qemu-devel@nongnu.org; Sat, 12 Jan 2019 10:02:37 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:39405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giKnz-0002qM-9b; Sat, 12 Jan 2019 10:02:37 -0500 Received: by mail-wr1-x444.google.com with SMTP id t27so18222112wra.6; Sat, 12 Jan 2019 07:02:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ESlTEmI6Aw9aJ76EYNe8rR1OwpCmlzJAkPyrd6Y4qMA=; b=USTqb//IUjwVAjywPfT0xXYJEr8g4VWx1/uqBn8GFI0l2E9Q3n4pCqbOSBpzAWZAV/ BlyurYK1XyRowyWCXIPfy8eK+Y6JA6zEEmhPKuh7YeiAWibhlcZRErhYDEdMaHIXxfH4 86S9NSPPkSOlyhAMlrLF1YuSMjrEcZjmdTA4EdMgcOfOxgZOKUZowyQtMgJOIuqJFg3X kB9tBHRMVL1lGzA4j/rpAOAisypAMeUdkdWTNZiKK3kQ9ziZmV9vGuESdjIDdk7Rz10H f3MM0UejHVAtZdIXVEpiGKOCucV97Mk8mp3+pds8PAT+xzK7z11QYm2zV/KACPRgQKec 5HaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ESlTEmI6Aw9aJ76EYNe8rR1OwpCmlzJAkPyrd6Y4qMA=; b=YDkMc4uYsfMv4jWwm7rziePZN5IhXhFYKVGDQaAZBQ9kLSng7h4vYlWh+gNQZ13TFa w04qAwM2+Xu34iwb6krQQQJgKc0nm9m0zyFfYAqAFIqw+AkX0BzYxBONegVbgs3eepG7 CSMharnsKwUzNrlugL1Wq9CaIH4KJhD1OQF3ovnSF1XSXaoqTpf7Ti/3528EgjPRgIST effl30kQYxS3kcKBN7+GgpW3Vlt40kJgxZwlMOrmqcI042Z6k9OmcKp5Noisecyffsot /tuxd3YQxJ3zPTXGdyLTpb1sT7fO2WcJlfsJgBTEVTxi11GGs5iMyqpq7ulMILt/VkFM Z2qQ== X-Gm-Message-State: AJcUukfTi16r7y86lcuSIoMrNsex6V8ieUEfcAVRvNJgNnP82fKEUjHR D5vW8PA1rFFCEXVSacfJxKv5UDyp X-Google-Smtp-Source: ALg8bN6UPGQLZX7/rlpM9C6GAdTfD0hNryWAruM++8Ltq+VY0pRISY/WzayuV4qltfr+XXdDySV/MA== X-Received: by 2002:adf:e9d1:: with SMTP id l17mr16636167wrn.73.1547305352053; Sat, 12 Jan 2019 07:02:32 -0800 (PST) Received: from localhost.localdomain ([176.228.155.165]) by smtp.gmail.com with ESMTPSA id o81sm38222581wmd.10.2019.01.12.07.02.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 07:02:31 -0800 (PST) From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Sat, 12 Jan 2019 17:02:25 +0200 Message-Id: <20190112150225.20294-4-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> References: <20190112150225.20294-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 3/3] contrib/rdmacm-mux: fix clang compilation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cohuck@redhat.com, qemu-stable@nongnu.org, yuval.shaia@oracle.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix Commit a5d2f6f877 (contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer). The above commit introduces a new contrib target, adding a global dependency to libumad library in case pvrdma configuration option is enabled. Clang forbids it: clang-6.0: error: -libumad: 'linker' input unused [-Werror,-Wunused-command-line-argument] Fix by limiting the scope to the rdmacm-mux target itself. Reported-by: Cornelia Huck Signed-off-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia --- Makefile | 2 ++ contrib/rdmacm-mux/Makefile.objs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a9ac16d94e..31e87e0c2d 100644 --- a/Makefile +++ b/Makefile @@ -580,6 +580,8 @@ vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(call LINK, $^) vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(call LINK, $^) + +rdmacm-mux$(EXESUF): LIBS += "-libumad" rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) $(call LINK, $^) diff --git a/contrib/rdmacm-mux/Makefile.objs b/contrib/rdmacm-mux/Makefile.objs index e1ff4fe569..3df744af89 100644 --- a/contrib/rdmacm-mux/Makefile.objs +++ b/contrib/rdmacm-mux/Makefile.objs @@ -1,4 +1,3 @@ ifdef CONFIG_PVRDMA -CFLAGS += -libumad rdmacm-mux-obj-y = main.o endif