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

Commit 0db45a36 authored by Surendar karka's avatar Surendar karka
Browse files

ASoC: msm: qdsp6v2: Change audio drivers to use %pK



Change all qdsp6v2 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: Id6d45982cbe42a113e58c9b6509eb6ef8064aeef
Signed-off-by: default avatarSurendar karka <sukark@codeaurora.org>
parent 403033bb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2012, 2014, 2016 The Linux Foundation. All rights
 * reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -307,7 +308,7 @@ static int amrwb_in_open(struct inode *inode, struct file *file)
				(void *)audio);

	if (!audio->ac) {
		pr_err("%s:audio[%p]: Could not allocate memory for audio"
		pr_err("%s:audio[%pK]: Could not allocate memory for audio"
			"client\n", __func__, audio);
		kfree(audio->enc_cfg);
		kfree(audio);
+4 −4
Original line number Diff line number Diff line
@@ -221,10 +221,10 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
	}
	default: {
		pr_debug("%s[%p]: Calling utils ioctl\n", __func__, audio);
		pr_debug("%s[%pK]: Calling utils ioctl\n", __func__, audio);
		rc = audio->codec_ioctl(file, cmd, arg);
		if (rc)
			pr_err("%s[%p]:Failed in utils_ioctl: %d\n",
			pr_err("%s[%pK]:Failed in utils_ioctl: %d\n",
				__func__, audio, rc);
	}
	}
@@ -328,10 +328,10 @@ static long audio_compat_ioctl(struct file *file, unsigned int cmd,
		break;
	}
	default: {
		pr_debug("%s[%p]: Calling utils ioctl\n", __func__, audio);
		pr_debug("%s[%pK]: Calling utils ioctl\n", __func__, audio);
		rc = audio->codec_compat_ioctl(file, cmd, arg);
		if (rc)
			pr_err("%s[%p]:Failed in utils_ioctl: %d\n",
			pr_err("%s[%pK]:Failed in utils_ioctl: %d\n",
				__func__, audio, rc);
	}
	}
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static long audio_ioctl_shared(struct file *file, unsigned int cmd,
					__func__, audio->pcm_cfg.channel_count);
		}

		pr_debug("%s[%p]: AUDIO_START session_id[%d]\n", __func__,
		pr_debug("%s[%pK]: AUDIO_START session_id[%d]\n", __func__,
						audio, audio->ac->session);
		if (audio->feedback == NON_TUNNEL_MODE) {
			/* Configure PCM output block */
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

	switch (cmd) {
	case AUDIO_START: {
		pr_debug("%s[%p]: AUDIO_START session_id[%d]\n", __func__,
		pr_debug("%s[%pK]: AUDIO_START session_id[%d]\n", __func__,
						audio, audio->ac->session);
		if (audio->feedback == NON_TUNNEL_MODE) {
			/* Configure PCM output block */
@@ -62,7 +62,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
	}
	default:
		pr_debug("%s[%p]: Calling utils ioctl\n", __func__, audio);
		pr_debug("%s[%pK]: Calling utils ioctl\n", __func__, audio);
		rc = audio->codec_ioctl(file, cmd, arg);
	}
	return rc;
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

	switch (cmd) {
	case AUDIO_START: {
		pr_debug("%s[%p]: AUDIO_START session_id[%d]\n", __func__,
		pr_debug("%s[%pK]: AUDIO_START session_id[%d]\n", __func__,
						audio, audio->ac->session);
		if (audio->feedback == NON_TUNNEL_MODE) {
			/* Configure PCM output block */
@@ -65,7 +65,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
	}
	default:
		pr_debug("%s[%p]: Calling utils ioctl\n", __func__, audio);
		pr_debug("%s[%pK]: Calling utils ioctl\n", __func__, audio);
		rc = audio->codec_ioctl(file, cmd, arg);
	}
	return rc;
Loading