All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Geoffrey D. Bennett" <g@b4.vu>
To: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>
Cc: Vladimir Sadovnikov <sadko4u@gmail.com>
Subject: [PATCH 4/8] ALSA: usb-audio: scarlett2: Remove interrupt debug message
Date: Mon, 7 Jun 2021 03:16:05 +0930	[thread overview]
Message-ID: <26c68450810d6cd3770bc895feb105a7eb94618a.1622999147.git.g@b4.vu> (raw)
In-Reply-To: <cover.1622999147.git.g@b4.vu>

Just ignore instead of printing an error if the interrupt data is not
the expected length. This check was for development and the condition
has not been observed.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
---
 sound/usb/mixer_scarlett_gen2.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index b134663f331a..3f1148bc0883 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -2019,19 +2019,14 @@ static void scarlett2_mixer_interrupt(struct urb *urb)
 	int ustatus = urb->status;
 	u32 data;
 
-	if (ustatus != 0)
+	if (ustatus != 0 || len != 8)
 		goto requeue;
 
-	if (len == 8) {
-		data = le32_to_cpu(*(__le32 *)urb->transfer_buffer);
-		if (data & SCARLETT2_USB_INTERRUPT_VOL_CHANGE)
-			scarlett2_mixer_interrupt_vol_change(mixer);
-		if (data & SCARLETT2_USB_INTERRUPT_BUTTON_CHANGE)
-			scarlett2_mixer_interrupt_button_change(mixer);
-	} else {
-		usb_audio_err(mixer->chip,
-			      "scarlett mixer interrupt length %d\n", len);
-	}
+	data = le32_to_cpu(*(__le32 *)urb->transfer_buffer);
+	if (data & SCARLETT2_USB_INTERRUPT_VOL_CHANGE)
+		scarlett2_mixer_interrupt_vol_change(mixer);
+	if (data & SCARLETT2_USB_INTERRUPT_BUTTON_CHANGE)
+		scarlett2_mixer_interrupt_button_change(mixer);
 
 requeue:
 	if (ustatus != -ENOENT &&
-- 
2.31.1


  parent reply	other threads:[~2021-06-06 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 17:44 [PATCH 0/8] ALSA: usb-audio: scarlett2: cleanup Geoffrey D. Bennett
2021-06-06 17:45 ` [PATCH 1/8] ALSA: usb-audio: scarlett2: Remove incorrect S/PDIF comment Geoffrey D. Bennett
2021-06-06 17:45 ` [PATCH 2/8] ALSA: usb-audio: scarlett2: Coding style improvements Geoffrey D. Bennett
2021-06-06 17:45 ` [PATCH 3/8] ALSA: usb-audio: scarlett2: Remove unused/useless code Geoffrey D. Bennett
2021-06-06 17:46 ` Geoffrey D. Bennett [this message]
2021-06-06 17:46 ` [PATCH 5/8] ALSA: usb-audio: scarlett2: Rename buttons/interrupts Geoffrey D. Bennett
2021-06-06 17:46 ` [PATCH 6/8] ALSA: usb-audio: scarlett2: Rename struct scarlett2_mixer_data Geoffrey D. Bennett
2021-06-06 17:46 ` [PATCH 7/8] ALSA: usb-audio: scarlett2: Add temp variable for consistency Geoffrey D. Bennett
2021-06-06 17:47 ` [PATCH 8/8] ALSA: usb-audio: scarlett2: Fix data_mutex lock Geoffrey D. Bennett

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=26c68450810d6cd3770bc895feb105a7eb94618a.1622999147.git.g@b4.vu \
    --to=g@b4.vu \
    --cc=alsa-devel@alsa-project.org \
    --cc=sadko4u@gmail.com \
    --cc=tiwai@suse.de \
    --subject='Re: [PATCH 4/8] ALSA: usb-audio: scarlett2: Remove interrupt debug message' \
    /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

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.