Decrease log verbosity in the kernel modules

Changed several logs level from info to dbg and removed redundant or
uninformative logging in order to reduce verbosity of the kernel
modules.

Change-Id: Ie9ff7f3ae6478007ea58547380b3ddfef5d280b4
Signed-off-by: Ledion Daja <ledion.daja@arm.com>
diff --git a/kernel/ethosu_inference.c b/kernel/ethosu_inference.c
index 6d3405d..5c57074 100644
--- a/kernel/ethosu_inference.c
+++ b/kernel/ethosu_inference.c
@@ -1,5 +1,6 @@
 /*
- * Copyright 2020,2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020,2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
  *
  * This program is free software and is provided to you under the terms of the
  * GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
  * along with this program; if not, you can access it online at
  * http://www.gnu.org/licenses/gpl-2.0.html.
  *
- * SPDX-License-Identifier: GPL-2.0-only
  */
 
 /****************************************************************************
@@ -153,9 +153,9 @@
 		container_of(kref, struct ethosu_inference, kref);
 	struct device *dev = inf->dev;
 
-	dev_info(dev,
-		 "Inference destroy. inf=0x%pK, status=%d, ifm_count=%u, ofm_count=%u",
-		 inf, inf->status, inf->ifm_count, inf->ofm_count);
+	dev_dbg(dev,
+		"Inference destroy. inf=0x%pK, status=%d, ifm_count=%u, ofm_count=%u",
+		inf, inf->status, inf->ifm_count, inf->ofm_count);
 
 	ethosu_mailbox_deregister(inf->mailbox, &inf->msg);
 
@@ -176,9 +176,9 @@
 	struct ethosu_inference *inf = file->private_data;
 	struct device *dev = inf->dev;
 
-	dev_info(dev,
-		 "Inference release. file=0x%pK, inf=0x%pK",
-		 file, inf);
+	dev_dbg(dev,
+		"Inference release. file=0x%pK, inf=0x%pK",
+		file, inf);
 
 	device_lock(dev);
 	ethosu_inference_put(inf);
@@ -214,10 +214,6 @@
 	if (ret)
 		return ret;
 
-	dev_info(dev,
-		 "Inference ioctl: file=0x%pK, inf=0x%pK, cmd=0x%x, arg=%lu",
-		 file, inf, cmd, arg);
-
 	switch (cmd) {
 	case ETHOSU_IOCTL_INFERENCE_STATUS: {
 		struct ethosu_uapi_result_status uapi = { 0 };
@@ -235,9 +231,9 @@
 		uapi.pmu_config.cycle_count = inf->pmu_cycle_counter_enable;
 		uapi.pmu_count.cycle_count = inf->pmu_cycle_counter_count;
 
-		dev_info(dev,
-			 "Inference ioctl: Inference status. status=%s (%d)\n",
-			 status_to_string(uapi.status), uapi.status);
+		dev_dbg(dev,
+			"Inference ioctl: Inference status. status=%s (%d)\n",
+			status_to_string(uapi.status), uapi.status);
 
 		ret = copy_to_user(udata, &uapi, sizeof(uapi)) ? -EFAULT : 0;
 
@@ -246,9 +242,9 @@
 	case ETHOSU_IOCTL_INFERENCE_CANCEL: {
 		struct ethosu_uapi_cancel_inference_status uapi = { 0 };
 
-		dev_info(dev,
-			 "Inference ioctl: Cancel Inference. Handle=%p\n",
-			 inf);
+		dev_dbg(dev,
+			"Inference ioctl: Cancel Inference. Handle=%p\n",
+			inf);
 
 		ret = ethosu_cancel_inference_request(dev, inf->mailbox, inf,
 						      &uapi);
@@ -332,10 +328,10 @@
 	}
 
 	/* Configure PMU and cycle counter */
-	dev_info(dev,
-		 "Configuring events for PMU. events=[%u, %u, %u, %u]\n",
-		 uapi->pmu_config.events[0], uapi->pmu_config.events[1],
-		 uapi->pmu_config.events[2], uapi->pmu_config.events[3]);
+	dev_dbg(dev,
+		"Configuring events for PMU. events=[%u, %u, %u, %u]\n",
+		uapi->pmu_config.events[0], uapi->pmu_config.events[1],
+		uapi->pmu_config.events[2], uapi->pmu_config.events[3]);
 
 	/* Configure events and reset count for all events */
 	for (i = 0; i < ETHOSU_PMU_EVENT_MAX; i++) {
@@ -343,9 +339,6 @@
 		inf->pmu_event_count[i] = 0;
 	}
 
-	if (uapi->pmu_config.cycle_count)
-		dev_info(dev, "Enabling cycle counter\n");
-
 	/* Configure cycle counter and reset any previous count */
 	inf->pmu_cycle_counter_enable = uapi->pmu_config.cycle_count;
 	inf->pmu_cycle_counter_count = 0;
@@ -368,9 +361,9 @@
 	inf->file = fget(ret);
 	fput(inf->file);
 
-	dev_info(dev,
-		 "Inference create. file=0x%pK, fd=%d, inf=0x%p, net=0x%pK, msg.id=0x%x",
-		 inf->file, fd, inf, inf->net, inf->msg.id);
+	dev_dbg(dev,
+		"Inference create. file=0x%pK, fd=%d, inf=0x%p, net=0x%pK, msg.id=0x%x",
+		inf->file, fd, inf, inf->net, inf->msg.id);
 
 	return fd;
 
@@ -480,17 +473,17 @@
 		inf->pmu_cycle_counter_enable = rsp->pmu_cycle_counter_enable;
 		inf->pmu_cycle_counter_count = rsp->pmu_cycle_counter_count;
 
-		dev_info(dev,
-			 "PMU events. config=[%u, %u, %u, %u], count=[%u, %u, %u, %u]\n",
-			 inf->pmu_event_config[0], inf->pmu_event_config[1],
-			 inf->pmu_event_config[2], inf->pmu_event_config[3],
-			 inf->pmu_event_count[0], inf->pmu_event_count[1],
-			 inf->pmu_event_count[2], inf->pmu_event_count[3]);
+		dev_dbg(dev,
+			"PMU events. config=[%u, %u, %u, %u], count=[%u, %u, %u, %u]\n",
+			inf->pmu_event_config[0], inf->pmu_event_config[1],
+			inf->pmu_event_config[2], inf->pmu_event_config[3],
+			inf->pmu_event_count[0], inf->pmu_event_count[1],
+			inf->pmu_event_count[2], inf->pmu_event_count[3]);
 
-		dev_info(dev,
-			 "PMU cycle counter. enable=%u, count=%llu\n",
-			 inf->pmu_cycle_counter_enable,
-			 inf->pmu_cycle_counter_count);
+		if (inf->pmu_cycle_counter_enable)
+			dev_dbg(dev,
+				"PMU cycle counter: count=%llu\n",
+				inf->pmu_cycle_counter_count);
 	}
 
 	inf->done = true;