Re: [PATCH] mtd: spi-nor: cadence-quadspi: make return type fit wait_for_completion_timeout

From: Boris Brezillon
Date: Thu Jul 26 2018 - 16:09:44 EST


On Wed, 25 Jul 2018 06:31:37 +0000
Nicholas Mc Guire <der.herr@xxxxxxx> wrote:

> On Tue, Jul 24, 2018 at 10:46:26PM +0200, Boris Brezillon wrote:
> > On Sat, 21 Jul 2018 18:08:13 +0200
> > Nicholas Mc Guire <hofrat@xxxxxxxxx> wrote:
> >
> > > wait_for_completion_timeout returns an unsigned long not int. declare a
> > > suitably type timeout and fix up assignment and check.
> > >
> > > Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
> > > Reported-by: Vignesh R <vigneshr@xxxxxx>
> > > Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
> >
> > If you don't mind, I'd like to squash all wait_for_completion_timeout()
> > fixes into a single commit.
> >
> makes sense - no objections to that at all.


I also dropped the timeout vars and checked the return of
wait_for_completion_timeout() directly + removed the Fixes tag since
it's no longer possible to attach the fix to a single commit and also,
I'm sure the bug really existed (no overflow possible since the timeout
values are small enough to fit in a signed int).

Here is the resulting patch. Let me know if you're okay with this version.

Thanks,

Boris

--->8---