From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 003.mia.mailroute.net (003.mia.mailroute.net [199.89.3.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEAE42E9EAD for ; Thu, 30 Oct 2025 19:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.3.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761853153; cv=none; b=KlE7yA8YhzrphPKQCU3cfGsvx62ek3olF91NU6ueu6UPUmW4KB94em4F8VywFPthhhz0X80nq5D6nxbGDqFmoKDMUSyuMpj/+00lRWRhrepg6XK1uDhtHZsPPdGfA70++v3KDZfSwXHMmaXnJGT8N4b4Ber/JjlfVGi1BdiR/3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761853153; c=relaxed/simple; bh=u1i/5oXoPOHTM7eq+bIwsg00zS/zL4Af9N3HvP9F4Qo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tsex9J+60Ey8wQau8qowhWU5Ed5y397mhLEYSQ90IOHaqqxWwiARW6NrLRQW9ouF2GAdCPtaERtKf/HyBphSttFNdVOa1mKAIhUU3/FBAbDzPLwRXKhljqCCsHDg3NdprQ0VCA1/rTilq62udzoQ+9/oXk3wTFRw8g8AI/W4Jyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=bJWkTpQu; arc=none smtp.client-ip=199.89.3.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="bJWkTpQu" Received: from localhost (localhost [127.0.0.1]) by 003.mia.mailroute.net (Postfix) with ESMTP id 4cyDvK5hW7zlv76k; Thu, 30 Oct 2025 19:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1761853147; x=1764445148; bh=kEcfD aI+egga7Vp/27z21eVxPnVh9h5oMJGMCdSaO2w=; b=bJWkTpQuuaIhWEKi5uw4o I4HVAgdLW+wZfl+gb3nCpVQiXkF7J51rExr2bwZiyCOnVRp/zOyxlhpPtukzP/Ed +uqs5eAJkBAig+cm/7oOXoeG5TUcztb6XiG6SFoZ+XVIDPDAPbef3ExaCMLTOKTE HlLD+9+aPmdp3Y1pEtJFajuwpQdmYU9NyA4cOpA0WOU/vw64iG6fvAWC22KzdIc/ N97Rn/tJUw8qV1TbjCsGWA/KS9lC8wLqEwQjouC79xIu0Z8XBOV/sU9NNLHwEtlP ZI9w3axdwHe/hYZ3COPk+FCY7i2aNGDJNvqkmGD7nggTavqNZJviyCplwLwR4F2T Q== X-Virus-Scanned: by MailRoute Received: from 003.mia.mailroute.net ([127.0.0.1]) by localhost (003.mia [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id c1yNG9g5mcpE; Thu, 30 Oct 2025 19:39:07 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.180.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 003.mia.mailroute.net (Postfix) with ESMTPSA id 4cyDv74l2fzlvfGf; Thu, 30 Oct 2025 19:38:58 +0000 (UTC) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Avri Altman , Peter Wang , "James E.J. Bottomley" , Matthias Brugger , AngeloGioacchino Del Regno , Bean Huo , "Bao D. Nguyen" , Adrian Hunter Subject: [PATCH v7 12/28] ufs: core: Change the type of one ufshcd_send_command() argument Date: Thu, 30 Oct 2025 12:36:11 -0700 Message-ID: <20251030193720.871635-13-bvanassche@acm.org> X-Mailer: git-send-email 2.51.1.930.gacf6e81ea2-goog In-Reply-To: <20251030193720.871635-1-bvanassche@acm.org> References: <20251030193720.871635-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Change the 'task_tag' argument into an LRB pointer. This patch prepares for the removal of the hba->lrb[] array. Reviewed-by: Avri Altman Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche --- drivers/ufs/core/ufshcd.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index edf56e9e825b..f478d5b5230d 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -2350,14 +2350,13 @@ static void ufshcd_update_monitor(struct ufs_hba = *hba, const struct ufshcd_lrb * /** * ufshcd_send_command - Send SCSI or device management commands * @hba: per adapter instance - * @task_tag: Task tag of the command + * @lrbp: Local reference block of SCSI command * @hwq: pointer to hardware queue instance */ -static inline -void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag, - struct ufs_hw_queue *hwq) +static inline void ufshcd_send_command(struct ufs_hba *hba, + struct ufshcd_lrb *lrbp, + struct ufs_hw_queue *hwq) { - struct ufshcd_lrb *lrbp =3D &hba->lrb[task_tag]; unsigned long flags; =20 if (hba->monitor.enabled) { @@ -3066,7 +3065,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *ho= st, struct scsi_cmnd *cmd) if (hba->mcq_enabled) hwq =3D ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd)); =20 - ufshcd_send_command(hba, tag, hwq); + ufshcd_send_command(hba, lrbp, hwq); =20 out: if (ufs_trigger_eh(hba)) { @@ -3312,7 +3311,7 @@ static int ufshcd_issue_dev_cmd(struct ufs_hba *hba= , struct ufshcd_lrb *lrbp, int err; =20 ufshcd_add_query_upiu_trace(hba, UFS_QUERY_SEND, lrbp->ucd_req_ptr); - ufshcd_send_command(hba, tag, hba->dev_cmd_queue); + ufshcd_send_command(hba, lrbp, hba->dev_cmd_queue); err =3D ufshcd_wait_for_dev_cmd(hba, lrbp, timeout); =20 ufshcd_add_query_upiu_trace(hba, err ? UFS_QUERY_ERR : UFS_QUERY_COMP,