Re: [RFC PATCH] ALSA: pci: add PreSonus Quantum PCI driver

Markus Elfring <[email protected]>
Newsgroups org.kernel.vger.linux-sound,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
…
> +++ b/sound/pci/quantum/quantum_dma.c
> @@ -0,0 +1,853 @@
…
> +static void quantum_free_stream_pages(struct quantum_chip *chip,
> +				      struct quantum_stream *stream)
> +{
> +	u32 i;

I suggest to move this variable declaration into the subsequent for loop header.


> +	bool gone = pci_dev_is_disconnected(chip->pci);

I suggest to omit this variable definition. The mentioned function call
can be applied directly for a subsequent condition check (like it is also performed
in the implementation of the function “quantum_free_page_table”).


> +
> +	if (!stream->owns_pages)
> +		goto reset;
…
> +	if (!gone) {
> +		for (i = 0; i < stream->num_pages; i++)
…


Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.