From: Alok Tiwari <alok.a.tiwari@oracle.com>
To: maciej.falkowski@linux.intel.com,
jacek.lawrynowicz@linux.intel.com, quic_thanson@quicinc.com,
jeff.hugo@oss.qualcomm.com, carl.vanderlip@oss.qualcomm.com,
ogabbay@kernel.org, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: alok.a.tiwarilinux@gmail.com, alok.a.tiwari@oracle.com
Subject: [PATCH] accel/qaic: fix incorrect counter check in RAS message decode
Date: Fri, 10 Apr 2026 04:20:12 -0700 [thread overview]
Message-ID: <20260410112015.592546-1-alok.a.tiwari@oracle.com> (raw)
The UE and UE_NF cases check ce_count against UINT_MAX before incrementing
their respective counters. This is logically incorrect and prevents
ue_count and ue_nf_count from incrementing when ce_count reaches UINT_MAX.
Fixes: c11a50b170e7 ("accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/accel/qaic/qaic_ras.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/qaic/qaic_ras.c b/drivers/accel/qaic/qaic_ras.c
index cc0b75461e1a..6791af366cba 100644
--- a/drivers/accel/qaic/qaic_ras.c
+++ b/drivers/accel/qaic/qaic_ras.c
@@ -497,11 +497,11 @@ static void decode_ras_msg(struct qaic_device *qdev, struct ras_data *msg)
qdev->ce_count++;
break;
case UE:
- if (qdev->ce_count != UINT_MAX)
+ if (qdev->ue_count != UINT_MAX)
qdev->ue_count++;
break;
case UE_NF:
- if (qdev->ce_count != UINT_MAX)
+ if (qdev->ue_nf_count != UINT_MAX)
qdev->ue_nf_count++;
break;
default:
--
2.50.1
next reply other threads:[~2026-04-10 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 11:20 Alok Tiwari [this message]
2026-04-10 17:08 ` [PATCH] accel/qaic: fix incorrect counter check in RAS message decode Jeff Hugo
2026-04-10 17:08 ` Jeff Hugo
2026-04-11 23:40 ` Claude review: " Claude Code Review Bot
2026-04-11 23:40 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260410112015.592546-1-alok.a.tiwari@oracle.com \
--to=alok.a.tiwari@oracle.com \
--cc=alok.a.tiwarilinux@gmail.com \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=maciej.falkowski@linux.intel.com \
--cc=ogabbay@kernel.org \
--cc=quic_thanson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox