[PATCH v5] mtd: spi-nor: Add support for S3AN spi-nor devices

Boris Brezillon boris.brezillon at free-electrons.com
Tue Sep 20 09:09:49 PDT 2016


On Tue, 20 Sep 2016 17:45:55 +0200
Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com> wrote:

> Hi Boris
> 
> Thanks for your review.
> 
> On Tue, Sep 20, 2016 at 1:21 PM, Boris Brezillon
> <boris.brezillon at free-electrons.com> wrote:
> >>       int sr, fsr;
> >> -     sr = spi_nor_sr_ready(nor);
> >> +
> >> +     sr = nor->flags & SNOR_F_READY_XSR_RDY ? s3an_sr_ready(nor) :
> >> +                                              spi_nor_sr_ready(nor);  
> >
> > Nit: I find
> >
> >         if (nor->flags & SNOR_F_READY_XSR_RDY)
> >                 sr = s3an_sr_ready(nor);
> >         else
> >                 sr = spi_nor_sr_ready(nor);  
> 
> Fixed in v6
> 
> 
> >> +static loff_t spi_nor_s3an_addr_convert(struct spi_nor *nor, unsigned int addr)
> >> +{
> >> +     unsigned int offset;
> >> +
> >> +     offset = (nor->page_size == 264) ? (addr % 264) : (addr % 528);  
> >
> > Why not just
> >
> >         offset = addr % nor->page_size;
> >  
> 
> Because kbuild test robot does not like it ;)
> 
>         make.cross ARCH=blackfin
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/built-in.o: In function `spi_nor_write':
> >> drivers/mtd/spi-nor/spi-nor.c:1050: undefined reference to `__moddi3'  
> 
> vim +1050 drivers/mtd/spi-nor/spi-nor.c

Hm, that's weird, I would expect that if you were manipulating a 64 bit
type, but that's not the case here.

Are you sure you didn't change the type of the addr parameter at some
point?



More information about the linux-mtd mailing list