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: Xiaojun Sang <xsang@codeaurora.org>
This commit is contained in:
Xiaojun Sang 2016-08-30 15:31:56 +08:00 committed by Gerrit - the friendly Code Review server
parent 46692be6dd
commit 20a18f9828

View file

@ -496,7 +496,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));
@ -722,7 +722,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 {
@ -1544,7 +1544,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;
}
@ -1634,7 +1634,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;
}
@ -2075,7 +2075,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;
}
@ -2347,7 +2347,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;
}
@ -2997,7 +2997,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)) {