Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <michael@walle.cc>, <vigneshr@ti.com>
Cc: richard@nod.at, computersforpeace@gmail.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	miquel.raynal@bootlin.com
Subject: Re: [PATCH 2/2] mtd: spi-nor: fix locking argument in spi_nor_is_locked()
Date: Mon, 13 Jan 2020 11:09:04 +0000
Message-ID: <5175555.c6S9m0lmIv@localhost.localdomain> (raw)
In-Reply-To: <7344bb68b2714755a736e8d27e06aa8e@walle.cc>

On Monday, January 13, 2020 12:19:47 PM EET Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> Am 2020-01-13 11:10, schrieb Tudor.Ambarus@microchip.com:
> > Hi, Michael,
> > 
> > On Wednesday, January 8, 2020 12:23:17 AM EET Michael Walle wrote:
> >> diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
> >> index b661fd948a25..a8fcb1d70510 100644
> >> --- a/include/linux/mtd/spi-nor.h
> >> +++ b/include/linux/mtd/spi-nor.h
> >> @@ -235,6 +235,7 @@ enum spi_nor_ops {
> >> 
> >>         SPI_NOR_OPS_ERASE,
> >>         SPI_NOR_OPS_LOCK,
> >>         SPI_NOR_OPS_UNLOCK,
> >> 
> >> +       SPI_NOR_OPS_IS_LOCKED,
> >> 
> >>  };
> > 
> > There is no NOR controller that uses this enum, can we get rid of it?
> 
> you mean the second argument of the spi_nor_lock_and_prep() and
> spi_nor_unlock_and_unprep()? sure. But it removes information from the

yes

> prepare() callback. like in "prepare what?". From what I see its only

Prepare the controller for whatever op. As I see, it is used for taking a bus 
mutex and for enabling some clock.
 
> used for locking. Maybe then rename it to prepare_lock and
> prepare_unlock.
> 

I would keep the function name as it is. Maybe Vignesh has some other opinion 
on this?

Cheers,
ta



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

      reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 22:23 [PATCH 1/2] mtd: spi-nor: fix spi_nor_lock_and_prep() usage Michael Walle
2020-01-07 22:23 ` [PATCH 2/2] mtd: spi-nor: fix locking argument in spi_nor_is_locked() Michael Walle
2020-01-13 10:10   ` Tudor.Ambarus
2020-01-13 10:19     ` Michael Walle
2020-01-13 11:09       ` Tudor.Ambarus [this message]

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=5175555.c6S9m0lmIv@localhost.localdomain \
    --to=tudor.ambarus@microchip.com \
    --cc=computersforpeace@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --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

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git