From patchwork Fri Jul 13 08:48:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10522823 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 1786060626 for ; Fri, 13 Jul 2018 08:49:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0953A29959 for ; Fri, 13 Jul 2018 08:49:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1BB429964; Fri, 13 Jul 2018 08:49:30 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 9718D29963 for ; Fri, 13 Jul 2018 08:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729769AbeGMJDG (ORCPT ); Fri, 13 Jul 2018 05:03:06 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:39649 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729680AbeGMJDF (ORCPT ); Fri, 13 Jul 2018 05:03:05 -0400 Received: by mail-pf0-f196.google.com with SMTP id s21-v6so22295872pfm.6 for ; Fri, 13 Jul 2018 01:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jU3SvxQclyebK3RGIKbFsj3VaH+vViC37wh1DjUWUJU=; b=c5B5+mCmL2F/ypkpzfikDZU83FjbXy6zMiclqdkXfrR2HOVkYz+o3WYJimiYhF4Ssg cdEupkvox3XywFYdQ4JMAjDrZQIRxnCR9dUJmH22pfhAha5lTeNcM1W23Jk8JkcqsCkM hiDcM05IFnxWQbO3sED43fDKrkz8IdokxAUIULpygaBb95rYzj00iwrXfGn0Nb2hTVPY tRgyoPTf8zwblG/qVQSsXAHagUzZvRdk8yLktbpX+kyHW801B42yW59z22CxrC5wOjBf j+BHdHC4rhvpT4C/VjAVzPIbGaKG1nD3smY/N+OzpKATQ9firA08Zr1jt/MsiFtagsGm 4ouQ== 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=jU3SvxQclyebK3RGIKbFsj3VaH+vViC37wh1DjUWUJU=; b=b20IIJVMvAkmhYm96NG+a1R6wg4bcU7gPVWnJ8GeFMQW8SApdjhrYV/yPDLb9oukVO mN1OMCcZ64fa0jCoBhN7kCXFwFQ6cFiGc92V1VjRl/6Qyg5ZuDurXi1OmYrR/M1rjcll 7SSZpvsg0/XLODEYrmbHu5T0Gx/RXicot2BKHmoPDsuNO4SmDpgxITZiUze48WqNscy+ D/DIQvMVKnzy6lBkbpt8T1RO5y1+KPuUx8yBIv/2OQk92CYMxNA0pA4TdUb8OCiong9z YUJNvzXwpdCZporbjuYX8y4vV8NoTDmmV52/4HwIF/b2+4sYAQf/ELgtIy55FyO6SrWd XoaQ== X-Gm-Message-State: AOUpUlE3oXanstkCLVYc97o55GwO+tqFDek+HYltJOA4VBAeraQB7xP/ /SNrg2bTHMSO5l5Bms73GoludQ== X-Google-Smtp-Source: AAOMgpdy4m/L+PvtIhvvuOteD2cizJhslft8AVwqhGu9KywxcP+Ucr54e6zS6uUMdfFsfVEkrJE7UA== X-Received: by 2002:a62:a8e:: with SMTP id 14-v6mr6055284pfk.57.1531471765455; Fri, 13 Jul 2018 01:49:25 -0700 (PDT) Received: from skyninja.hgst.com (rap-us.hgst.com. [199.255.44.250]) by smtp.gmail.com with ESMTPSA id d18-v6sm569357pgo.74.2018.07.13.01.49.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 01:49:24 -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, bart.vanassche@wdc.com, hans.holmberg@cnexlabs.com, javier@cnexlabs.com, hlitz@ucsc.edu, igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 04/10] lightnvm: Remove redundant rq->__data_len initialization Date: Fri, 13 Jul 2018 10:48:39 +0200 Message-Id: <20180713084845.19511-5-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180713084845.19511-1-mb@lightnvm.io> References: <20180713084845.19511-1-mb@lightnvm.io> 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: Bart Van Assche Since both blk_old_get_request() and blk_mq_alloc_request() initialize rq->__data_len to zero, it is not necessary to initialize that member in nvme_nvm_alloc_request(). Hence remove the rq->__data_len initialization from nvme_nvm_alloc_request(). Signed-off-by: Bart Van Assche Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 41279da799ed..a76db8820f1c 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -662,12 +662,10 @@ static struct request *nvme_nvm_alloc_request(struct request_queue *q, rq->cmd_flags &= ~REQ_FAILFAST_DRIVER; - if (rqd->bio) { + if (rqd->bio) blk_init_request_from_bio(rq, rqd->bio); - } else { + else rq->ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); - rq->__data_len = 0; - } return rq; }