All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [alsa-devel] [PATCH 2/5] ALSA: hdsp: Make uapi/hdsp.h compilable again
Date: Fri, 20 Dec 2019 16:34:12 +0100	[thread overview]
Message-ID: <20191220153415.2740-3-tiwai@suse.de> (raw)
In-Reply-To: <20191220153415.2740-1-tiwai@suse.de>

Recently alsa-lib updated its content of sound/hdsp.h just by copying
the latest Linus kernel uapi/*.h, and this broke the build of
alsa-tools programs.  We used to modify the headers so that they can
be built without asoundlib.h and linux kernel headers, and the
verbatim copy doesn't work as is.

This patch removes again the linux/types.h inclusion and drop __user
prefix that broke the build and adjusts the corresponding code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/uapi/sound/hdsp.h | 4 +---
 sound/pci/rme9652/hdsp.c  | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/uapi/sound/hdsp.h b/include/uapi/sound/hdsp.h
index 5dc0c3db0a4c..88c92a3fb477 100644
--- a/include/uapi/sound/hdsp.h
+++ b/include/uapi/sound/hdsp.h
@@ -20,8 +20,6 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <linux/types.h>
-
 #define HDSP_MATRIX_MIXER_SIZE 2048
 
 enum HDSP_IO_Type {
@@ -74,7 +72,7 @@ struct hdsp_config_info {
 #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
 
 struct hdsp_firmware {
-	void __user *firmware_data;	/* 24413 x 4 bytes */
+	void *firmware_data;	/* 24413 x 4 bytes */
 };
 
 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 87e60dd13066..b4c42c4fa201 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4817,7 +4817,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
 			 "initializing firmware upload\n");
 		firmware = (struct hdsp_firmware __user *)argp;
 
-		if (get_user(firmware_data, &firmware->firmware_data))
+		if (get_user(firmware_data, (__force void __user **)&firmware->firmware_data))
 			return -EFAULT;
 
 		if (hdsp_check_for_iobox (hdsp))
-- 
2.16.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-12-20 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 15:34 [alsa-devel] [PATCH 0/5] ALSA: Fix uapi headers Takashi Iwai
2019-12-20 15:34 ` [alsa-devel] [PATCH 1/5] ALSA: emu10k1: Make uapi/emu10k1.h compilable again Takashi Iwai
2019-12-20 15:34 ` Takashi Iwai [this message]
2019-12-20 15:34 ` [alsa-devel] [PATCH 3/5] ALSA: hdspm: Drop linux/types.h inclusion in uapi header Takashi Iwai
2019-12-20 15:34 ` [alsa-devel] [PATCH 4/5] ALSA: uapi: Fix typos and header inclusion in asound.h Takashi Iwai
2019-12-20 15:34 ` [alsa-devel] [PATCH 5/5] ALSA: uapi: Drop asound.h inclusion from asoc.h Takashi Iwai
2020-03-30 16:53   ` Dmitry V. Levin
2020-03-30 19:11     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191220153415.2740-3-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.