Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3285607pxk; Mon, 21 Sep 2020 09:41:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkXSCaxJ4615dlbucm6kHjICf57G9oGJqu+WOWupO7qxGi93ryNcT3lRTrbEQmiSIWiReX X-Received: by 2002:a17:906:2552:: with SMTP id j18mr317741ejb.476.1600706519664; Mon, 21 Sep 2020 09:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706519; cv=none; d=google.com; s=arc-20160816; b=vu9ssss01COUwKSrqFzwL8cnUPglEDfrBTSXWwXiJKDXlSnXqhIqiUaPM4m+btjdmC I1g/kxkA9RHal/VBpdPcs1/SqcaDgct0TyE+t0KmNFPEYiMVHHlcKj4f8P/sx72nAInN efaWDWhMg6qPgDUeqgYHUHR9k2Ahwyz5E0Waxk0ktr/6Lf5PkfMjlGxz0kVMR6YjPZb2 r0Bf561GN6sEkoElZ1vyZePLSBbXEL9iYaS+XXzL4ejFMP5jkGE+aPGzJJA87Ho4qLwy RU9xSEWX4egKI502j+XWKg2f1UIgEFLSERXgIi04of3PYGOc53YUBw7q7k36tRQwSMJ6 i7vw== 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=vztIZjU9Lvu5ipyDeApQ99PSvjDO3HWdrhUpzqtA0EA=; b=lS91cnsMvQDtbAC6sETrdl/MwwFHSjsOf3CaKGtLsXTO89v+DBC5aOYUdiF/smXri5 H/a67Fcq+jv86qMaWXyw16lAbpH68enTe+elTtu8dxoR+aMmHF60/DBE5KNrhZawOvb4 N/wS0eishDkqmpBGiQPqSpAvQpagbefCIBGO9v0QjkhJUmGTWmx4Eyz4BTGSjBc/fFvn dCqGe3HUJyP7bqlJAFpN5ll0eYV6+fHHnsPEaHPLFRuW+iLsyYXaf85P1BDD49tRtI0A 3pO2dXs5E7cQGicDLFVmKqZGrOdZ8K8hz5radqhrvKUVNZ5QPJRyit3BiXlN1fx6NY6u gjKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yxoaUElT; 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=fail (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 ox9si8543736ejb.97.2020.09.21.09.41.34; Mon, 21 Sep 2020 09:41:59 -0700 (PDT) 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=@kernel.org header.s=default header.b=yxoaUElT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729078AbgIUQhd (ORCPT + 99 others); Mon, 21 Sep 2020 12:37:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:37600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbgIUQhT (ORCPT ); Mon, 21 Sep 2020 12:37:19 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74250206B7; Mon, 21 Sep 2020 16:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706239; bh=a/DBhDU9dITUGcVCZ0xcp0swSwSVyTH4WRKPaXBO/UY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yxoaUElT5dCg0M6MsW39kAoxY3QxPrPkQ4fMXYi0smP6rKuJrWVX9+gGQU6LucOQ7 eWwjCPcpOSk6pKFKdRRuH5Hg2WwAbuWKAd5i5sYXU4CnHkz5NwIF0TqrSz/MygkrLf Dkmb3A9BA/uEh5wqF9wYQcxDBXVUCh1BTTsrJj2A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kamal Heib , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.14 03/94] RDMA/rxe: Drop pointless checks in rxe_init_ports Date: Mon, 21 Sep 2020 18:26:50 +0200 Message-Id: <20200921162035.704780710@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@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: Kamal Heib [ Upstream commit 6112ef62826e91afbae5446d5d47b38e25f47e3f ] Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so no need to check if they aren't set. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/sw/rxe/rxe.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index 8c3d30b3092d4..25267a620e0b5 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -170,9 +170,6 @@ static int rxe_init_ports(struct rxe_dev *rxe) rxe_init_port_param(port); - if (!port->attr.pkey_tbl_len || !port->attr.gid_tbl_len) - return -EINVAL; - port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len, sizeof(*port->pkey_tbl), GFP_KERNEL); -- 2.25.1