All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Tudor.Ambarus@microchip.com
Cc: vigneshr@ti.com, richard@nod.at, j.neuschaefer@gmx.net,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com
Subject: Re: [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id()
Date: Sat, 22 Feb 2020 22:51:48 +0100	[thread overview]
Message-ID: <20200222215148.GH2031@latitude> (raw)
In-Reply-To: <5932130.I5bQ6OmJFL@localhost.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

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

WARNING: multiple messages have this Message-ID (diff)
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Tudor.Ambarus@microchip.com
Cc: j.neuschaefer@gmx.net, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id()
Date: Sat, 22 Feb 2020 22:51:48 +0100	[thread overview]
Message-ID: <20200222215148.GH2031@latitude> (raw)
In-Reply-To: <5932130.I5bQ6OmJFL@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-02-22 21:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 15:10 [PATCH] mtd: spi-nor: Simplify loop in spi_nor_read_id() Jonathan Neuschäfer
2020-02-18 15:10 ` Jonathan Neuschäfer
2020-02-19  8:06 ` Tudor.Ambarus
2020-02-19  8:06   ` Tudor.Ambarus
2020-02-21 16:22   ` Jonathan Neuschäfer
2020-02-21 16:22     ` Jonathan Neuschäfer
2020-02-21 16:50     ` Tudor.Ambarus
2020-02-21 16:50       ` Tudor.Ambarus
2020-02-22 21:51       ` Jonathan Neuschäfer [this message]
2020-02-22 21:51         ` Jonathan Neuschäfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200222215148.GH2031@latitude \
    --to=j.neuschaefer@gmx.net \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.