From patchwork Thu Oct 27 07:31:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 13021719 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2526C38A2D for ; Thu, 27 Oct 2022 07:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234754AbiJ0Hbs (ORCPT ); Thu, 27 Oct 2022 03:31:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234737AbiJ0Hbr (ORCPT ); Thu, 27 Oct 2022 03:31:47 -0400 Received: from mail1.bemta34.messagelabs.com (mail1.bemta34.messagelabs.com [195.245.231.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0F9E164BFC for ; Thu, 27 Oct 2022 00:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1666855904; i=@fujitsu.com; bh=Lc+DwelVEmusFivfLbjCEIhaIPGhK6fMwrBE5p6tAY4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Rd026vXVKKA3Fccp0/xrFBfs01EwzYmGamm96CVDB9eclFt4mG7a8Xb14O+9u2lPU t8jZyLtLG9Y3zQ7lSQ125hNte3+alpYsCpWR7ei0ZIc1joxpTuxGMgibZtr1DhZQSA 9LtFIOafVzTY6C7q/rnEHwH+spn/hlxfkRpnEZGJUvUkA9OBTlXdCkRF5tizSwjHUl b17hUst08YDNroAsuKLWCkdIN8amRDgPDFLiVVJ6j0gptJrGBenOigmkXmP0WzLdqC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SxjzR6faHlyWr84t4Xu1b/OHw 8VVuf3RWxjvfbfwpEP/F/YESS3FGoqEWc1FxIgBrgr8UXgMAAA== X-Env-Sender: yangx.jy@fujitsu.com X-Msg-Ref: server-17.tower-548.messagelabs.com!1666855903!35264!1 X-Originating-IP: [62.60.8.179] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.100.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18516 invoked from network); 27 Oct 2022 07:31:43 -0000 Received: from unknown (HELO n03ukasimr04.n03.fujitsu.local) (62.60.8.179) by server-17.tower-548.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 27 Oct 2022 07:31:43 -0000 Received: from n03ukasimr04.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTP id 47974155; Thu, 27 Oct 2022 08:31:43 +0100 (BST) Received: from R01UKEXCASM126.r01.fujitsu.local (R01UKEXCASM126 [10.183.43.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTPS id 3A80A153; Thu, 27 Oct 2022 08:31:43 +0100 (BST) Received: from 24cc950b386d.localdomain (10.167.215.54) by R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 27 Oct 2022 08:31:40 +0100 From: Xiao Yang To: CC: , , Xiao Yang Subject: [PATCH] RDMA/rxe: Remove the duplicate assignment of mr->map_shift Date: Thu, 27 Oct 2022 07:31:33 +0000 Message-ID: <1666855893-145-1-git-send-email-yangx.jy@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.215.54] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org mr->map_shift is set to ilog2(RXE_BUF_PER_MAP) in both rxe_mr_init() and rxe_mr_alloc() so remove the duplicate one in rxe_mr_init(). Signed-off-by: Xiao Yang Reviewed-by: Li Zhijian --- drivers/infiniband/sw/rxe/rxe_mr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c index d4f10c2d1aa7..279fac4c21d0 100644 --- a/drivers/infiniband/sw/rxe/rxe_mr.c +++ b/drivers/infiniband/sw/rxe/rxe_mr.c @@ -62,7 +62,6 @@ static void rxe_mr_init(int access, struct rxe_mr *mr) mr->rkey = mr->ibmr.rkey = rkey; mr->state = RXE_MR_STATE_INVALID; - mr->map_shift = ilog2(RXE_BUF_PER_MAP); } static int rxe_mr_alloc(struct rxe_mr *mr, int num_buf)