From patchwork Wed Jun 27 19:53:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10492561 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 185B660375 for ; Wed, 27 Jun 2018 19:53:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2425D29F06 for ; Wed, 27 Jun 2018 19:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17B4729F2B; Wed, 27 Jun 2018 19:53:36 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 050C129F06 for ; Wed, 27 Jun 2018 19:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966439AbeF0Txe (ORCPT ); Wed, 27 Jun 2018 15:53:34 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:3017 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966412AbeF0Txd (ORCPT ); Wed, 27 Jun 2018 15:53:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1530129213; x=1561665213; h=from:to:cc:subject:date:message-id; bh=wtN7c2IB4SGFMuL3kZxusuSEi3DgXonO7RMy8YF90ZY=; b=F2n5b8rlZ/1z1uUtyTmzY+MUhE6Zkhd/cXLg/DwSMRS5zsl3/WJQtPpr 7aRYEfPFWK+upUPC0uSwDSco8slZfmNEmjv0NjvMPL7s6bE0n2GLv9Yc4 qidB1ZpT48uTc7iMJUWNT4/d8lUPEbPPP4Y8WHvF1+0YS9XiL4TaF0eyC XQ6k19fxMro8zYowjXWfoN6b7pEARGW6k/nTA92kVYPNYH/WsRazBkHtQ 1m6mBzFLj1Hy9VLNGO3JwtkP+oIeUOyo9NtsPPZ+Cg4ClbIZdK6HajtjV ZvdyTbHrw7wzuNeAY8qdeeVtG1CSc2VGZNlZQYFCc8noXJ2hea0r3iNU0 w==; X-IronPort-AV: E=Sophos;i="5.51,280,1526313600"; d="scan'208";a="185621546" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jun 2018 03:53:20 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 27 Jun 2018 12:42:52 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 27 Jun 2018 12:53:21 -0700 From: Bart Van Assche To: Matias Bjorling Cc: linux-block@vger.kernel.org, Bart Van Assche Subject: [PATCH] lightnvm: Remove redundant rq->__data_len initialization Date: Wed, 27 Jun 2018 12:53:19 -0700 Message-Id: <20180627195319.13417-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 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 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 --- 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; }