Re: [PATCH] iio: trigger: Avoid data race
From: Gyeyoung Baek
Date: Wed May 28 2025 - 03:17:58 EST
On Wed, May 28, 2025 at 6:19 AM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Tue, May 27, 2025 at 11:10 PM Gyeyoung Baek <gye976@xxxxxxxxx> wrote:
> > On Wed, May 28, 2025 at 5:25 AM Andy Shevchenko
> > <andy.shevchenko@xxxxxxxxx> wrote:
> > > On Tue, May 27, 2025 at 10:05 PM Gyeyoung Baek <gye976@xxxxxxxxx> wrote:
>
> ...
>
> > > At bare minimum they are not relevant to the patch change and haven't
> > > been described in the commit messages.
> >
> > Hi Andy, thanks for your review.
> > I initially skipped this part as I thought it was minor.
> > But on a second look, it seems better to separate the declaration from
> > the logic.
> >
> > What do you think about the data race logic? Would it make sense?
>
> The point is valid, the atomic_read() + atomic_set() is 101 thingy,
> whoever did that doesn't really have a clue what atomic(ity) is.
Thanks for your explanation.
Then I’ll send a v2 patch with only the `int i` change, following the
review feedback.
--
Best regards,
Gyeyoung