Linux Sound subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH v2?] ALSA: scarlett2: Add error check after retrieving PEQ filter values
  2024-10-09  7:32 [PATCH] " Zhu Jun
@ 2024-10-09  8:17 ` Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2024-10-09  8:17 UTC (permalink / raw)
  To: Zhu Jun, linux-sound, Geoffrey D. Bennett, Jaroslav Kysela,
	Takashi Iwai
  Cc: LKML, Mark Brown

> Add error check after retrieving PEQ filter values in scarlett2_update_filter_values
> that ensure function returns error if PEQ filter value retrieval fails

* It is usually preferred to end such a sentence with a dot, isn't it?

* Would you like to add any tags (like “Fixes” and “Cc”) accordingly?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc2#n145> ---
>  sound/usb/mixer_scarlett2.c | 3 +++

Please take version information better into account.

See also:
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc2#n321

* https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22> +++ b/sound/usb/mixer_scarlett2.c
> @@ -5614,6 +5614,9 @@ static int scarlett2_update_filter_values(struct usb_mixer_interface *mixer)
>  			SCARLETT2_BIQUAD_COEFFS,
>  		peq_flt_values);
>
> +	if (err < 0)
> +		return err;
> +
>  	for (i = 0, dst_idx = 0; i < info->dsp_input_count; i++) {
…

May a blank line be omitted before the return value check?

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values
@ 2024-10-09  9:23 Zhu Jun
  2024-10-09  9:52 ` Markus Elfring
  2024-10-11  9:18 ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Zhu Jun @ 2024-10-09  9:23 UTC (permalink / raw)
  To: perex; +Cc: tiwai, g, linux-sound, zhujun2, linux-kernel, stable

Add error check after retrieving PEQ filter values in scarlett2_update_filter_values
that ensure function returns error if PEQ filter value retrieval fails.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: <stable@vger.kernel.org>
---
V1 -> V2: 
- commit wit a dot
- add tag "Cc"
- delete a blank before the return value check

 sound/usb/mixer_scarlett2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index 1150cf104985..4cddf84db631 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -5613,6 +5613,8 @@ static int scarlett2_update_filter_values(struct usb_mixer_interface *mixer)
 			info->peq_flt_total_count *
 			SCARLETT2_BIQUAD_COEFFS,
 		peq_flt_values);
+	if (err < 0)
+		return err;
 
 	for (i = 0, dst_idx = 0; i < info->dsp_input_count; i++) {
 		src_idx = i *
-- 
2.17.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values
  2024-10-09  9:23 [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values Zhu Jun
@ 2024-10-09  9:52 ` Markus Elfring
  2024-10-11  9:18 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2024-10-09  9:52 UTC (permalink / raw)
  To: Zhu Jun, linux-sound, Geoffrey D. Bennett, Jaroslav Kysela,
	Takashi Iwai
  Cc: LKML, Mark Brown

…
> Cc: <stable@vger.kernel.org>

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc2#n262


> ---
> V1 -> V2:
> - commit wit a dot

A dot was appended to a change description.


> - add tag "Cc"
…

Do you expect that the tag “Fixes” will be added by an other contributor finally?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc2#n145

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values
  2024-10-09  9:23 [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values Zhu Jun
  2024-10-09  9:52 ` Markus Elfring
@ 2024-10-11  9:18 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2024-10-11  9:18 UTC (permalink / raw)
  To: Zhu Jun; +Cc: perex, tiwai, g, linux-sound, linux-kernel, stable

On Wed, 09 Oct 2024 11:23:05 +0200,
Zhu Jun wrote:
> 
> Add error check after retrieving PEQ filter values in scarlett2_update_filter_values
> that ensure function returns error if PEQ filter value retrieval fails.
> 
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> Cc: <stable@vger.kernel.org>

Applied now (with additional Fixes tag).


thanks,

Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-11  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09  9:23 [PATCH v2] ALSA: scarlett2: Add error check after retrieving PEQ filter values Zhu Jun
2024-10-09  9:52 ` Markus Elfring
2024-10-11  9:18 ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2024-10-09  7:32 [PATCH] " Zhu Jun
2024-10-09  8:17 ` [PATCH v2?] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox