From patchwork Mon Jun 25 23:49:38 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: 10487557 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 4C74D6038C for ; Mon, 25 Jun 2018 23:49:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 345B2286A0 for ; Mon, 25 Jun 2018 23:49:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24262286F6; Mon, 25 Jun 2018 23:49:41 +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 A9B7E286A0 for ; Mon, 25 Jun 2018 23:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932559AbeFYXtk (ORCPT ); Mon, 25 Jun 2018 19:49:40 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:44794 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932249AbeFYXtj (ORCPT ); Mon, 25 Jun 2018 19:49:39 -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=1529970579; x=1561506579; h=from:to:cc:subject:date:message-id; bh=TzxxgMxiitr3EbkCU/ZzeHwjopcJlGll1jgyIphSUlE=; b=JxQkfO6xtxbbOGR7T6Y9dffiDSE5NPMFFYkFJikrPet/dcr5JPIqU0Cr o+YfkXwPoag0M2aQJHV/p+nuwSE41z3TuafOsbXD2LhGaFMPgnsaeEVYw +gY9+FfnlTLYM5UrgDzVft32vRWkNeeTa6dlZvpgNiP6GDw82Bj0nV0lm 2sZyEPuVuOeizw8LQkFCAcZivHYeIISWW+1/QAwYpScMrLRIT2GYPXeSn 6UW35B1JP7S6Z/3dTdP/mrrtB4/rEAIpR6QX+PZCpVG0ShOi7XRpqnDuT vvsuT9OdZ1HUSuKmSfm8h2XMMI7xX00XAeWNL4/1kB/6th8Zwa/1/5y+Y w==; X-IronPort-AV: E=Sophos;i="5.51,272,1526313600"; d="scan'208";a="185275702" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 26 Jun 2018 07:49:39 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 25 Jun 2018 16:38:59 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 25 Jun 2018 16:49:39 -0700 From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche Subject: [PATCH] sd: Remove a superfluous assignment Date: Mon, 25 Jun 2018 16:49:38 -0700 Message-Id: <20180625234938.11939-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since blk_rq_bytes(req) returns req->__data_len, assigning that value to req->__data_len is superfluous. Hence remove that assignment. See also commit 5db44863b6eb ("[SCSI] sd: Implement support for WRITE SAME"). Signed-off-by: Bart Van Assche --- drivers/scsi/sd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9421d9877730..3463f21f91ee 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2028,7 +2028,6 @@ static int sd_done(struct scsi_cmnd *SCpnt) } else { sdkp->device->no_write_same = 1; sd_config_write_same(sdkp); - req->__data_len = blk_rq_bytes(req); req->rq_flags |= RQF_QUIET; } break;