Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9487867pxu; Mon, 28 Dec 2020 18:24:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdDCN+86cdBX4LiUNB0tFKhNT9VfTRakxMBA/le1VcJlNdWTKwgeR0k/93mZkqc4gU4zKk X-Received: by 2002:a50:bb44:: with SMTP id y62mr44459149ede.103.1609208662704; Mon, 28 Dec 2020 18:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609208662; cv=none; d=google.com; s=arc-20160816; b=f6lEzahix37TrskJ4AFexcsLKVPCuABBxSn8ItknWp+OwLGEG99Roa3VWS7KfTQftY yYNGJAaPXfVLSnXjNHaMTWLoq4HpJCDbeSqtT1kas4LQAQcogNGQ4ZEgI/t+K4AVe4gZ vUEoiHB/fgQJ4gWJxZyAyhCwQz70tfdXyDryzbHzRDRVcwGWSyBA2f8PQNwcWfVVD8VO OvyVcrVoiTOoaA+Clwy6BpmDAQjVCsVreFYmPgOLCaZP3a/ogKuKCD3Lc6qclBclDBK2 NN1bfwk2eeJHx8amCtnA0bz4FRANyJ7WC/RkBug448aFqzh8sV3j+IaB8BsvSOW48/wq MzNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Wr99xOrL8xQgcS5kVrnWR7xMsvu0fTxpeMEGkf9YyW8=; b=wmEh2daAkcQIxefyf4sQyqq3TKFwopCts9Gcbi5S6nD12gaxkw7XG5KOd3d8ceo22D +y0YfanLUD6iV0baiF8D3g6avXsEKdG5s8G236rild/DgN5tQIHdBSrCXYXcmjq5LFvD +6F8gce6zUElUpy8BE4u7Z7P1z0XkrhA/QaCIe3nQptT1/J4IVLJId0Q8Md8OUdHGSDi Q/G9COu5bCz6fch6OmRfuD3/8r8LeBlGkOq2/CWUEmR5lK54zV/6ayzsUOjBbzU/xd5b JBftaL1k2Fzo7ns2et4Xi/Maz80DvpJ0VCex6z222iTh9VsGAgezguyHVE7g39vWftem wNwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GH+NN1A8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr23si18959035ejc.111.2020.12.28.18.24.00; Mon, 28 Dec 2020 18:24:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GH+NN1A8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437309AbgL1OER (ORCPT + 99 others); Mon, 28 Dec 2020 09:04:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:38432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437302AbgL1OEP (ORCPT ); Mon, 28 Dec 2020 09:04:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B7054206D4; Mon, 28 Dec 2020 14:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164214; bh=0/ZqALBnNmKoH+sFsadT8YvHXeWiPgEg7lSdxLv5SKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GH+NN1A8ARowwBhkq72Kll+1tm8DYYwYJQNrH/TUWqc+yKHzI985SVAEf2EYlCQMn utmnaF2Zft8DmFGyofB7BCuFKZVpbYh3YCyHCRVo9hRgHz6dYhx113bq0L19TPZjRn rMkawtO1HVcPSIPzr/33pRf85uM6GUi4q8Xvn5EQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 101/717] RDMa/mthca: Work around -Wenum-conversion warning Date: Mon, 28 Dec 2020 13:41:39 +0100 Message-Id: <20201228125025.814154903@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit fbb7dc5db6dee553b5a07c27e86364a5223e244c ] gcc points out a suspicious mixing of enum types in a function that converts from MTHCA_OPCODE_* values to IB_WC_* values: drivers/infiniband/hw/mthca/mthca_cq.c: In function 'mthca_poll_one': drivers/infiniband/hw/mthca/mthca_cq.c:607:21: warning: implicit conversion from 'enum ' to 'enum ib_wc_opcode' [-Wenum-conversion] 607 | entry->opcode = MTHCA_OPCODE_INVALID; Nothing seems to ever check for MTHCA_OPCODE_INVALID again, no idea if this is meaningful, but it seems harmless as it deals with an invalid input. Remove MTHCA_OPCODE_INVALID and set the ib_wc_opcode to 0xFF, which is still bogus, but at least doesn't make compiler warnings. Fixes: 2a4443a69934 ("[PATCH] IB/mthca: fill in opcode field for send completions") Link: https://lore.kernel.org/r/20201026211311.3887003-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mthca/mthca_cq.c | 2 +- drivers/infiniband/hw/mthca/mthca_dev.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 119b2573c9a08..26c3408dcacae 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -604,7 +604,7 @@ static inline int mthca_poll_one(struct mthca_dev *dev, entry->byte_len = MTHCA_ATOMIC_BYTE_LEN; break; default: - entry->opcode = MTHCA_OPCODE_INVALID; + entry->opcode = 0xFF; break; } } else { diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index 9dbbf4d16796a..a445160de3e16 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h @@ -105,7 +105,6 @@ enum { MTHCA_OPCODE_ATOMIC_CS = 0x11, MTHCA_OPCODE_ATOMIC_FA = 0x12, MTHCA_OPCODE_BIND_MW = 0x18, - MTHCA_OPCODE_INVALID = 0xff }; enum { -- 2.27.0