From patchwork Fri Jan 11 00:08:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10757067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B13EC746 for ; Fri, 11 Jan 2019 00:09:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0E3F29D46 for ; Fri, 11 Jan 2019 00:09:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9553629D5D; Fri, 11 Jan 2019 00:09:38 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 2B16F29D48 for ; Fri, 11 Jan 2019 00:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730653AbfAKAJh (ORCPT ); Thu, 10 Jan 2019 19:09:37 -0500 Received: from out002.mailprotect.be ([83.217.72.86]:60051 "EHLO out002.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730612AbfAKAJh (ORCPT ); Thu, 10 Jan 2019 19:09:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:References :In-Reply-To:Message-Id:Date:Subject:Cc:To:From:reply-to:sender:bcc: content-type; bh=y5l395ZdmETlfN8cZOFN+LwmYbdYlcf3qD9xaILkLI0=; b=s4B3YmKs2+/m arbYaXHbgGGnpRgJUaVHLi3SBYUkge0wIqK4mDI61MWAWLBmBaR/rlRxuAPZbcJbdkD3T5FxTBP7U 6YiHLx8PsAusWKUF0BjEgs8VwT2JLOHBo7d2/sEXlB7EgXCWjnYbiqC1mMGA+Wkjph8Ay0wQdlv/N FA85Xgx/5qOHMCMZqhBQMc7dIrqgc1rvwVQemjJn/GgyKelYjrd9j2eNVNAeQ2p/FuGIuieWzdfx+ 77oaVHO7Lblz6mDTZMj/FK5D6HRiOL10IdZtWO/DJx0IlAmHKpigfeH8fp3nZP2xm/h3Bl3W6xL36 nchiWiraRxbLDwjpFSOQVg==; Received: from smtp-auth.mailprotect.be ([178.208.39.155]) by com-mpt-out002.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1ghkOB-000Ddc-Id; Fri, 11 Jan 2019 01:09:32 +0100 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 85E08C0D14; Fri, 11 Jan 2019 01:09:18 +0100 (CET) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche Subject: [PATCH 3/8] sd: Remove a local variable Date: Thu, 10 Jan 2019 16:08:53 -0800 Message-Id: <20190111000858.76261-4-bvanassche@acm.org> X-Mailer: git-send-email 2.20.1.97.g81188d93c3-goog In-Reply-To: <20190111000858.76261-1-bvanassche@acm.org> References: <20190111000858.76261-1-bvanassche@acm.org> MIME-Version: 1.0 X-Originating-IP: 178.208.39.155 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.03) X-Recommended-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kIhVXFL WPJO+eyolGM4l8rlxuGfhU+3k8+lrVLTNBgpy2LxbHpqloq8mG8yXCcEbxT2UdIuHji9IodMg2vu WMdu+65sFAzW X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be 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 This patch does not change any functionality. Signed-off-by: Martin K. Petersen [ bvanassche: extracted this patch from a larger patch ] Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke --- drivers/scsi/sd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 289a0c8d0e82..7afcf8f7e342 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1016,7 +1016,6 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) struct bio *bio = rq->bio; sector_t sector = blk_rq_pos(rq); unsigned int nr_sectors = blk_rq_sectors(rq); - unsigned int nr_bytes = blk_rq_bytes(rq); blk_status_t ret; if (sdkp->device->no_write_same) @@ -1056,7 +1055,7 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) */ rq->__data_len = sdp->sector_size; ret = scsi_init_io(cmd); - rq->__data_len = nr_bytes; + rq->__data_len = blk_rq_bytes(rq); return ret; }