lkml.org 
[lkml]   [2020]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id()
On Fri, Feb 21, 2020 at 04:50:37PM +0000, Tudor.Ambarus@microchip.com 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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-02-22 22:52    [W:0.040 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site