From patchwork Fri May 14 21:33:26 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: 439186 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 2BA7BC433ED for ; Fri, 14 May 2021 21:36:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E5C26143F for ; Fri, 14 May 2021 21:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233422AbhENVhi (ORCPT ); Fri, 14 May 2021 17:37:38 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:55129 "EHLO mail-pj1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233489AbhENVhV (ORCPT ); Fri, 14 May 2021 17:37:21 -0400 Received: by mail-pj1-f54.google.com with SMTP id g24so522300pji.4 for ; Fri, 14 May 2021 14:36: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=CNhwrprZYmWxuMGbVuPnCv7S9U3K7+lKJs/YESFzhnc=; b=ZVwhqli/cIiULE2sZtOvkYD6DDAIXiLGPxcHEmEOZHElQnOMubbsRiZl+ZW0X9NPLk TId3Qq+HdRduqRPaEF3P9OMP9WK7fRh2u1wZ1PlJYvEUYhQMmoOxKkak8qXHY7+RwTXp 8a1caEe1NQJTe3R9bCFxxya6S0jHXd6LJmj7/EKmQBoN1rQQmwWOt+22vLzBiE0NJODd gPgVOLkfRqbPBPvPhBPa2LsZT7H/sjH+JJb3hb+QDCN+hg8AfYha9/GsQr/eUoYgVmLD BKOOlYIwUD2izVoVR2d/r1qH8Gq8E1ejDNjB0iP3aA69Qoc3oczF3HeK0YpQMSEGrJaG BuTw== X-Gm-Message-State: AOAM532SyMVAnoERQrjhfjIkckka2QlLLwNzA1tB16fp4AmrgYyOKFyC kH8MqCwIzmKWhbKPjBsIS6w= X-Google-Smtp-Source: ABdhPJwep5cKFpRJBJV17zTwGfLpw1RA478RAlwjBMjDavnOaytyh7ZFvwRH12k+vWR01ApCqfHp5Q== X-Received: by 2002:a17:90a:474f:: with SMTP id y15mr11426093pjg.108.1621028167661; Fri, 14 May 2021 14:36:07 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:e40c:c579:7cd8:c046]) by smtp.gmail.com with ESMTPSA id js6sm9307262pjb.0.2021.05.14.14.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 14:36:07 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , John Garry , "James E.J. Bottomley" Subject: [PATCH 20/50] hisi_sas: Use blk_req() instead of scsi_cmnd.request Date: Fri, 14 May 2021 14:33:26 -0700 Message-Id: <20210514213356.5264-72-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210514213356.5264-1-bvanassche@acm.org> References: <20210514213356.5264-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Prepare for removal of the request pointer by using blk_req() instead. This patch does not change any functionality. Signed-off-by: Bart Van Assche Acked-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 5a204074099c..9a93a3374d65 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -185,7 +185,7 @@ static int hisi_sas_slot_index_alloc(struct hisi_hba *hisi_hba, void *bitmap = hisi_hba->slot_index_tags; if (scsi_cmnd) - return scsi_cmnd->request->tag; + return blk_req(scsi_cmnd)->tag; spin_lock(&hisi_hba->lock); index = find_next_zero_bit(bitmap, hisi_hba->slot_index_count, @@ -449,7 +449,7 @@ static int hisi_sas_task_prep(struct sas_task *task, unsigned int dq_index; u32 blk_tag; - blk_tag = blk_mq_unique_tag(scmd->request); + blk_tag = blk_mq_unique_tag(blk_req(scmd)); dq_index = blk_mq_unique_tag_to_hwq(blk_tag); *dq_pointer = dq = &hisi_hba->dq[dq_index]; } else { diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 499c770d405c..ed02eecd606d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -1153,7 +1153,7 @@ static void fill_prot_v3_hw(struct scsi_cmnd *scsi_cmnd, { unsigned char prot_op = scsi_get_prot_op(scsi_cmnd); unsigned int interval = scsi_prot_interval(scsi_cmnd); - u32 lbrt_chk_val = t10_pi_ref_tag(scsi_cmnd->request); + u32 lbrt_chk_val = t10_pi_ref_tag(blk_req(scsi_cmnd)); switch (prot_op) { case SCSI_PROT_READ_INSERT: