Skip to contentSkip to conversation

ALSA: usb: fcp: Fix hwdep read ops argument

PATCH In review Takashi Iwai 1 participant 2 messages Jan 19, 2025 – Jan 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb: fcp: Fix hwdep read ops argument

The hwdep read ops argument is long instead of ssize_t due to historical reason. Fix the build error.

Fixes 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver")
---
 sound/usb/fcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/fcp.c +1 -1
index 655e4f7338ed..eb6a5c1f9b21 100644
@@ -816,7 +816,7 @@ static int fcp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
 }
 
 static ssize_t fcp_hwdep_read(struct snd_hwdep *hw, char __user *buf,
-			      ssize_t count, loff_t *offset)
+			      long count, loff_t *offset)
 {
 	struct usb_mixer_interface *mixer = hw->private_data;
 	struct fcp_data *private = mixer->private_data;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 17 lines · Takashi Iwai

The hwdep read ops argument is long instead of ssize_t due to historical reason. Fix the build error.

Fixes 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver")
---
 sound/usb/fcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/fcp.c +0 -0
index 655e4f7338ed..eb6a5c1f9b21 100644

sound/usb/fcp.c static int fcp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, · line 822

Quoted 8 lines
sound/usb/fcp.c +1 -1
@@ -816,7 +816,7 @@ static int fcp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
 }
 
 static ssize_t fcp_hwdep_read(struct snd_hwdep *hw, char __user *buf,
-			      ssize_t count, loff_t *offset)
+			      long count, loff_t *offset)
 {
 	struct usb_mixer_interface *mixer = hw->private_data;
 	struct fcp_data *private = mixer->private_data;

Gah, that wasn't enough, a few other ssize_t had to be replaced with long. Stephen already submitted the fix patch for linux-next, and I'll take it instead.

Takashi