Re: [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id()

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

 



On Fri, Feb 21, 2020 at 04:50:37PM +0000, Tudor.Ambarus@xxxxxxxxxxxxx wrote:
> > > >         const struct flash_info *info;
> 
> how about getting rid of this local variable? Use in the function something 
> like:
> 
>                 if (spi_nor_ids[i].id_len &&
>                     !memcmp(spi_nor_ids[i].id, id, spi_nor_ids[i].id_len)
>                     return &spi_nor_ids[i];

Looks alright. I'll do it.


Jonathan

Attachment: signature.asc
Description: PGP signature

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux