linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <dan.carpenter@oracle.com>, <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH v2 2/2] mtd: spi-nor: Move condition to avoid a NULL check
Date: Mon, 11 Nov 2019 19:28:13 +0000	[thread overview]
Message-ID: <15f0d059-2bae-4ce2-6f42-2ec52e94307a@microchip.com> (raw)
In-Reply-To: <20191025142811.541-2-tudor.ambarus@microchip.com>



On 10/25/2019 05:28 PM, Tudor Ambarus - M18064 wrote:
> From: Tudor Ambarus <tudor.ambarus@microchip.com>
> 
> When the controller is not under the SPI-MEM interface it may implement
> the optional controller_ops->erase() method.
> 
> nor->spimem and nor->controller_ops are mutual exclusive. Move the
> nor->controller_ops->erase != NULL check as an 'else if' case to
> nor->spimem, in order to avoid the nor->controller_ops != NULL
> check.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> v2: add Reported-by tag, amend commit description.
> 
>  drivers/mtd/spi-nor/spi-nor.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Amended commit description, s/mutual/mutually. Patch applied to spi-nor/next.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2019-11-11 19:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:03 [bug report] mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' Dan Carpenter
2019-10-25 11:24 ` Tudor.Ambarus
2019-10-25 12:32   ` [PATCH] mtd: spi-nor: Move condition to avoid a NULL check Tudor.Ambarus
2019-10-25 12:37     ` Dan Carpenter
2019-10-25 14:28     ` [PATCH v2 1/2] mtd: spi-nor: Make sure nor->spimem and nor->controller_ops are mutual exclusive Tudor.Ambarus
2019-10-25 14:28       ` [PATCH v2 2/2] mtd: spi-nor: Move condition to avoid a NULL check Tudor.Ambarus
2019-11-11  9:08         ` Boris Brezillon
2019-11-11 19:28         ` Tudor.Ambarus [this message]
2019-11-11  9:02       ` [PATCH v2 1/2] mtd: spi-nor: Make sure nor->spimem and nor->controller_ops are mutual exclusive Boris Brezillon
2019-11-11  9:44         ` [PATCH] mtd: spi-nor: Make sure nor->spimem and nor->controller_ops are mutually exclusive Tudor.Ambarus
2019-11-11 15:59           ` Boris Brezillon
2019-11-11 19:26           ` Tudor.Ambarus

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=15f0d059-2bae-4ce2-6f42-2ec52e94307a@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).