From patchwork Wed Aug 30 14:19:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9929755 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 BC02060309 for ; Wed, 30 Aug 2017 14:19:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD3DC28684 for ; Wed, 30 Aug 2017 14:19:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E35328687; Wed, 30 Aug 2017 14:19: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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 E2BF928681 for ; Wed, 30 Aug 2017 14:19:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbdH3OTw (ORCPT ); Wed, 30 Aug 2017 10:19:52 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:50094 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751317AbdH3OTv (ORCPT ); Wed, 30 Aug 2017 10:19:51 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Aug 2017 17:19:49 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v7UEJniX021795; Wed, 30 Aug 2017 17:19:49 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v7UEJn4f021729; Wed, 30 Aug 2017 17:19:49 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v7UEJnpK021728; Wed, 30 Aug 2017 17:19:49 +0300 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, leonro@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core 2/2] mlx5: Convert explicitly to signed char Date: Wed, 30 Aug 2017 17:19:24 +0300 Message-Id: <1504102764-21638-3-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1504102764-21638-1-git-send-email-yishaih@mellanox.com> References: <1504102764-21638-1-git-send-email-yishaih@mellanox.com> 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: Leon Romanovsky The 0x80 value is a canonical way to mark as not-used in intrinsics function calls. However the gcc compiler is not aware of this convention and compilation with -Werror=overflow option will cause to compilation failure, because _mm_set_epi8() call expects chars as an input. In order to avoid it, we will convert 0x80 to be -128. Fixes: 00c91653ef9a ("mlx5: Add WQE segments implementation") Signed-off-by: Leon Romanovsky Reviewed-by: Yishai Hadas --- providers/mlx5/mlx5dv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/mlx5/mlx5dv.h b/providers/mlx5/mlx5dv.h index 5d11625..e9efcf5 100644 --- a/providers/mlx5/mlx5dv.h +++ b/providers/mlx5/mlx5dv.h @@ -499,7 +499,7 @@ void mlx5dv_x86_set_ctrl_seg(struct mlx5_wqe_ctrl_seg *seg, uint16_t pi, (signature << 24) | (opcode << 16) | (opmod << 8) | fm_ce_se); __m128i mask = _mm_set_epi8(15, 14, 13, 12, /* immediate */ 0, /* signal/fence_mode */ - 0x80, 0x80, /* reserved */ + -128, -128, /* reserved */ 3, /* signature */ 6, /* data size */ 8, 9, 10, /* QP num */