From patchwork Mon Aug 9 23:03:16 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: 494159 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, URIBL_BLOCKED, 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 9042BC432BE for ; Mon, 9 Aug 2021 23:04:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A55A61004 for ; Mon, 9 Aug 2021 23:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236943AbhHIXEr (ORCPT ); Mon, 9 Aug 2021 19:04:47 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:55924 "EHLO mail-pj1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236947AbhHIXEn (ORCPT ); Mon, 9 Aug 2021 19:04:43 -0400 Received: by mail-pj1-f54.google.com with SMTP id ca5so30337804pjb.5 for ; Mon, 09 Aug 2021 16:04:22 -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=eKg6z51wFV7biatzkNM4Hts6TkZNBCWvFreLQRIkp/I=; b=VEVI9rz3wAmgqvFO2wAf0yPRkDsGI6gnPcbBJInck8tm9nVdkpz+z5oQTS5rEvSAkQ 6XfKzP0wJsChJA4JZNDmT8rOoDB7lV/ubGqZRrDIC9pgONCoqVCDwBb2Kj3kvKToRmOA ke1l3Lw5NEmu/aqHnk25txJ0+4YyuwwMkl8CXfsvrB48qta4zQlcnh7CxXjUpCWynlaT U+0YyRQk5nz3sZ1KVkWXwGeDa8u+goLR5segxkkpesZ/J7OaqQkROmxNaqYhiM7TxJMt vvMvvi+1WR7xjlAiAsZki259faD2n9sFJDBTFmOO/tZ4tIxOPO0SZepGiP6ihP5NJiMO 84jQ== X-Gm-Message-State: AOAM5336BSFu9Fpqra2jK59dZWeJSmXbHr8N1wPoyIKaGc5hD2MVD3Vu aXCnqamUucGH8ydGAcXGUps= X-Google-Smtp-Source: ABdhPJzNn6N5yeFfz3RP4cp/VYt5wSejoa/tQrJXwiZP2q3adwHLjvIWxaNOFSN6xvi7KVWRwY0G8A== X-Received: by 2002:a65:5342:: with SMTP id w2mr377622pgr.333.1628550262479; Mon, 09 Aug 2021 16:04:22 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net ([2601:647:4000:d7:7dd4:e46e:368b:7454]) by smtp.gmail.com with ESMTPSA id j6sm24102260pgq.0.2021.08.09.16.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 16:04:21 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Adaptec OEM Raid Solutions , "James E.J. Bottomley" Subject: [PATCH v5 13/52] aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request Date: Mon, 9 Aug 2021 16:03:16 -0700 Message-Id: <20210809230355.8186-14-bvanassche@acm.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210809230355.8186-1-bvanassche@acm.org> References: <20210809230355.8186-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 scsi_cmd_to_rq() instead. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke --- drivers/scsi/aacraid/aachba.c | 2 +- drivers/scsi/aacraid/commsup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 267934d2f14b..c2d6f0a9e0b1 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -1504,7 +1504,7 @@ static struct aac_srb * aac_scsi_common(struct fib * fib, struct scsi_cmnd * cmd srbcmd->id = cpu_to_le32(scmd_id(cmd)); srbcmd->lun = cpu_to_le32(cmd->device->lun); srbcmd->flags = cpu_to_le32(flag); - timeout = cmd->request->timeout/HZ; + timeout = scsi_cmd_to_rq(cmd)->timeout / HZ; if (timeout == 0) timeout = (dev->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT); srbcmd->timeout = cpu_to_le32(timeout); // timeout in seconds diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 54eb4d41bc2c..deb32c9f4b3e 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -224,7 +224,7 @@ struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd) { struct fib *fibptr; - fibptr = &dev->fibs[scmd->request->tag]; + fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag]; /* * Null out fields that depend on being zero at the start of * each I/O