Re: [RFC PATCH 1/4] staging: vc04_services: vchiq_core: Drop custom logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Umang,

Am 18.01.23 um 12:58 schrieb Umang Jain:
Drop custom logging from the vchiq_core.c and use standard kernel
logging infrastructure (dev_dbg() and friends for struct Device
stuff) and pr_info (and similar) for vchiq_services/instances things.
i'm sorry but your "staging: vc04_services: vchiq: Register devices with a custom bus_type" is still in my backlog. I was busy with some regressions on bcm2835/bcm2711.

Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
---
  .../interface/vchiq_arm/vchiq_core.c          | 450 ++++++++----------
  1 file changed, 204 insertions(+), 246 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 4e705a447a62..7b3c57326d28 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -227,10 +227,11 @@ static const char *msg_type_str(unsigned int msg_type)
  static inline void
  set_service_state(struct vchiq_service *service, int newstate)
  {
-	vchiq_log_info(vchiq_core_log_level, "%d: srv:%d %s->%s",
-		       service->state->id, service->localport,
-		       srvstate_names[service->srvstate],
-		       srvstate_names[newstate]);
+	struct vchiq_state *state = service->state;
+
+	dev_info(state->dev, "%d: srv:%d %s->%s", state->id,
+		 service->localport, srvstate_names[service->srvstate],
+		 srvstate_names[newstate]);
  	service->srvstate = newstate;
  }
@@ -255,8 +256,7 @@ find_service_by_handle(struct vchiq_instance *instance, unsigned int handle)
  		return service;
  	}
  	rcu_read_unlock();
-	vchiq_log_info(vchiq_core_log_level,
-		       "Invalid service handle 0x%x", handle);
+	pr_info("vchiq: Invalid service handle 0x%x", handle);

Some log levels like this here doesn't make sense. I would expect here a warning or an error. Could you please have look at it in a separate patch?

Thanks





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux