[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ssi/imx_spi: Removed unnecessary cast and fixed condition in

From: Peter Maydell
Subject: Re: [PATCH] ssi/imx_spi: Removed unnecessary cast and fixed condition in while statement
Date: Thu, 21 May 2020 19:56:23 +0100

On Thu, 21 May 2020 at 19:49, Eden Mikitas <address@hidden> wrote:
> The ecspi controller is supposed to support burst length of 1 to 4096 bits,
> meaning it is possible to configure it to use a value that isn't a multiple
> of 8 (to my understanding). In that case, since tx_burst is always
> decremented by 8, it will underflow. Sorry I didn't include an explanation.

Ah, yes, I misread the code. On the first time into the loop
tx_burst must be positive, but this is a while() condition
and on subsequent loops we might end up negative. So all
the code changes in this patch are correct, they just need
to be split into two commits I think.

> > This seems like a separate change to the first one;
> > in general unrelated changes should be each in their
> > own patch, rather than combined into a single patch.
> Should I resubmit this as a patch?

Yes, if you could submit a 2-patch patch series where
one patch is the fix for handling burst lengths which aren't
multiples of 8, and the other is the fix for saving all the
data into the rx fifo rather than just the low byte, that
would be great.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]