Re: [PATCH v3 5/8] MTD: xway: fix nand locking

Boris Brezillon
2016-06-19T16:40:55Z

On Sun, 19 Jun 2016 18:34:30 +0200
Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >> @@ -113,14 +115,8 @@ static unsigned char xway_read_byte(struct mtd_info *mtd)
> >> {
> >> struct nand_chip *this = mtd_to_nand(mtd);
> >> unsigned long nandaddr = (unsigned long) this->IO_ADDR_R;
> >> - unsigned long flags;
> >> - int ret;
> >>
> >> - spin_lock_irqsave(&ebu_lock, flags);
> >> - ret = ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));
> >> - spin_unlock_irqrestore(&ebu_lock, flags);
> >> -
> >> - return ret;
> >> + return ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));
> >
> > Drop the cast and use this->IO_ADDR_R here.
>
> This will be done in the following patch, here I am only chaining the
> locking.

My bad, you're right.