From patchwork Mon Dec 28 12:48:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 352771 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10044789ejs; Mon, 28 Dec 2020 08:52:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2i+qZF+ol6fO4QAaCu5D1tILssUBefS+5n5D2tk2P1JVRQ527oxB9phWsVhFwZABr6wOL X-Received: by 2002:a50:d60f:: with SMTP id x15mr42105257edi.224.1609174292412; Mon, 28 Dec 2020 08:51:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609174292; cv=none; d=google.com; s=arc-20160816; b=F5peXBpQVj5RfMbB2ac6XaCSaDWe0ngIgGQ9GBhJfDPeROpStT2zv6RTirPd2zAM1F O9ldYE1OBsz41OPjetPTwDXAeQW4VV6ceC0os16W/BiFMgxXqjsbUwy8/6BJcV+jeNm/ tJS8zRC/rAe/g+k43psMEpMhMPc4pDtm+jREWdbNAzCncRF+ZykXbrobKG7kvAMGp0nS DegyeHCzKEsUBUvKW0AcPPTvBJoyswdWHGWM+E868d5rPs4862JBH72z7SbEoq6WaBa4 T5O5aAL1R/41pR+fHXHBrU7wz6bEhe4afsQaNTMwQt6s662pxeX6Kuc4okiXsjzymQ5r L36g== 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=PkbrqpElBr3kUwEFATmjiv8ToZYtoFJ9TEl9IXzwvhg=; b=MB9MvynGlUni2dKW9fNr6j0n1i6iulxic48TTkA2LjyNA64CRDvVCrakKnP+MkmKyu 7zM8KnrfP3DtjWRRwFJDlFHtkK0RPFc8xjMEoYxrCKZq0fbRJLeZTqp8yMlXEaTbCoID aMaZ0ojWVwSYi07nwuemq+cwDd45d0ecI0QMQkyDLcjWv20+fdaODl04GnLKPLGpcOXx aF2+mwAxsbBCKJcDkh9B4AzIn5zjGTdvf4faPwfwnxJAixh56ShIpaIeRIR1O/l7+JHu LIUNaobbW0GpipeqUFaIKKP0JDwSpBz44cCbYDXsC+wNWEt00VwHxp4vAbxNjNIcYHsY ljxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HtgJ7aUv; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 f15si21166761edc.147.2020.12.28.08.51.32; Mon, 28 Dec 2020 08:51:32 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=HtgJ7aUv; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1729239AbgL1QsM (ORCPT + 14 others); Mon, 28 Dec 2020 11:48:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:50798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbgL1Mxs (ORCPT ); Mon, 28 Dec 2020 07:53:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0F70A22583; Mon, 28 Dec 2020 12:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609159987; bh=/WDc9EXs59I1NDqQzBiw9jUKVBL9Ude9WgedX6GDfsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HtgJ7aUvlercy0aXGKOwfcqoobcewr+6WY4Dpjl/lQ11/qndKlrD3aQI2EkIYDZvq HyXXCCAlSZGzqtCEmmybG3o5RTx57oeyBasGLHJd9pZ9lU1Ynu21WGWh79ro1vbOaF quqEkLA3l/Z9E8ocnXUjri1RWf3YV8p6ICR5vM4k= 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.4 044/132] RDMa/mthca: Work around -Wenum-conversion warning Date: Mon, 28 Dec 2020 13:48:48 +0100 Message-Id: <20201228124848.557725718@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124846.409999325@linuxfoundation.org> References: <20201228124846.409999325@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.27.0 diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 59e1f6ea2ede9..1b0bb340281e6 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -612,7 +612,7 @@ static inline int mthca_poll_one(struct mthca_dev *dev, entry->opcode = IB_WC_BIND_MW; 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 {