소스 검색

btfmcodec: fix logging errors

This change add format specifiers wherever required.

Change-Id: I8bac382b0cc50e302ed780335510c0ba7df279fa
Signed-off-by: Balakrishna Godavarthi <[email protected]>
Balakrishna Godavarthi 2 년 전
부모
커밋
f6eccaaf19
3개의 변경된 파일11개의 추가작업 그리고 13개의 파일을 삭제
  1. 6 8
      btfmcodec/btfm_codec.c
  2. 1 1
      btfmcodec/btfm_codec_btadv_interface.c
  3. 4 4
      btfmcodec/btfm_codec_interface.c

+ 6 - 8
btfmcodec/btfm_codec.c

@@ -361,7 +361,7 @@ static __poll_t btfmcodec_dev_poll(struct file *file, poll_table *wait)
 	mutex_lock(&btfmcodec_dev->lock);
 	/* recheck if the client has released by the driver */
 	if (refcount_read(&btfmcodec_dev->active_clients) == 1) {
-		BTFMCODEC_WARN("port has been closed alreadt");
+		BTFMCODEC_WARN("port has been closed already");
 		mutex_unlock(&btfmcodec_dev->lock);
 		return POLLHUP;
 	}
@@ -465,9 +465,7 @@ static ssize_t btfmcodec_attributes_store(struct device *dev,
 	mutex_lock(&btfmcodec_dev->lock);
 	if (kstrtol(buf, 0, &tmp)) {
 		mutex_unlock(&btfmcodec_dev->lock);
-/*		BTFMCODEC_ERR("unable to convert string to int for /dev/%s\n",
-			      btfmcodec->dev->name);
-*/		return -EINVAL;
+		return -EINVAL;
 	}
 	mutex_unlock(&btfmcodec_dev->lock);
 
@@ -619,9 +617,9 @@ static void __exit btfmcodec_deinit(void)
 {
 	struct btfmcodec_char_device *btfmcodec_dev;
 	struct device *dev;
-	BTFMCODEC_INFO("cleaning up btfm codec driver", __func__);
+	BTFMCODEC_INFO("%s: cleaning up btfm codec driver", __func__);
 	if (!btfmcodec) {
-		BTFMCODEC_ERR("skiping driver cleanup", __func__);
+		BTFMCODEC_ERR("%s: skiping driver cleanup", __func__);
 		goto info_cleanup;
 	}
 
@@ -631,7 +629,7 @@ static void __exit btfmcodec_deinit(void)
 	put_device(dev);
 
 	if (!btfmcodec->btfmcodec_dev) {
-		BTFMCODEC_ERR("skiping device node cleanup", __func__);
+		BTFMCODEC_ERR("%s: skiping device node cleanup", __func__);
 		goto info_cleanup;
 	}
 
@@ -643,7 +641,7 @@ static void __exit btfmcodec_deinit(void)
 	kfree(btfmcodec_dev);
 info_cleanup:
 	kfree(btfmcodec);
-	BTFMCODEC_INFO("btfm codec driver cleanup completed", __func__);
+	BTFMCODEC_INFO("%s: btfm codec driver cleanup completed", __func__);
 	return;
 }
 

+ 1 - 1
btfmcodec/btfm_codec_btadv_interface.c

@@ -322,6 +322,6 @@ void btfmcodec_wq_prepare_bearer(struct work_struct *work)
 						struct btfmcodec_char_device,
 						wq_prepare_bearer);
 	int idx = BTM_PKT_TYPE_PREPARE_REQ;
-	BTFMCODEC_INFO(": with new transport:%d", btfmcodec_dev->status[idx]);
+	BTFMCODEC_INFO("with new transport:%d", btfmcodec_dev->status[idx]);
 	btfmcodec_prepare_bearer(btfmcodec_dev, btfmcodec_dev->status[idx]);
 }

+ 4 - 4
btfmcodec/btfm_codec_interface.c

@@ -75,7 +75,7 @@ static int btfmcodec_codec_probe(struct snd_soc_component *codec)
 	int num_mixer_ctrl = hwep_info->num_mixer_ctrl;
 	BTFMCODEC_DBG("");
 
-	// ToDo: check weather probe has to allowed when state if different
+	// ToDo: check Whether probe has to allowed when state if different
 	if (btfmcodec_get_current_transport(state)!= IDLE) {
 		BTFMCODEC_WARN("Received probe when state is :%s",
 			coverttostring(btfmcodec_get_current_transport(state)));
@@ -284,7 +284,7 @@ void btfmcodec_wq_hwep_shutdown(struct work_struct *work)
 		BTFMCODEC_INFO("shuting down dai id:%d", hwep_configs->stream_id);
 		ret = btfmcodec_hwep_shutdown(btfmcodec, hwep_configs->stream_id, true);
 		if (ret < 0) {
-			BTFMCODEC_ERR("failed to shutdown master with id", hwep_configs->stream_id);
+			BTFMCODEC_ERR("failed to shutdown master with id %d", hwep_configs->stream_id);
 			break;
 		}
 	}
@@ -657,7 +657,7 @@ void btfmcodec_wq_hwep_configure(struct work_struct *work)
 		if (ret >= 0)
 			ret = btfmcodec_hwep_prepare(btfmcodec, sample_rate, direction, id);
 		if (ret < 0) {
-			BTFMCODEC_ERR("failed to configure hwep", hwep_configs->stream_id);
+			BTFMCODEC_ERR("failed to configure hwep %d", hwep_configs->stream_id);
 			break;
 		}
 	}
@@ -753,7 +753,7 @@ int btfm_register_codec(struct hwep_data *hwep_info)
 	ret = snd_soc_register_component(dev, &btfmcodec_codec_component,
 					btfmcodec_dai_info, hwep_info->num_dai);
 	BTFMCODEC_INFO("Dev node address: %p", dev);
-	BTFMCODEC_INFO("btfmcodec address :%p, btfmcodec");
+	BTFMCODEC_INFO("btfmcodec address :%p", btfmcodec);
 	BTFMCODEC_INFO("HWEPINFO address:%p", hwep_info);
 	BTFMCODEC_INFO("btfmcodec_dev INFO address:%p", btfmcodec->btfmcodec_dev);
 	BTFMCODEC_INFO("before wq_hwep_shutdown:%p", btfmcodec_dev->wq_hwep_shutdown);