[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241011072210.494672-3-umang.jain@ideasonboard.com>
Date: Fri, 11 Oct 2024 12:52:04 +0530
From: Umang Jain <umang.jain@...asonboard.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Cc: linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Stefan Wahren <wahrenst@....net>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Umang Jain <umang.jain@...asonboard.com>
Subject: [PATCH 2/8] staging: vchiq_core: Properly log dev_err()
Properly log a dev_err() message when the msgid is not of
VCHIQ_MSG_PADDING type. Drop 'oldmsgid' scoped variable and improve
on the error string as well.
Signed-off-by: Umang Jain <umang.jain@...asonboard.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_core.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index e9b60dd8d419..1dca676186b6 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1188,13 +1188,10 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service,
header = (struct vchiq_header *)SLOT_DATA_FROM_INDEX(state,
local->slot_sync);
- {
- int oldmsgid = header->msgid;
-
- if (oldmsgid != VCHIQ_MSGID_PADDING)
- dev_err(state->dev, "core: %d: qms - msgid %x, not PADDING\n",
- state->id, oldmsgid);
- }
+ if (header->msgid != VCHIQ_MSGID_PADDING)
+ dev_err(state->dev,
+ "core: %d: qms - msgid %x, is not a PADDING message\n",
+ state->id, header->msgid);
dev_dbg(state->dev, "sync: %d: qms %s@%pK,%x (%d->%d)\n",
state->id, msg_type_str(VCHIQ_MSG_TYPE(msgid)), header, size,
--
2.45.2
Powered by blists - more mailing lists