* [PATCH] snd-usb-audio: fix comment reference in __uac_clock_find_source
@ 2021-09-25 2:33 Geraldo Nascimento
2021-09-28 8:46 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Geraldo Nascimento @ 2021-09-25 2:33 UTC (permalink / raw)
To: tiwai; +Cc: alsa-devel
snd_usb_find_clock_source and snd_usb_find_clock_selector are helper macros that
look at an entity id and validate that this entity id is in fact a clock source
or a clock selector. The present comments inside __uac_clock_find_source give
the reader the impression we're looking for an entity id.
We're looking for an entity id indeed, the clock source, but since
__uac_clock_find_source is recursive, we're also looking *at* the entity ids,
in the search for the one clock source.
Fix the comment so we don't give readers a wrong idea.
Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 81d5ce07d548..7dd71d342443 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -271,7 +271,7 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
return -EINVAL;
}
- /* first, see if the ID we're looking for is a clock source already */
+ /* first, see if the ID we're looking at is a clock source already */
source = snd_usb_find_clock_source(chip, entity_id, proto);
if (source) {
entity_id = GET_VAL(source, proto, bClockID);
@@ -297,7 +297,7 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
goto find_source;
}
- /* the entity ID we are looking for is a selector.
+ /* the entity ID we are looking at is a selector.
* find out what it currently selects */
ret = uac_clock_selector_get_val(chip, clock_id);
if (ret < 0) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] snd-usb-audio: fix comment reference in __uac_clock_find_source
2021-09-25 2:33 [PATCH] snd-usb-audio: fix comment reference in __uac_clock_find_source Geraldo Nascimento
@ 2021-09-28 8:46 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-09-28 8:46 UTC (permalink / raw)
To: Geraldo Nascimento; +Cc: alsa-devel
On Sat, 25 Sep 2021 04:33:51 +0200,
Geraldo Nascimento wrote:
>
> snd_usb_find_clock_source and snd_usb_find_clock_selector are helper macros that
> look at an entity id and validate that this entity id is in fact a clock source
> or a clock selector. The present comments inside __uac_clock_find_source give
> the reader the impression we're looking for an entity id.
>
> We're looking for an entity id indeed, the clock source, but since
> __uac_clock_find_source is recursive, we're also looking *at* the entity ids,
> in the search for the one clock source.
>
> Fix the comment so we don't give readers a wrong idea.
>
> Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
The patch couldn't be applied cleanly likely because your MUA
malformed the spaces. As the change itself is pretty trivial, I
applied manually now. But, please fix your MUA setup at the next
submission.
Thanks!
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-28 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 2:33 [PATCH] snd-usb-audio: fix comment reference in __uac_clock_find_source Geraldo Nascimento
2021-09-28 8:46 ` Takashi Iwai
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.