Re: [RFC PATCH] explicitly mark recursion count

Greg KH
2004-06-02T17:34:56Z

On Wed, Jun 02, 2004 at 07:17:32PM +0200, J?rn Engel wrote:
>
> Leaves usb_audio_recurseunit() as the only function in question, that
> one could actually be sane, although it looks rather interesting:
> WARNING: trivial recursion detected:
> 0 usb_audio_recurseunit
> WARNING: recursion detected:
> 16 usb_audio_selectorunit
> 0 usb_audio_recurseunit
> WARNING: multiple recursions around usb_audio_recurseunit()
> WARNING: recursion detected:
> 0 usb_audio_recurseunit
> 0 usb_audio_processingunit
>
> Greg, can you say whether this construct makes sense?

Well it's sane only if you think that USB descriptors can be sane :)

Anyway, this loop will always terminate as we have a finite sized USB
descriptor that this function is parsing. As to how many times we will
recurse, I don't really know as I haven't spent much time looking into
the different messed up USB audio devices out there on the market...

Sorry I can't be of more help, but I don't think you need to worry about
this function.

thanks,

greg k-h