From patchwork Mon May 24 03:08:41 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: 446710 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 7168EC47080 for ; Mon, 24 May 2021 03:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 511A261151 for ; Mon, 24 May 2021 03:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232311AbhEXDLg (ORCPT ); Sun, 23 May 2021 23:11:36 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:44784 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232307AbhEXDLd (ORCPT ); Sun, 23 May 2021 23:11:33 -0400 Received: by mail-pg1-f179.google.com with SMTP id 29so7955072pgu.11 for ; Sun, 23 May 2021 20:10:05 -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=c+J3FMBmkv9QBxtbKvY2a7P5tftYk6T/5jWRZacFAdY=; b=ItNdUiacMnxb4TRO1g8/svQG9iLwa+Ofy70sAAAH7+AkVfIxgJrT0/Uap7hG/LEjHy Uut+BEKkDnoBQuxNgmMWphL8jJTa14mTVyTsEbvOQgP0HuUbIlvGh8DiT4MraON3h1K7 BWw2uETudvT6NPUr8+rG4Ehbcwy5UMooLTJK79nnHEHRaqFYU3hxYPqIvab2blXHFIoW /cXkSJtRS/XlLBPs4BqXqM+y7RhMQ+GThm1SJx3x+/C99ExGnNq+Ug7lxsbLGLMI3SR6 uDC89suVZDbZmjot4vppvzRynWYXUcXPurWrS+5MHDKVqCnOacy7MXH9yCVuMtHvFDyY ua0A== X-Gm-Message-State: AOAM5328UUuEz6W8tVraBKlzOLhlIJSotb86Dx7viQlAlT6PzGjtpRMt t9l8jdWx8eTZOdeVzXb0jEU= X-Google-Smtp-Source: ABdhPJzq9C801mRQCdmpwBjChfHefK4I0AQ99pKImAhtTKYg0Nj2TzaLQUBrOR0vquSrjlFf0MW+Eg== X-Received: by 2002:aa7:8a18:0:b029:2dd:42f3:d42f with SMTP id m24-20020aa78a180000b02902dd42f3d42fmr22341362pfa.70.1621825805394; Sun, 23 May 2021 20:10:05 -0700 (PDT) Received: from asus.hsd1.ca.comcast.net (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id v9sm11131863pjd.26.2021.05.23.20.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 20:10:04 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" Cc: Christoph Hellwig , linux-scsi@vger.kernel.org, Bart Van Assche , Michael Reed , "James E.J. Bottomley" Subject: [PATCH v3 36/51] qla1280: Use scsi_cmd_to_rq() instead of scsi_cmnd.request Date: Sun, 23 May 2021 20:08:41 -0700 Message-Id: <20210524030856.2824-37-bvanassche@acm.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524030856.2824-1-bvanassche@acm.org> References: <20210524030856.2824-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 --- drivers/scsi/qla1280.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 928da90b79be..15d564076707 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -490,7 +490,7 @@ __setup("qla1280=", qla1280_setup); #define CMD_SNSLEN(Cmnd) SCSI_SENSE_BUFFERSIZE #define CMD_RESULT(Cmnd) Cmnd->result #define CMD_HANDLE(Cmnd) Cmnd->host_scribble -#define CMD_REQUEST(Cmnd) Cmnd->request->cmd +#define CMD_REQUEST(Cmnd) scsi_cmd_to_rq(Cmnd)->cmd #define CMD_HOST(Cmnd) Cmnd->device->host #define SCSI_BUS_32(Cmnd) Cmnd->device->channel @@ -2827,7 +2827,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8)); /* Set ISP command timeout. */ - pkt->timeout = cpu_to_le16(cmd->request->timeout/HZ); + pkt->timeout = cpu_to_le16(scsi_cmd_to_rq(cmd)->timeout / HZ); /* Set device target ID and LUN */ pkt->lun = SCSI_LUN_32(cmd); @@ -3082,7 +3082,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8)); /* Set ISP command timeout. */ - pkt->timeout = cpu_to_le16(cmd->request->timeout/HZ); + pkt->timeout = cpu_to_le16(scsi_cmd_to_rq(cmd)->timeout / HZ); /* Set device target ID and LUN */ pkt->lun = SCSI_LUN_32(cmd);