On Fri, 02 Aug 2024 08:03, Volker Rümelin <vr_q...@t-online.de> wrote:
Am 01.08.24 um 10:22 schrieb Michael S. Tsirkin:
On Sat, Jul 27, 2024 at 08:55:10AM +0200, Volker Rümelin wrote: >>>>
Hi Manos,

this patch doesn't work as intended. I guess you wanted to write

    if (params->format >= sizeof(supported_formats) * BITS_PER_BYTE ||
        !(supported_formats & BIT(params->format))) {

+    if (BIT(params->format) > sizeof(supported_formats) ||
+        !(supported_formats & BIT(params->format))) {
         error_report("Stream format is not supported.");
         return cpu_to_le32(VIRTIO_SND_S_NOT_SUPP);
     }
-    if (!(supported_rates & BIT(params->rate))) {
    if (params->rate >= sizeof(supported_rates) * BITS_PER_BYTE ||
        !(supported_rates & BIT(params->rate))) {

With best regards,
Volker

Any response here? Should I revert?

No response so far. It's not necessary to revert. I'll send a patch.

With best regards,
Volker

Hello, I am on PTO. I reviewed Volker's patch, and it LGTM.

Thank you both,
Manos

Reply via email to