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

From: Markus Elfring

Date: Fri Aug 21 2026 - 14:12:21 EST



> +++ 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