From patchwork Wed May 12 20:08:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 436025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28A8FC43461 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA4A2613E6 for ; Wed, 12 May 2021 21:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344089AbhELVXW (ORCPT ); Wed, 12 May 2021 17:23:22 -0400 Received: from mail-pl1-f173.google.com ([209.85.214.173]:46721 "EHLO mail-pl1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385588AbhELUKK (ORCPT ); Wed, 12 May 2021 16:10:10 -0400 Received: by mail-pl1-f173.google.com with SMTP id s20so13104373plr.13 for ; Wed, 12 May 2021 13:09:00 -0700 (PDT) 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=nSv5X4y9sOkTjDLwOr2XKXeP6Cfhir7BXtEsp9sc/Hc=; b=nS6T8vi+B9FiX2Rio8uJYEeFsSRxWBHsSVrxPeyD7Nk7SNYCXMGbkW+MLrjVcOsBI5 GvWgiv9dmBDVwIhl0wYG4K2Rxb8aGH2JYkKAnYVesF5CUw2JvSTL3PTuxN4JmIwNYX30 UjXvW2W6SQoyuRjfOJyo5Mpi1F8bi8TPlFEJYOIQgVhA4IkB3x35umal6IIxN9v8HYN+ 9V9ATl7PfImkOSroAZ+uif6o9hTji4IQK1jnsMNl+a5BVV257Kky6dGtVIQkFMZBifs/ S5+mJPoKm2Sjw9gRmRCIymOts7kUEciGp+go3FVtKfuLzTc3ZC3XN82AZ/3lgozCdZnX HJTw== X-Gm-Message-State: AOAM531AezpH+e/4cLk1KktwzfU4SE7LatrSMuHe3Dvx6NKuz87CugPc nanO1nWRL3u3rY8UTajUocw= X-Google-Smtp-Source: ABdhPJwMLaYLfxASh0NwVOlRQzmJVoc8uaxg5nZHWJmGAIikYD3hHgpTFTo6/azOSDIguSFrXdyZLw== X-Received: by 2002:a17:902:7402:b029:ef:7d5c:62c1 with SMTP id g2-20020a1709027402b02900ef7d5c62c1mr5780178pll.4.1620850139701; Wed, 12 May 2021 13:08:59 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:993e:1516:b2ba:76fe]) by smtp.gmail.com with ESMTPSA id l21sm513948pfc.114.2021.05.12.13.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 13:08:59 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: "James E . J . Bottomley" , Jaegeuk Kim , Bean Huo , Avri Altman , Asutosh Das , Vignesh Raghavendra , Can Guo , linux-scsi@vger.kernel.org, Bart Van Assche , Sagi Grimberg Subject: [PATCH v2 2/7] iser: Use scsi_get_pos() instead of scsi_get_lba() Date: Wed, 12 May 2021 13:08:44 -0700 Message-Id: <20210512200849.9002-3-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512200849.9002-1-bvanassche@acm.org> References: <20210512200849.9002-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. This patch does not change any functionality. Cc: Sagi Grimberg Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/iser/iser_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 136f6c4492e0..c33e113eeee5 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -949,7 +949,7 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, sector_t sector_off = mr_status.sig_err.sig_err_offset; sector_div(sector_off, sector_size + 8); - *sector = scsi_get_lba(iser_task->sc) + sector_off; + *sector = scsi_get_pos(iser_task->sc) + sector_off; iser_err("PI error found type %d at sector %llx " "expected %x vs actual %x\n", From patchwork Wed May 12 20:08:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 436026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CC9C43470 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A362613E6 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344867AbhELVXY (ORCPT ); Wed, 12 May 2021 17:23:24 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:42618 "EHLO mail-pg1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385591AbhELUKL (ORCPT ); Wed, 12 May 2021 16:10:11 -0400 Received: by mail-pg1-f173.google.com with SMTP id z4so1763985pgb.9 for ; Wed, 12 May 2021 13:09:01 -0700 (PDT) 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=zneIuWKx5plbkVRnqUaXhx2tWvAwP5VCwlHKgsx7wvc=; b=USscm2SEfmugMjTs7sKDnS0pZjUPyh2Xp0i5BaviHxa7N7NZ+gQYpb4hTIxpPHk/I8 h9EMBEdwocGvA+iB9xCC2AlVrgaklJxY9JfuTIO6I6lSZjRZyh6KfX4Q3Sv4cvSAz0FB 85SGivSxK2FDZboTOm5A/fB3NwwPrFKzppEDuPEYWPhr/IVkAwbkftT+GINrrbJJ9I2K Q4jtW7/EoaO5zg53y6rnihGo8wr+tGvYH9MuILYUHnfdyA6FLegi9EauygGqSxNh2CDE cscsyT6BpgkuaWFN7u8Kb7WaA1zoxM6UtNIrLzcY3ZkfaH0uKrd98Pq00pg2N5m4V4Yw jRhw== X-Gm-Message-State: AOAM532l+/Buc7J550duk8alBh1esxGhYZNifijPyCvgkeaqHqLtvvRx jyo309Ec1f1LqV6+Qo1Bihw= X-Google-Smtp-Source: ABdhPJyamml6Ey56saKuH6hhOL3smOcA7MK/a6BFYkGq2mKvYf1qtgHfoIzYQASZnp4lqDOpU3yYYQ== X-Received: by 2002:a17:90a:17c5:: with SMTP id q63mr26789477pja.136.1620850141476; Wed, 12 May 2021 13:09:01 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:993e:1516:b2ba:76fe]) by smtp.gmail.com with ESMTPSA id l21sm513948pfc.114.2021.05.12.13.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 13:09:00 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: "James E . J . Bottomley" , Jaegeuk Kim , Bean Huo , Avri Altman , Asutosh Das , Vignesh Raghavendra , Can Guo , linux-scsi@vger.kernel.org, Bart Van Assche , Benjamin Block Subject: [PATCH v2 3/7] zfcp: Use scsi_get_pos() instead of scsi_get_lba() Date: Wed, 12 May 2021 13:08:45 -0700 Message-Id: <20210512200849.9002-4-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512200849.9002-1-bvanassche@acm.org> References: <20210512200849.9002-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Additionally, use lower_32_bits() instead of open-coding it. This patch does not change any functionality. Cc: Benjamin Block Signed-off-by: Bart Van Assche --- drivers/s390/scsi/zfcp_fsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 2e4804ef2fb9..ae308ef06714 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -2600,7 +2600,7 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd) if (scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) { io->data_block_length = scsi_cmnd->device->sector_size; - io->ref_tag_value = scsi_get_lba(scsi_cmnd) & 0xFFFFFFFF; + io->ref_tag_value = lower_32_bits(scsi_get_pos(scsi_cmnd)); } if (zfcp_fsf_set_data_dir(scsi_cmnd, &io->data_direction)) From patchwork Wed May 12 20:08:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 436024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FEB4C43603 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7181C61288 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345098AbhELVX0 (ORCPT ); Wed, 12 May 2021 17:23:26 -0400 Received: from mail-pl1-f172.google.com ([209.85.214.172]:44961 "EHLO mail-pl1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385607AbhELUKP (ORCPT ); Wed, 12 May 2021 16:10:15 -0400 Received: by mail-pl1-f172.google.com with SMTP id b3so13106944plg.11 for ; Wed, 12 May 2021 13:09:07 -0700 (PDT) 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=AQIzDB1rBiJtJ7DexFD1p1hImAD8B5fsMZyCH6p6lds=; b=JkmaFny3euNugAgBZPhTHIkDql/PxLidw9+i8PHO7S1kS4IUmRpm7+y6pf/+CLTJ+9 G9SiomOIcKi/ehEXXKyCfqSoxmcH1uCIV9DmaMzJI04GMh6fv8gL2/lxt1f1rFf/YmXP h29R/e0xCDe1rZnlwKRun7Za9FAKLp8q6EzgDUiqbLdKX1gtwjKRFpWb2rNX3mjVysk8 hm6Ucb4SrRObG1uImlGrnf/DeUxrFDHaRxK8PfaZj6wCL57haA+L4Qnz6zLW9yf3cu91 hOA2GWg07Fy8UQgpYqvVZ38SI2E+RKG1DanIkbAMpZ5AXN7evAhbQ0Qm2qOcW1P6VjlR MyTA== X-Gm-Message-State: AOAM533aSuPkfYvG6Zb1JPG/IfIDCQXV0uubdMFsA5fiWP2r1qm8UZNs ZWO4rDOPU41anyV6dhbGBOY= X-Google-Smtp-Source: ABdhPJx4D/AK+2Emlox9e9n9pBBZvjl91OJ3Gtd00xp8KK+7KZp+jzclEULNUGjsdG4sLnhrZN6BCA== X-Received: by 2002:a17:902:ce8c:b029:ef:212e:edcb with SMTP id f12-20020a170902ce8cb02900ef212eedcbmr26613351plg.67.1620850146782; Wed, 12 May 2021 13:09:06 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:993e:1516:b2ba:76fe]) by smtp.gmail.com with ESMTPSA id l21sm513948pfc.114.2021.05.12.13.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 13:09:06 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: "James E . J . Bottomley" , Jaegeuk Kim , Bean Huo , Avri Altman , Asutosh Das , Vignesh Raghavendra , Can Guo , linux-scsi@vger.kernel.org, Bart Van Assche , Alim Akhtar , Stanley Chu , Adrian Hunter Subject: [PATCH v2 6/7] ufs: Fix the tracing code Date: Wed, 12 May 2021 13:08:48 -0700 Message-Id: <20210512200849.9002-7-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512200849.9002-1-bvanassche@acm.org> References: <20210512200849.9002-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter is confusing. Use scsi_get_pos() for all SCSI requests since all SCSI requests have a block layer request attached and hence calling scsi_get_pos() is allowed. Convert the scsi_get_pos() result from sector_t into an LBA with sectors_to_logical(). Since READ(10), WRITE(10), READ(16) and WRITE(16) all have a GROUP NUMBER field, extract the GROUP NUMBER field for all four SCSI commands. Apply the 0x3f mask to that field since the upper two bits are reserved. Rename the 'transfer_len' variable into 'affected_bytes' since it represents the number of bytes affected on the storage medium instead of the size of the SCSI data buffer. Cc: Can Guo Cc: Alim Akhtar Cc: Avri Altman Cc: Stanley Chu Cc: Bean Huo Cc: Adrian Hunter Signed-off-by: Bart Van Assche --- drivers/scsi/ufs/ufshcd.c | 34 +++++++++++++++------------------- include/trace/events/ufs.h | 10 +++++----- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0625da7a42ee..4f6b0e28735f 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include "../sd.h" #include "ufshcd.h" #include "ufs_quirks.h" #include "unipro.h" @@ -366,7 +368,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, u32 intr, doorbell; struct ufshcd_lrb *lrbp = &hba->lrb[tag]; struct scsi_cmnd *cmd = lrbp->cmd; - int transfer_len = -1; + int affected_bytes = -1; if (!trace_ufshcd_command_enabled()) { /* trace UPIU W/O tracing command */ @@ -378,30 +380,24 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, if (cmd) { /* data phase exists */ /* trace UPIU also */ ufshcd_add_cmd_upiu_trace(hba, tag, str_t); - opcode = cmd->cmnd[0]; - if ((opcode == READ_10) || (opcode == WRITE_10)) { - /* - * Currently we only fully trace read(10) and write(10) - * commands - */ - if (cmd->request && cmd->request->bio) - lba = cmd->request->bio->bi_iter.bi_sector; - transfer_len = be32_to_cpu( - lrbp->ucd_req_ptr->sc.exp_data_transfer_len); - if (opcode == WRITE_10) - group_id = lrbp->cmd->cmnd[6]; - } else if (opcode == UNMAP) { - if (cmd->request) { - lba = scsi_get_lba(cmd); - transfer_len = blk_rq_bytes(cmd->request); - } + lba = sectors_to_logical(cmd->device, scsi_get_pos(cmd)); + affected_bytes = blk_rq_bytes(cmd->request); + switch (cmd->cmnd[0]) { + case READ_10: + case WRITE_10: + group_id = lrbp->cmd->cmnd[6] & 0x3f; + break; + case READ_16: + case WRITE_16: + group_id = lrbp->cmd->cmnd[14] & 0x3f; + break; } } intr = ufshcd_readl(hba, REG_INTERRUPT_STATUS); doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL); trace_ufshcd_command(dev_name(hba->dev), str_t, tag, - doorbell, transfer_len, intr, lba, opcode, group_id); + doorbell, affected_bytes, intr, lba, opcode, group_id); } static void ufshcd_print_clk_freqs(struct ufs_hba *hba) diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h index 1cb6f1afba0e..b36df5b20ad1 100644 --- a/include/trace/events/ufs.h +++ b/include/trace/events/ufs.h @@ -248,10 +248,10 @@ DEFINE_EVENT(ufshcd_template, ufshcd_init, TRACE_EVENT(ufshcd_command, TP_PROTO(const char *dev_name, enum ufs_trace_str_t str_t, - unsigned int tag, u32 doorbell, int transfer_len, u32 intr, + unsigned int tag, u32 doorbell, int affected_bytes, u32 intr, u64 lba, u8 opcode, u8 group_id), - TP_ARGS(dev_name, str_t, tag, doorbell, transfer_len, + TP_ARGS(dev_name, str_t, tag, doorbell, affected_bytes, intr, lba, opcode, group_id), TP_STRUCT__entry( @@ -259,7 +259,7 @@ TRACE_EVENT(ufshcd_command, __field(enum ufs_trace_str_t, str_t) __field(unsigned int, tag) __field(u32, doorbell) - __field(int, transfer_len) + __field(int, affected_bytes) __field(u32, intr) __field(u64, lba) __field(u8, opcode) @@ -271,7 +271,7 @@ TRACE_EVENT(ufshcd_command, __entry->str_t = str_t; __entry->tag = tag; __entry->doorbell = doorbell; - __entry->transfer_len = transfer_len; + __entry->affected_bytes = affected_bytes; __entry->intr = intr; __entry->lba = lba; __entry->opcode = opcode; @@ -281,7 +281,7 @@ TRACE_EVENT(ufshcd_command, TP_printk( "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x", show_ufs_cmd_trace_str(__entry->str_t), __get_str(dev_name), - __entry->tag, __entry->doorbell, __entry->transfer_len, + __entry->tag, __entry->doorbell, __entry->affected_bytes, __entry->intr, __entry->lba, (u32)__entry->opcode, str_opcode(__entry->opcode), (u32)__entry->group_id ) From patchwork Wed May 12 20:08:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 436023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4DC4C43600 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A915613B5 for ; Wed, 12 May 2021 21:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346240AbhELVXk (ORCPT ); Wed, 12 May 2021 17:23:40 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:34760 "EHLO mail-pf1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385615AbhELUKS (ORCPT ); Wed, 12 May 2021 16:10:18 -0400 Received: by mail-pf1-f179.google.com with SMTP id 10so19622668pfl.1 for ; Wed, 12 May 2021 13:09:08 -0700 (PDT) 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=qf/OFADjuIOoGwVtIo/B/W0c6CIJssYRLi5uysnv+Pc=; b=IyDjPUJ1dzwPRIdwgjos7MWbCLa5OOSEHlxuFsKbWxIvLt2i/V+mIDk1vWmerW6Rmq av6Yi2MHAlD6iZG5EEXs/evaCu+/e348YnRqFBbIupd9MdMikYFzGQrg6wRj7+XNo5Nl UguTyV/eTAdIJQlotkeqwzvie7j/wg4YVD7GTzz6in1YPmo2VBk0Pg6m/DyDdRWVu2sB N9s5SHQlDbeXIFIldTahr+V8ynEpIkw0v7ki1LVe81jDzuDWoy+5RmiLkyHCLWKGZRXw oRuDxavuiTWX//RHcjJVYHOOuaM+tQGkRoNCoDloDjqc+PGvgywFweZniv772BgxXe0X 8uNA== X-Gm-Message-State: AOAM531zPzd66x7z3yxEFTBFLDXxLunRhVq6GEhKpn/cb7TZpKpSLAf4 LPMYyS4p2YCaqLRIi8B48ic= X-Google-Smtp-Source: ABdhPJx8WktJ7vVnUcvZ2T+AepEXA69nevM1yYyhVZsX8XMCPo/UADsKslmLVgdNZYHFGIEoG9uflg== X-Received: by 2002:a63:5504:: with SMTP id j4mr7442293pgb.238.1620850148501; Wed, 12 May 2021 13:09:08 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:993e:1516:b2ba:76fe]) by smtp.gmail.com with ESMTPSA id l21sm513948pfc.114.2021.05.12.13.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 13:09:07 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: "James E . J . Bottomley" , Jaegeuk Kim , Bean Huo , Avri Altman , Asutosh Das , Vignesh Raghavendra , Can Guo , linux-scsi@vger.kernel.org, Bart Van Assche , Christoph Hellwig , Ming Lei , Hannes Reinecke Subject: [PATCH v2 7/7] Remove scsi_get_lba() Date: Wed, 12 May 2021 13:08:49 -0700 Message-Id: <20210512200849.9002-8-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512200849.9002-1-bvanassche@acm.org> References: <20210512200849.9002-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Remove scsi_get_lba() since all callers have been converted to scsi_get_pos(). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 8147b1c0f265..f8084efa9838 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -285,11 +285,6 @@ static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) return scmd->prot_type; } -static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) -{ - return blk_rq_pos(scmd->request); -} - static inline sector_t scsi_get_pos(struct scsi_cmnd *scmd) { return blk_rq_pos(scmd->request);