Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1429104imm; Wed, 26 Sep 2018 18:19:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV63TcntTlEnX7bppkyPH9Xcetxo0gSRMfRF6y3arWl+DqwNCWQRweLQ9sQD8H6HIno28WvYz X-Received: by 2002:a63:70e:: with SMTP id 14-v6mr7846413pgh.70.1538011147744; Wed, 26 Sep 2018 18:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538011147; cv=none; d=google.com; s=arc-20160816; b=QmYal8B8Qc8oybPn2K4WOnu1D6bd2bFZoDQMQWyftIGl5Ylk2CAJzKBImtpgmoeJxS fed4s+Q7yMm1hSVE3Nkf4vNSXGFkkDhpM1jze985+Hbenft7vVUU036sEEvVS//eqLoi lWm+4LeorpIk67Nu/jma9akaqWJ/W6nBXgmWQbd0dvBtX4hyreXPAE6+od3uWhb/pItc vpVrlsR50YzZB0WxekP+JrYjz+OJr1aRY8zM6scT3haMTe9S5bOOCS5keSs4+/87zWD2 KQMoskE+8mqjLFFzjptS1nQ5Nu7icLMaL4vfbDV+Fxv2Jn430XFesDgEzitu1dZybIHF eOvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gprILtFW4iRcCQHlr8VUKU1MMDfbOAr3oA4iDgJ0DqE=; b=Fg4oVfmYtn49tUWutLoVXRDybTYfJgEPAy7PuDuh7EaPruX1TGs/yLCHEPEbTMRSac mw0y1rA54xb/jVpLn6RCrkWUKfc/I+9fTy3yhIEsE3xaTB20AkKT5yicW3f29MgoXJ+P uEfEsMdE5IHu0XxvCFsWp/g9mJPgz7StbxFVZwmU2ZNrSMuBFNQzfKCsHlVZZtECB2fO ugmthGKZV1jkyc8BIVT3qFEEt1g6TMoI9VRoOVZMyqtHYsmPrYI0wPtpQZ6Uh6iAw6eg GUuacFfPL55Nwh23fp3kxPDsCe3BjVEwRRr6hfmY3EObulhYCmcl9QpqxmGTP4GUBvOL /Q9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jJnKHun8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si507620pgs.112.2018.09.26.18.18.51; Wed, 26 Sep 2018 18:19:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jJnKHun8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726929AbeI0HeI (ORCPT + 99 others); Thu, 27 Sep 2018 03:34:08 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34459 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbeI0HeI (ORCPT ); Thu, 27 Sep 2018 03:34:08 -0400 Received: by mail-wr1-f66.google.com with SMTP id t15so772465wrx.1; Wed, 26 Sep 2018 18:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gprILtFW4iRcCQHlr8VUKU1MMDfbOAr3oA4iDgJ0DqE=; b=jJnKHun8vUVt7ygD9k7utmnh/v+tRH7v2FfEi6tmWPwdOJTL6v/d+WNFFAT2L9+v8q sCyJUDLCkz9y4l9H083czFiRYHAc6mQ94pjVnCaIzV47RMt7VLjKE3mWddM785O/26yJ S4wLoKY0yybvfIu1t14LInI7zbcHkorz5TPO4X3CnZ3CdReVtZCQ0FwxQGMKaCWinSJF GOUHHOnbwqVEKH0fTdpAdja/Sc8GDojvSXD98CNnWRBb0lfI8bMUin198h2mn8gdCojS IOH6oPEmXwYcVoqr8oYSraptUREvSt/SU1JIFSZ+0O3uBx/A4ZqXWsp7PIpx5fbPcqmh jeIQ== 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:mime-version :content-transfer-encoding; bh=gprILtFW4iRcCQHlr8VUKU1MMDfbOAr3oA4iDgJ0DqE=; b=I70Qxn/WiWJ0b0MXVxkEkXjXOZtj7bcedHcwlnTAlU99I+8DDpHZ5rn6yC25sUvpA4 HveiZRhs38tObqZokXTIyMshH5/QLd3L6PCNtjelZrJZOTfmMVshXymp78vfCamCMB28 QaQGTQo0Kg+zgEpLAJjpuyLnLrbYWVMl13qgE6IPxOXubpJlVyVlP5IqHEfr2JIZZJpP 4w7pVL7ySMG5hedYy7LUqqVwn/3WPo3PCcQLz3U2CmDJ6dwSpBrPKjNrtiau6fsrO5oO PJNm4Zrv8gLuGBG4jshz6BxVgADeFf23odIkY2JhSX4rIPxD1f5R/2MQJ42uMa0C/gH7 iJVg== X-Gm-Message-State: ABuFfoi1id321rPLgh19AiVOhCvbncJOHlFQy3Ec9xL1kccU5LmDmMAG KEQg8pHAP/+zepR4MT7fBIg= X-Received: by 2002:adf:bb41:: with SMTP id x1-v6mr6602960wrg.24.1538011105720; Wed, 26 Sep 2018 18:18:25 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id a105-v6sm1571788wrc.23.2018.09.26.18.18.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 18:18:25 -0700 (PDT) From: Nathan Chancellor To: Michal Kalderon , Ariel Elior , Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor Subject: [PATCH] RDMA/qedr: Explicitly cast pkt->tx_dest to qed_ll2_tx_dest Date: Wed, 26 Sep 2018 18:18:20 -0700 Message-Id: <20180927011820.13608-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns when one enumerated type is explicitly converted to another. drivers/infiniband/hw/qedr/qedr_roce_cm.c:198:28: warning: implicit conversion from enumeration type 'enum qed_roce_ll2_tx_dest' to different enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion] ll2_tx_pkt.tx_dest = pkt->tx_dest; ~ ~~~~~^~~~~~~ 1 warning generated. Avoid this warning by explicitly casting pkt->tx_dest to qed_112_tx_dest, which has the expected values from the type qed_roce_ll2_tx_dest. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qedr/qedr_roce_cm.c b/drivers/infiniband/hw/qedr/qedr_roce_cm.c index 85578887421b..147e0d69003d 100644 --- a/drivers/infiniband/hw/qedr/qedr_roce_cm.c +++ b/drivers/infiniband/hw/qedr/qedr_roce_cm.c @@ -195,7 +195,7 @@ static int qedr_ll2_post_tx(struct qedr_dev *dev, ll2_tx_pkt.num_of_bds = 1 /* hdr */ + pkt->n_seg; ll2_tx_pkt.vlan = 0; - ll2_tx_pkt.tx_dest = pkt->tx_dest; + ll2_tx_pkt.tx_dest = (enum qed_ll2_tx_dest)pkt->tx_dest; ll2_tx_pkt.qed_roce_flavor = roce_flavor; ll2_tx_pkt.first_frag = pkt->header.baddr; ll2_tx_pkt.first_frag_len = pkt->header.len; -- 2.19.0