Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9183323pxu; Mon, 28 Dec 2020 08:39:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhH5MSp0W4fwKhL30gdTeahqMXW0468m2vqpD4pjEsTZ82t8aXU9wmr7RS5D+RT/S070+F X-Received: by 2002:a17:906:386:: with SMTP id b6mr27939909eja.554.1609173584258; Mon, 28 Dec 2020 08:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173584; cv=none; d=google.com; s=arc-20160816; b=WHWX9YOPGn1WUV5E1OgczXEbyg1wFtvZYMl+00oxzWdTJiYIAi7vG0NG2Jee686yF3 CDlmMkcEN8T2Z9/qiPbo5mq0jDrEFJUj5gedMegU9y6W0dHjJnc9KMLs/BXMUQIuLPav nrGw8LRLsxLnudVoSIQk5hi3NxxajOk0indA8vARAsk5YFMS7w3xa0MHgDXKk0ong3s+ Pvuj7m4lffvP3UxxbPkx/YUPxUFrig3tzREVJkwNRMY6AMFQ0q4eDqMlGcW2y32Ng5cT W4zEN/UBXF61m6E2AhXs6ZcRCMeu16cw2u0gwnzAhHImQXvhtrrR72r2gSlcduKqVE1L rPrA== 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=DduJ28z3qNMMIiOJDcB2d0VAjg9vNkO3GWdiSOEPGZ0=; b=xYpHbYfiqtpIo6LYZ0dZWw8XwQ9SafY335KgCa99EU8qdzC5biSyH8AXXNUJ+pAQc7 GE5uog7x7FimdDRIr02zAtP+K85hVxzgJr3rSsj9oy3WzJYa5he2EoDIk1nF5TNcjZwm Vu0as5SGreMxlRtGzJ/nFh5S11SUYbreO2oieg2/wCBuQ0K1KuyRsWSheglFisUhkLB7 i9NjbGWCl+MldKqAp0xfVqw1O68g4GiHsb95IHi0EQJTliOdsPrs1W585C64uLjZ0kmv UzkXMpOVNyX+fzVYDvxRzGp9jNEwEWXYWs6N2H876xpT83pwlcM1ia/8IiHdOEQe+Fi2 yPCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TqY6FeBv; 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 38si20778044edq.246.2020.12.28.08.39.20; Mon, 28 Dec 2020 08:39:44 -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=TqY6FeBv; 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 S2633416AbgL1QhY (ORCPT + 99 others); Mon, 28 Dec 2020 11:37:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:58170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729894AbgL1NBy (ORCPT ); Mon, 28 Dec 2020 08:01:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3104622583; Mon, 28 Dec 2020 13:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160473; bh=DKHJC+/0ys4+rCNYreoh+CGEH3RyDYelhl8jk1U5Txs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TqY6FeBvHg2VepHkmCslFopPIehwsBotwkycA+b1eYHEVEHLsPtxF/sj67D0oytOm R1gS0afH8RgSMB1Hp1oBoP6Krybe96dGwvuuOrJB/FEsDvjMUdYCdkOayjnImNSHzd 78/EWSJt9opXDaUyYYrv/43q6C7GYe+KnLobq3jM= 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 4.9 064/175] RDMa/mthca: Work around -Wenum-conversion warning Date: Mon, 28 Dec 2020 13:48:37 +0100 Message-Id: <20201228124856.346209920@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 a5694dec3f2ee..098653b8157ed 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -609,7 +609,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 4393a022867ba..e1fc67e73bf87 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