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

Commit f16a5252 authored by Xiaojun Sang's avatar Xiaojun Sang
Browse files

ASoC: soc: change audio cpe drivers to use %pK



Change cpe 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: I741d9e5c5b415011348e862c3f1ee4fe28c3969f
Signed-off-by: default avatarXiaojun Sang <xsang@codeaurora.org>
parent 14f889c8
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ static int msm_cpe_lab_buf_alloc(struct snd_pcm_substream *substream,
		pcm_buf[count].mem = pcm_buf[0].mem + (count * bufsz);
		pcm_buf[count].phys = pcm_buf[0].phys + (count * bufsz);
		dev_dbg(rtd->dev,
			"%s: pcm_buf[%d].mem %p pcm_buf[%d].phys %pa\n",
			"%s: pcm_buf[%d].mem %pK pcm_buf[%d].phys %pK\n",
			 __func__, count,
			(void *)pcm_buf[count].mem,
			count, &(pcm_buf[count].phys));
@@ -733,7 +733,7 @@ static int msm_cpe_lab_thread(void *data)
			cur_buf = &lab_d->pcm_buf[buf_count % prd_cnt];
			next_buf = &lab_d->pcm_buf[(buf_count + 2) % prd_cnt];
			dev_dbg(rtd->dev,
				"%s: Cur buf.mem = %p Next Buf.mem = %p\n"
				"%s: Cur buf.mem = %pK Next Buf.mem = %pK\n"
				" buf count = 0x%x\n", __func__,
				cur_buf->mem, next_buf->mem, buf_count);
		} else {
@@ -1548,7 +1548,7 @@ static int msm_cpe_lsm_lab_start(struct snd_pcm_substream *substream,
	int rc;

	if (!substream || !substream->private_data) {
		pr_err("%s: invalid substream (%p)\n",
		pr_err("%s: invalid substream (%pK)\n",
			__func__, substream);
		return -EINVAL;
	}
@@ -1638,7 +1638,7 @@ static bool msm_cpe_lsm_is_valid_stream(struct snd_pcm_substream *substream,
	struct wcd_cpe_lsm_ops *lsm_ops;

	if (!substream || !substream->private_data) {
		pr_err("%s: invalid substream (%p)\n",
		pr_err("%s: invalid substream (%pK)\n",
			func, substream);
		return false;
	}
@@ -2079,7 +2079,7 @@ static int msm_cpe_lsm_ioctl(struct snd_pcm_substream *substream,
	struct wcd_cpe_lsm_ops *lsm_ops;

	if (!substream || !substream->private_data) {
		pr_err("%s: invalid substream (%p)\n",
		pr_err("%s: invalid substream (%pK)\n",
			__func__, substream);
		return -EINVAL;
	}
@@ -2351,7 +2351,7 @@ static int msm_cpe_lsm_ioctl_compat(struct snd_pcm_substream *substream,
	struct wcd_cpe_lsm_ops *lsm_ops;

	if (!substream || !substream->private_data) {
		pr_err("%s: invalid substream (%p)\n",
		pr_err("%s: invalid substream (%pK)\n",
			__func__, substream);
		return -EINVAL;
	}
@@ -3001,7 +3001,7 @@ static int msm_cpe_lsm_copy(struct snd_pcm_substream *substream, int a,
	if (lab_d->buf_idx >= (lsm_d->hw_params.period_count))
		lab_d->buf_idx = 0;
	pcm_buf = (lab_d->pcm_buf[lab_d->buf_idx].mem);
	pr_debug("%s: Buf IDX = 0x%x pcm_buf %p\n",
	pr_debug("%s: Buf IDX = 0x%x pcm_buf %pK\n",
		 __func__,  lab_d->buf_idx, pcm_buf);
	if (pcm_buf) {
		if (copy_to_user(buf, pcm_buf, fbytes)) {