Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp29345pxk; Tue, 15 Sep 2020 16:51:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrKXV2G+jIpPYtYnpIT3DFE7f7YqyFEgKKmSRo93c+Tryy+KaD4ZEb1sjJnKnS/b3K6AfZ X-Received: by 2002:a17:906:5f8a:: with SMTP id a10mr22048977eju.502.1600213902700; Tue, 15 Sep 2020 16:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600213902; cv=none; d=google.com; s=arc-20160816; b=I6bS1TUyPApYVBJnEj6OPl6xEtQDw+GZiY+AWAx2nwZfabZ4A6XgrOipm6i3u4vZEY w/BKjIgiZGhWv20P+ejQaBmoTCPENy69Yd/Deh7C3CE14HsuivMdkVKQRx2DprkyD479 OQhSk4Dd5peHi5aYM6lS8eUwekCYbdIo7tVzf2XuFIz/gZcOl4jmCvde2YTj6oRwleuk nC/fGC9A7fTzrF2mYExFfZf3tXYCqJPnjxeGNNDacwTjq8PU+yyVqm2yPELXN4nNr+G9 rEwy14TGs/SEao/C5pDj5AkVdD+PjgdrYbzdBLn/ORxVneDsqWcwnT8Hk+TyT5SitNx7 eIBQ== 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=Gs41vSuFuhAg8igD0oUVim04DQM/Oi5Ef2rXlYwXQ+c=; b=bGCUYthstH2jLq/q7pv/+hR8mvibbnqs0z5BwvConVvX9lfOeUH6MwpgkRbCOcxrDd WENX/B5K+D/vz06X3Q80rqLbKok8Z75wTxKrLZa/vuo4J4v5sVFsGkD8n2BmB/sulHwL q5tlO/uQjwDjf/srXL92zuzhmP9k3SJL/QxcRRoWgWJG3UXx3xXhYNAPRdY9T7XQH1QW /FhbU/HWGi44942ee17k10oLJACIt4OWbstx38Sevqur95j1GBa8YkPcrJZBJ0vwfuKK J2UsfD4rtHNL5pEOgtObe2YDEDpFHKo1bhrAEBL8qKxhATXfgywRU/MTOcCRHL13BvN6 6XOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="z46rQ/yN"; 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 c20si10866873ejm.28.2020.09.15.16.51.20; Tue, 15 Sep 2020 16:51:42 -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="z46rQ/yN"; 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 S1727343AbgIOXuh (ORCPT + 99 others); Tue, 15 Sep 2020 19:50:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:46442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727094AbgIOOcm (ORCPT ); Tue, 15 Sep 2020 10:32: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 9902B23BCE; Tue, 15 Sep 2020 14:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179864; bh=ZXyOrtlsf+Rs6c3cbg0Pokmu11NvN72dgtSFbYDCPys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z46rQ/yNAjQOYJ029Uk1Mlwa+3Ee7Jrexe+NwfrW5BvTVFZHQQ3TD2CwiYCtrnOev 595niNTJS4zocvZck4bqGq/ToKgQplkG6x+rao6R3k4yLys2EF7/oAEO6pSnZ6XTV1 yObytndkXC3PC9gcgZLvjfSMrj3d9Funq/rzQJi0= 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 5.8 016/177] RDMA/rxe: Drop pointless checks in rxe_init_ports Date: Tue, 15 Sep 2020 16:11:27 +0200 Message-Id: <20200915140654.421716251@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140653.610388773@linuxfoundation.org> References: <20200915140653.610388773@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 5642eefb4ba1c..c7191b5e04a5a 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -147,9 +147,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