From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 5E1E23EEAE2; Tue, 21 Jul 2026 19:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784661843; cv=none; b=DahTtdk9vhsNxIL6X/0vfiEbXKc6QsP6XRl5wKBVJSBqgAg2MY5bAxqcTuS3b6tuS9XBWDPwy7i1PmAX8YcnLgi6L7uCZHijxNirOJEXoAWmjLb9oKCV6FEYdQ1qwun5eO2FniQSIgFkIgYhH+3ck0hK7bYnHvQW9T4VY442c44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784661843; c=relaxed/simple; bh=IkHREXvQr+w9q+BZSxNrHqOZYOXPjBLP1gEWuvX2eEE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oq1NsByOBZsbSeF6Eo9Ud22DNd9XcxgqdKo0ZHVRNHeioup8Mxt+6duymnf5aHApaVXgOP9+OWIyHM5qs2PXHD3eB8RoZRE9UXQmkWbHPr6Wtt302GonF9wXhOpV1jdogKe8Lz5D7+ed2sBNO/pOZuuvBcP54KQU3LIyYrsw2lE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yLCu2Ru3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yLCu2Ru3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEF8E1F000E9; Tue, 21 Jul 2026 19:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784661842; bh=323VB3jlLO4eBztqKw6Oh9GLe2+UZFx1vZG+LH9dAzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yLCu2Ru3oqmnsYxkCdSAp7pfg8JmZ38Gl2ubWvn3+7OS7JW5bb7l8lztp8SzQwDWf F4vUQZzVToQ6Pz/W5/4z3kmKmCNk77yRUBJ8nrgsO2rHIrTgWwAoCn1E15bxJ9M34l qhjKX09i669ZbT3CzbRyxhs/SfwU3kfA8ar6iUdA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chanwoo Lee , Bart Van Assche , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 6.12 0218/1276] scsi: ufs: Fix wrong value printed in unexpected UPIU response case Date: Tue, 21 Jul 2026 17:11:01 +0200 Message-ID: <20260721152450.966641222@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chanwoo Lee [ Upstream commit 2483ae0a56231a915c706411421c6c002a2bf83e ] In ufshcd_transfer_rsp_status(), the default case of the inner switch statement prints the UPIU response code when an unexpected response is received. However, the code was printing 'result' variable which is always 0 at that point, making the error message useless for debugging. Fix this by printing the actual UPIU response code returned by ufshcd_get_req_rsp(). Fixes: 08108d31129a ("scsi: ufs: Improve type safety") Signed-off-by: Chanwoo Lee Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20260527092134.275887-1-cw9316.lee@samsung.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 22d3cb0ddbcaa4..205427f6c46515 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5456,7 +5456,7 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp, default: dev_err(hba->dev, "Unexpected request response code = %x\n", - result); + ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr)); result = DID_ERROR << 16; break; } -- 2.53.0