Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp25605pxk; Tue, 15 Sep 2020 16:45:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWbg4Rr1qm3E/BFlHbwRE7UtnnD/Dlt6Nnwoo5q5+ulKEyrBYED5W9D8eWLuHlnFVz3nnb X-Received: by 2002:a17:906:4685:: with SMTP id a5mr22721833ejr.446.1600213499953; Tue, 15 Sep 2020 16:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600213499; cv=none; d=google.com; s=arc-20160816; b=yPMnExw9d18B3XJoIF2KCQtmq2Ffptzbfr6C9ENWDcabGJgscQbkivC9y+9yGxedBu /Q9JEA73le5h7s2m+hXvpO64RJNmPhBG+6mKcjbK0nKH4wpHvfLv28cnSRgc8UQHNj5n Ogyk0fhFry8hPOt7EPrkuZndIAZ1q18Viq+pka75DA2AgBZD8Sdc4KoGTxFoRFrTPWT8 KfQoYA2Y/eh+/NTbm87t1sk3Yg7AxgmeHiScz2qG2FKwN3x/4MYnfhJQaJHj86ncUhBj r/bkJMonjMiMVOMJYS+oyYkNMagyUU0FoVZ83DRmqe+mzw7V39xqleIeX5ZPUvKw7wNq ZiZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CQ5I5w4zqfDYEo51AVJtqhqopJCOzxHIpa7S9H2VcjA=; b=lMsp2GFasbeLMWtOlkEI0v9rMHEv2IuKZ31AyyyOnqE+o+K12byHVgYuUa5qVcryeO fCyyCGlaYtuRgYbpAf9mOLfEd6nUFQpGC106DHeQZ6aIxy33ODJhY6Xu7kBfIU3SCYGM nOkGDuadTbDX2+lEhPSerFAUPEhfC+g8cSmGVPuW7rbHA3LeHju0eM38hzAFPC+D4kLm r6hb0wAMe69bHEQNjMPxxtlMGQYxbTpGNHRt7Nm1MDep8ORPLD0exNquGtBLkJemqGAQ Jrl54nqqh49ENoWVAM+ygUgh8qMk3D3eGXPjvcPbp9Z4mSyVhu2Fauipsp4nu+liiEjY lYbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=REGDi2t7; 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 d3si11240228edv.196.2020.09.15.16.44.36; Tue, 15 Sep 2020 16:44: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=REGDi2t7; 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 S1727498AbgIOXmV (ORCPT + 99 others); Tue, 15 Sep 2020 19:42:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:47668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727110AbgIOOem (ORCPT ); Tue, 15 Sep 2020 10:34:42 -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 CE0CA22210; Tue, 15 Sep 2020 14:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179369; bh=35DcAs6eXz9TZWbhrQ6/RO30nGgVMcB3GqCrts7R79o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=REGDi2t7Pq6BKaaNVnW8iPDYaYtLxw/K1Q0keybwC+W5tYnTWK2Vi1CQ5keiJynMe N6Dk575avkgRcMWLubsjH6N8dRO8JYioDJ2zs3+YtoRU6j7ZFXN591RawQJl5S5BGb fv9AufPuO8hIWJbHzR/lQlNIm9syllKQkPJcaCuw= 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.19 06/78] RDMA/rxe: Drop pointless checks in rxe_init_ports Date: Tue, 15 Sep 2020 16:12:31 +0200 Message-Id: <20200915140633.850993079@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140633.552502750@linuxfoundation.org> References: <20200915140633.552502750@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org 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 10999fa692818..94dedabe648c2 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -163,9 +163,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