On Mon, Sep 27, 2021 at 5:21 PM Bin Meng wrote:
>
> At present the codes detect whether the DMA channel is claimed by:
>
> claimed = !!s->chan[ch].control & CONTROL_CLAIM;
>
> As ! has higher precedence over & (bitwise and), this is essentially
>
> claimed = (!!s->chan[ch].control) &
Hi Philippe,
On Mon, Sep 27, 2021 at 8:56 PM Philippe Mathieu-Daudé wrote:
>
> On 9/27/21 09:21, Bin Meng wrote:
> > At present the codes detect whether the DMA channel is claimed by:
> >
> > claimed = !!s->chan[ch].control & CONTROL_CLAIM;
> >
> > As ! has higher precedence over & (bitwise
On 9/27/21 09:21, Bin Meng wrote:
> At present the codes detect whether the DMA channel is claimed by:
>
> claimed = !!s->chan[ch].control & CONTROL_CLAIM;
>
> As ! has higher precedence over & (bitwise and), this is essentially
>
> claimed = (!!s->chan[ch].control) & CONTROL_CLAIM;
>
>
At present the codes detect whether the DMA channel is claimed by:
claimed = !!s->chan[ch].control & CONTROL_CLAIM;
As ! has higher precedence over & (bitwise and), this is essentially
claimed = (!!s->chan[ch].control) & CONTROL_CLAIM;
which is wrong, as any non-zero bit set in the control