Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e29472b authored by Xiaojun Sang's avatar Xiaojun Sang Committed by Surendar karka
Browse files

ASoC: soc: change audio drivers to use %pK



Change all audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

CRs-Fixed: 1052832
Change-Id: I9ff5cf06b019c566973eb609bf5d37969b98d31d
Signed-off-by: default avatarXiaojun Sang <xsang@codeaurora.org>
parent 9e4b3ba4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2281,7 +2281,7 @@ int wcd_mbhc_start(struct wcd_mbhc *mbhc,
			schedule_delayed_work(&mbhc->mbhc_firmware_dwork,
				      usecs_to_jiffies(FW_READ_TIMEOUT));
		else
			pr_err("%s: Skipping to read mbhc fw, 0x%p %p\n",
			pr_err("%s: Skipping to read mbhc fw, 0x%pK %pK\n",
				 __func__, mbhc->mbhc_fw, mbhc->mbhc_cal);
	}
	pr_debug("%s: leave %d\n", __func__, rc);
+6 −6
Original line number Diff line number Diff line
@@ -5474,7 +5474,7 @@ static int tomtom_set_channel_map(struct snd_soc_dai *dai,
	struct tomtom_priv *tomtom = snd_soc_codec_get_drvdata(dai->codec);
	struct wcd9xxx *core = dev_get_drvdata(dai->codec->dev->parent);
	if (!tx_slot || !rx_slot) {
		pr_err("%s: Invalid tx_slot=%p, rx_slot=%p\n",
		pr_err("%s: Invalid tx_slot=%pK, rx_slot=%pK\n",
			__func__, tx_slot, rx_slot);
		return -EINVAL;
	}
@@ -5519,7 +5519,7 @@ static int tomtom_get_channel_map(struct snd_soc_dai *dai,
	case AIF2_PB:
	case AIF3_PB:
		if (!rx_slot || !rx_num) {
			pr_err("%s: Invalid rx_slot %p or rx_num %p\n",
			pr_err("%s: Invalid rx_slot %pK or rx_num %pK\n",
				 __func__, rx_slot, rx_num);
			return -EINVAL;
		}
@@ -5538,7 +5538,7 @@ static int tomtom_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_VIFEED:
	case AIF4_MAD_TX:
		if (!tx_slot || !tx_num) {
			pr_err("%s: Invalid tx_slot %p or tx_num %p\n",
			pr_err("%s: Invalid tx_slot %pK or tx_num %pK\n",
				 __func__, tx_slot, tx_num);
			return -EINVAL;
		}
@@ -8228,7 +8228,7 @@ static void tomtom_compute_impedance(struct wcd9xxx_mbhc *mbhc, s16 *l, s16 *r,
	struct tomtom_priv *tomtom;

	if (!mbhc) {
		pr_err("%s: Invalid parameters mbhc = %p\n",
		pr_err("%s: Invalid parameters mbhc = %pK\n",
			__func__,  mbhc);
		return;
	}
@@ -8287,7 +8287,7 @@ static void tomtom_zdet_error_approx(struct wcd9xxx_mbhc *mbhc, uint32_t *zl,
	const int shift = TOMTOM_ZDET_ERROR_APPROX_SHIFT;

	if (!zl || !zr || !mbhc) {
		pr_err("%s: Invalid parameters zl = %p zr = %p, mbhc = %p\n",
		pr_err("%s: Invalid parameters zl = %pK zr = %pK, mbhc = %pK\n",
			__func__, zl, zr, mbhc);
		return;
	}
@@ -8602,7 +8602,7 @@ static int tomtom_codec_fll_enable(struct snd_soc_codec *codec,
	struct wcd9xxx *wcd9xxx;

	if (!codec || !codec->control_data) {
		pr_err("%s: Invalid codec handle, %p\n",
		pr_err("%s: Invalid codec handle, %pK\n",
		       __func__, codec);
		return -EINVAL;
	}
+3 −3
Original line number Diff line number Diff line
@@ -10727,7 +10727,7 @@ static int tasha_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_PB:
	case AIF_MIX1_PB:
		if (!rx_slot || !rx_num) {
			pr_err("%s: Invalid rx_slot %p or rx_num %p\n",
			pr_err("%s: Invalid rx_slot %pK or rx_num %pK\n",
				 __func__, rx_slot, rx_num);
			return -EINVAL;
		}
@@ -10746,7 +10746,7 @@ static int tasha_get_channel_map(struct snd_soc_dai *dai,
	case AIF4_MAD_TX:
	case AIF4_VIFEED:
		if (!tx_slot || !tx_num) {
			pr_err("%s: Invalid tx_slot %p or tx_num %p\n",
			pr_err("%s: Invalid tx_slot %pK or tx_num %pK\n",
				 __func__, tx_slot, tx_num);
			return -EINVAL;
		}
@@ -10784,7 +10784,7 @@ static int tasha_set_channel_map(struct snd_soc_dai *dai,
	core = dev_get_drvdata(dai->codec->dev->parent);

	if (!tx_slot || !rx_slot) {
		pr_err("%s: Invalid tx_slot=%p, rx_slot=%p\n",
		pr_err("%s: Invalid tx_slot=%pK, rx_slot=%pK\n",
			__func__, tx_slot, rx_slot);
		return -EINVAL;
	}
+2 −2
Original line number Diff line number Diff line
@@ -4675,7 +4675,7 @@ int wcd9xxx_mbhc_start(struct wcd9xxx_mbhc *mbhc,
			schedule_delayed_work(&mbhc->mbhc_firmware_dwork,
					     usecs_to_jiffies(FW_READ_TIMEOUT));
		else
			pr_debug("%s: Skipping to read mbhc fw, 0x%p %p\n",
			pr_debug("%s: Skipping to read mbhc fw, 0x%pK %pK\n",
				 __func__, mbhc->mbhc_fw, mbhc->mbhc_cal);
	}

@@ -5073,7 +5073,7 @@ static int wcd9xxx_remeasure_z_values(struct wcd9xxx_mbhc *mbhc,
	right = !!(r);

	dev_dbg(codec->dev, "%s: Remeasuring impedance values\n", __func__);
	dev_dbg(codec->dev, "%s: l: %p, r: %p, left=%d, right=%d\n", __func__,
	dev_dbg(codec->dev, "%s: l: %pK, r: %pK, left=%d, right=%d\n", __func__,
		 l, r, left, right);

	/* Remeasure V2 values */
+1 −1
Original line number Diff line number Diff line
@@ -472,7 +472,7 @@ static int wcd_cpe_load_fw(struct wcd_cpe_core *core,
	bool load_segment;

	if (!core || !core->cpe_handle) {
		pr_err("%s: Error CPE core %p\n", __func__,
		pr_err("%s: Error CPE core %pK\n", __func__,
		       core);
		return -EINVAL;
	}
Loading