From patchwork Fri Oct 13 12:45:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 10004675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9488C60360 for ; Fri, 13 Oct 2017 13:03:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 874E823201 for ; Fri, 13 Oct 2017 13:03:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C59929002; Fri, 13 Oct 2017 13:03:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 431F423201 for ; Fri, 13 Oct 2017 13:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758006AbdJMNDF (ORCPT ); Fri, 13 Oct 2017 09:03:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54860 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757978AbdJMMrL (ORCPT ); Fri, 13 Oct 2017 08:47:11 -0400 Received: by mail-wm0-f65.google.com with SMTP id i124so21513131wmf.3 for ; Fri, 13 Oct 2017 05:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QywCYrIqrHHVLGerIJ5VXBUD9CEELh6OB5ePHiBNjsA=; b=olqkuBj50/y2qrF4X7UKugPEgZ9PIJvioWhWJF/x3Wj0sB/uzmpJW/349DbVsoeZtJ O4rH9FWvnZ4B03q2chSFf7LU1mnoqKyqsCPAYQaWFHYpNm1e6N2GAl0g9tZoLx5okQ7P pW6sFABcJgQMtJal2bhSy3KJ/PZ5YzPQA8QaA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QywCYrIqrHHVLGerIJ5VXBUD9CEELh6OB5ePHiBNjsA=; b=RcWQi/EpVeCgznE05gUgWDqKWJvW6AzVeEC4hozzxflVo5L5Fp1rJijl3/J2ikjOiZ 6hP6d5xk51QxYaYBwJFdVPGyJ25JTtT6CV3ByN/yBbf3C8NGfYfXleZsd++kXiLmcyw4 UkAyNm6p/rQgbFluDzA2TibzxEfg1QvEES2sGqvd6ARJjAKQBnbcYt682lQnIM/f2N2R 66zRX0sxvyiE2KjCT/Lvw1UAGXEip/7fRF2p92ArUReh057MTDqWGEOVMYa+4JhT7r8M MV8TP+DBeiQpicKqU5tOKvRApOxN9pilbQc3WBbr+SLyo9dWplobYt0/iBMbRHaY0Prs BDqg== X-Gm-Message-State: AMCzsaV/cKi8xDfmQQabthlPuudRTEQM6X1kNgfIHrJWYrMznLLat88B nUmeLxJ0OP9v1qTy3P12q7nGGnf0 X-Google-Smtp-Source: AOwi7QCcrmDJQWV9WGiW/1amRIuF+rfEwjSE2RWkWWtrUGfIS+fYzbZI9vTcEZNnpieLumyeHLXVlA== X-Received: by 10.80.204.150 with SMTP id q22mr2082285edi.104.1507898830396; Fri, 13 Oct 2017 05:47:10 -0700 (PDT) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id p91sm735012edp.69.2017.10.13.05.47.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 05:47:09 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Rakesh Pandit , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 04/58] lightnvm: remove already calculated nr_chnls Date: Fri, 13 Oct 2017 14:45:53 +0200 Message-Id: <20171013124647.32668-5-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171013124647.32668-1-m@bjorling.me> References: <20171013124647.32668-1-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rakesh Pandit Remove repeated calculation for number of channels while creating a target device. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index ee2b6d7..798964f 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -139,7 +139,6 @@ static struct nvm_tgt_dev *nvm_create_tgt_dev(struct nvm_dev *dev, int prev_nr_luns; int i, j; - nr_chnls = nr_luns / dev->geo.luns_per_chnl; nr_chnls = (nr_chnls_mod == 0) ? nr_chnls : nr_chnls + 1; dev_map = kmalloc(sizeof(struct nvm_dev_map), GFP_KERNEL);