Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9044785pxu; Mon, 28 Dec 2020 05:17:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLEHXElFp2X1LxqTLKeW/F6nPpFhcbO6pJd/aeAXQSRei/EdzvYlSHoGjMIntHb5HOBn58 X-Received: by 2002:a17:906:8058:: with SMTP id x24mr39932412ejw.262.1609161425433; Mon, 28 Dec 2020 05:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161425; cv=none; d=google.com; s=arc-20160816; b=P+QEdJtBLi5rj4zZnhkWRDlsDi/clRkjouqiPhKvZJpZ7RtyhDkS2KAuiwesV2/fY2 v3Yyijxwki6EdUVzG/TnvKSoDnck/qG/dG9AjcXdON3+CvdYPGF9x459l0uVdEALB6Xz P1whBErCFrqiNVoIZfZh7Qt7HrLv9B0/fvfm5+E3t8Cx/tAgABBRbyN/Kzh4fst+8e0F tQQqrSMRA1Cke1BWcWvUCWBMb/yEw1RSioJ6qDlAIFAfVyw8p9DHgCKHl3gyuYprbjLI SBA3np4sSFbUC1JBU6f0xFMYM/o3n2dFDHOWCHXzh7m/GvFI54ibCA/0mRhIhSxVrnLW ++3Q== 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=8we534FWsUN5eWH5Dakprv99cg63MCRSYuW+SO9fMdo=; b=zv8rNP3bFw73cKayXgE19upTURo81ZYCJUPYx4KSn7qdtQfCzTdV2A0CXucIamYbj9 UOgLP0+b6uOGPAD1NRey7+FI3s6HczZ7UsEwn1gJxZ3wTOSm4vKrJftEX6512n2htQKs PsrkB71MPTqvt0Vyc8EpRILA+Z9R8Kq+7a8VCxCQwI/zMW7jHYm8A8SzeG0AaLEuiiQX vRFpdjOGZdr8zDQI/L9xvhX4jzhjYJRbMwKGn0LVz7wPchgnyRZPEfDiRdDwS3HLfybA 6q1ZBcUuqtmXmvts7k86adHFCCBlWDya9L904b2NVGWeBfnHEl6WjsIvWPLg4wdSzTiU L8CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Ksb/cA71"; 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 j24si18386133ejs.60.2020.12.28.05.16.43; Mon, 28 Dec 2020 05:17:05 -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="Ksb/cA71"; 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 S1731978AbgL1NMM (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:39688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731852AbgL1NLs (ORCPT ); Mon, 28 Dec 2020 08:11:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C389322AAD; Mon, 28 Dec 2020 13:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161067; bh=hyiAsy6c7eBpZHIvv+FZ5sk0u/tMYGT42n1KA2RuZMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ksb/cA71mMOBcXqcyJPI+WtvWCq4KaxcPtw+9qt22shzVkKJZj8mGpQmPmtM7LVSz 2FjhLImWp/5k/w2matbnI9VXnwrrjO1fLA/YjK67xiFB4kfjn+N987i8Vww9AaEvqm +j6iGbkdl9slUmoeyiiX5lJLJvqS7LoJNcPDtv/I= 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.14 090/242] RDMa/mthca: Work around -Wenum-conversion warning Date: Mon, 28 Dec 2020 13:48:15 +0100 Message-Id: <20201228124909.128272773@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 5508afbf1c677..b487e1339c7fb 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