Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Suraj Sonawane <surajsonawane0215@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound: fix uninit-value in i2s_dma_isr
Date: Sat, 2 Nov 2024 18:10:02 +0530	[thread overview]
Message-ID: <5ec78b57-725e-4d64-8b3f-c16ead77dfb2@gmail.com> (raw)
In-Reply-To: <15f9733b-fe7a-4bf2-a6b9-7f7e04cf26f7@sirena.org.uk>

On 01/11/24 18:45, Mark Brown wrote:
> On Fri, Nov 01, 2024 at 02:32:43PM +0530, Suraj Sonawane wrote:
> 
>> I reviewed the context around val_1 and val_2 in dma_addr_next. These values
>> are expected to come from the registers when offlevel is non-zero,
>> representing the next DMA address and length information. If offlevel is
>> zero, it means there’s no offset data to process, and dma_addr_next might
>> not need updating in that case.
> 
>> A more precise solution would be to conditionally update prtd->dma_addr_next
>> only when offlevel is non-zero, as this would reflect the intended logic
>> without relying on an arbitrary initialization.
> 
>> Would it be better to revise the patch to conditionally update
>> prtd->dma_addr_next only when offlevel is non-zero?
> 
>> Let me know if this approach aligns better with the expected behavior.
> 
> That seems like a reasonable approach, just skip the update when we
> didn't read the values.
Thanks for the feedback.

I've updated the patch based on your suggestion to conditionally update 
prtd->dma_addr_next only when offlevel is non-zero, effectively skipping 
the update if values were not read. This approach aligns with the 
expected logic, as it ensures dma_addr_next is only updated when valid 
data is available, preventing any unintended updates.

I’ve just sent the revised patch. Please let me know if any additional 
adjustments are needed.

Best regards,
Suraj Sonawane

  reply	other threads:[~2024-11-02 12:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 17:08 [PATCH] sound: fix uninit-value in i2s_dma_isr Suraj Sonawane
2024-10-30 17:14 ` Mark Brown
2024-10-31  6:47   ` Suraj Sonawane
2024-10-31 16:17     ` Mark Brown
2024-11-01  9:02       ` Suraj Sonawane
2024-11-01 13:15         ` Mark Brown
2024-11-02 12:40           ` Suraj Sonawane [this message]
2024-11-02 12:36 ` [PATCH v2] " Suraj Sonawane
2024-11-04 12:41   ` Mark Brown
2024-11-05 11:03     ` Suraj Sonawane
2024-11-05 16:38   ` Mark Brown
2024-11-06  8:24     ` Suraj Sonawane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ec78b57-725e-4d64-8b3f-c16ead77dfb2@gmail.com \
    --to=surajsonawane0215@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox