diff mbox series

[1/4] staging: vchiq_core: Use printk messages for devices

Message ID 20240420115351.27713-2-wahrenst@gmx.net (mailing list archive)
State New, archived
Headers show
Series staging: vchiq_core: Minor clean-ups | expand

Commit Message

Stefan Wahren April 20, 2024, 11:53 a.m. UTC
Now that struct vchiq_state has a device reference, we can convert
the remaining printk message helpers.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--
2.34.1

Comments

Umang Jain April 21, 2024, 8:53 a.m. UTC | #1
Hi Stefan,

Thank you for the patch

On 20/04/24 5:23 pm, Stefan Wahren wrote:
> Now that struct vchiq_state has a device reference, we can convert
> the remaining printk message helpers.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   .../vc04_services/interface/vchiq_arm/vchiq_core.c     | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 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 3397365e551e..129d73fec2bf 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> @@ -697,7 +697,8 @@ reserve_space(struct vchiq_state *state, size_t space, int is_blocking)
>
>   		if (tx_pos == (state->slot_queue_available * VCHIQ_SLOT_SIZE)) {
>   			complete(&state->slot_available_event);
> -			pr_warn("%s: invalid tx_pos: %d\n", __func__, tx_pos);
> +			dev_warn(state->dev, "%s: invalid tx_pos: %d\n",
> +				 __func__, tx_pos);
>   			return NULL;
>   		}
>
> @@ -1732,10 +1733,9 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header)
>   				break;
>   			}
>   			if (queue->process != queue->remote_insert) {
> -				pr_err("%s: p %x != ri %x\n",
> -				       __func__,
> -				       queue->process,
> -				       queue->remote_insert);
> +				dev_err(state->dev, "%s: p %x != ri %x\n",
> +					__func__, queue->process,
> +					queue->remote_insert);
>   				mutex_unlock(&service->bulk_mutex);
>   				goto bail_not_ready;
>   			}
> --
> 2.34.1
>
diff mbox series

Patch

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 3397365e551e..129d73fec2bf 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -697,7 +697,8 @@  reserve_space(struct vchiq_state *state, size_t space, int is_blocking)

 		if (tx_pos == (state->slot_queue_available * VCHIQ_SLOT_SIZE)) {
 			complete(&state->slot_available_event);
-			pr_warn("%s: invalid tx_pos: %d\n", __func__, tx_pos);
+			dev_warn(state->dev, "%s: invalid tx_pos: %d\n",
+				 __func__, tx_pos);
 			return NULL;
 		}

@@ -1732,10 +1733,9 @@  parse_message(struct vchiq_state *state, struct vchiq_header *header)
 				break;
 			}
 			if (queue->process != queue->remote_insert) {
-				pr_err("%s: p %x != ri %x\n",
-				       __func__,
-				       queue->process,
-				       queue->remote_insert);
+				dev_err(state->dev, "%s: p %x != ri %x\n",
+					__func__, queue->process,
+					queue->remote_insert);
 				mutex_unlock(&service->bulk_mutex);
 				goto bail_not_ready;
 			}