All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org,
	Hartley Sweeten <hsweeten@visionengravers.com>,
	Ryan Mallon <rmallon@gmail.com>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Imre Kaloz <kaloz@openwrt.org>,
	Krzysztof Halasa <khalasa@piap.pl>,
	Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org,
	Alexander Clouter <alex@digriz.org.uk>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Gregory CLEMENT <gregory.clement@free-electrons.com>,
	Jason Cooper <jason@lakedaemon.net>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Marek Vasut <marek.vasut@gmail.com>,
	Steven Miao <realmz6@gmail.com>,
	adi-buildroot-devel@lists.sourceforge.net,
	Mikael Starvik <starvik@axis.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	linux-cris-kernel@axis.com, Josh Wu <josh.wu@atmel.com>,
	Wan ZongShun <mcuos.com@gmail.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-sunxi@googlegroups.com, Stefan Agner <stefan@agner.ch>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()
Date: Mon, 16 Nov 2015 14:37:36 +0100	[thread overview]
Message-ID: <1447681080-31232-4-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1447681080-31232-1-git-send-email-boris.brezillon@free-electrons.com>

mtd_to_nand() has been introduced to hide accesses to mtd->priv.
All NAND controller drivers should use it instead of directly accessing
the ->priv field.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 Documentation/DocBook/mtdnand.tmpl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 7da8f04..403a7ab 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -235,7 +235,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 		<programlisting>
 static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	switch(cmd){
 		case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT;  break;
 		case NAND_CTL_CLRCLE: this->IO_ADDR_W &amp;= ~CLE_ADRR_BIT; break;
@@ -399,7 +399,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
 		<programlisting>
 static void board_select_chip (struct mtd_info *mtd, int chip)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	
 	/* Deselect all chips */
 	this->IO_ADDR_R &amp;= ~BOARD_NAND_ADDR_MASK;
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linux-doc@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	Stefan Agner <stefan@agner.ch>,
	linux-sunxi@googlegroups.com,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Alexander Clouter <alex@digriz.org.uk>,
	devel@driverdev.osuosl.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	linux-samsung-soc@vger.kernel.org,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Marek Vasut <marek.vasut@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
	Kukjin Kim <kgene@kernel.org>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Josh Wu <josh.wu@atmel.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Jason Cooper <jason@lakedaemon.net>,
	Wan ZongShun <mcuos.com@gmail.com>,
	Steven Miao <realmz6@gmail.com>,
	adi-buildroot-devel@li
Subject: [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()
Date: Mon, 16 Nov 2015 14:37:36 +0100	[thread overview]
Message-ID: <1447681080-31232-4-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1447681080-31232-1-git-send-email-boris.brezillon@free-electrons.com>

mtd_to_nand() has been introduced to hide accesses to mtd->priv.
All NAND controller drivers should use it instead of directly accessing
the ->priv field.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 Documentation/DocBook/mtdnand.tmpl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 7da8f04..403a7ab 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -235,7 +235,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 		<programlisting>
 static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	switch(cmd){
 		case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT;  break;
 		case NAND_CTL_CLRCLE: this->IO_ADDR_W &amp;= ~CLE_ADRR_BIT; break;
@@ -399,7 +399,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
 		<programlisting>
 static void board_select_chip (struct mtd_info *mtd, int chip)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	
 	/* Deselect all chips */
 	this->IO_ADDR_R &amp;= ~BOARD_NAND_ADDR_MASK;
-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()
Date: Mon, 16 Nov 2015 14:37:36 +0100	[thread overview]
Message-ID: <1447681080-31232-4-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1447681080-31232-1-git-send-email-boris.brezillon@free-electrons.com>

mtd_to_nand() has been introduced to hide accesses to mtd->priv.
All NAND controller drivers should use it instead of directly accessing
the ->priv field.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 Documentation/DocBook/mtdnand.tmpl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 7da8f04..403a7ab 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -235,7 +235,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 		<programlisting>
 static void board_hwcontrol(struct mtd_info *mtd, int cmd)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	switch(cmd){
 		case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT;  break;
 		case NAND_CTL_CLRCLE: this->IO_ADDR_W &amp;= ~CLE_ADRR_BIT; break;
@@ -399,7 +399,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
 		<programlisting>
 static void board_select_chip (struct mtd_info *mtd, int chip)
 {
-	struct nand_chip *this = (struct nand_chip *) mtd->priv;
+	struct nand_chip *this = mtd_to_nand(mtd);
 	
 	/* Deselect all chips */
 	this->IO_ADDR_R &amp;= ~BOARD_NAND_ADDR_MASK;
-- 
2.1.4

  parent reply	other threads:[~2015-11-16 13:38 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 13:37 [PATCH 00/27] mtd: nand: refactor the NAND subsystem (part 1) Boris Brezillon
2015-11-16 13:37 ` Boris Brezillon
2015-11-16 13:37 ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 01/27] mtd: nand: fix drivers abusing mtd->priv Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-19 19:07   ` Brian Norris
2015-11-19 19:07     ` Brian Norris
2015-11-19 19:07     ` Brian Norris
2015-11-16 13:37 ` [PATCH 02/27] mtd: nand: add an mtd_to_nand() helper Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-19 19:19   ` Brian Norris
2015-11-19 19:19     ` Brian Norris
2015-11-19 19:19     ` Brian Norris
2015-11-16 13:37 ` Boris Brezillon [this message]
2015-11-16 13:37   ` [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand() Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-19 19:22   ` Brian Norris
2015-11-19 19:22     ` Brian Norris
2015-11-19 19:22     ` Brian Norris
2015-11-16 13:37 ` [PATCH 04/27] ARM: nand: make use of mtd_to_nand() where appropriate Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 05/27] blackfin: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 06/27] cris: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 07/27] mips: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 08/27] sh: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 09/27] mtd: nand: make use of mtd_to_nand() in NAND core code Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 10/27] mtd: nand: make use of mtd_to_nand() in NAND drivers Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 11/27] staging: mt29f_spinand: make use of mtd_to_nand() Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 12/27] mtd: nand: embed an mtd_info structure into nand_chip Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 13/27] mtd: nand: add nand_to_mtd() helper Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 14/27] mtd: nand: use the mtd instance embedded in struct nand_chip Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-17  3:00   ` Brian Norris
2015-11-17  3:00     ` Brian Norris
2015-11-17  3:00     ` Brian Norris
2015-11-17  8:38     ` Boris Brezillon
2015-11-17  8:38       ` Boris Brezillon
2015-11-17  8:38       ` Boris Brezillon
2015-11-17  9:05       ` Julia Lawall
2015-11-17  9:05         ` Julia Lawall
2015-11-17  9:05         ` Julia Lawall
2015-11-17 14:22         ` Boris Brezillon
2015-11-17 14:22           ` Boris Brezillon
2015-11-17 14:22           ` Boris Brezillon
2015-11-17 15:32           ` Julia Lawall
2015-11-17 15:32             ` Julia Lawall
2015-11-17 15:32             ` Julia Lawall
2015-11-16 13:37 ` [PATCH 15/27] mtd: nand: update the documentation to reflect framework changes Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 16/27] staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 17/27] cris: nand: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 18/27] mtd: nand: update mtd_to_nand() Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-17  3:03   ` Brian Norris
2015-11-17  3:03     ` Brian Norris
2015-11-17  3:03     ` Brian Norris
2015-11-17  8:26     ` Boris Brezillon
2015-11-17  8:26       ` Boris Brezillon
2015-11-17  8:26       ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 19/27] mtd: nand: remove useless mtd->priv = chip assignments Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 20/27] cris: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 21/27] staging: mt29f_spinand: remove useless mtd->priv = chip assignment Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 22/27] mtd: nand: simplify nand_dt_init() usage Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 23/27] mtd: nand: kill the chip->flash_node field Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 24/27] mtd: nand: add helpers to access ->priv Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 25/27] ARM: make use of nand_set/get_controller_data() helpers Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 26/27] mtd: nand: " Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:37   ` Boris Brezillon
2015-11-16 13:38 ` [PATCH 27/27] staging: mt29f_spinand: " Boris Brezillon
2015-11-16 13:38   ` Boris Brezillon
2015-11-16 13:38   ` Boris Brezillon

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=1447681080-31232-4-git-send-email-boris.brezillon@free-electrons.com \
    --to=boris.brezillon@free-electrons.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=alex@digriz.org.uk \
    --cc=andrew@lunn.ch \
    --cc=computersforpeace@gmail.com \
    --cc=corbet@lwn.net \
    --cc=daniel@zonque.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=hsweeten@visionengravers.com \
    --cc=jason@lakedaemon.net \
    --cc=jesper.nilsson@axis.com \
    --cc=josh.wu@atmel.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kaloz@openwrt.org \
    --cc=kernel@pengutronix.de \
    --cc=kgene@kernel.org \
    --cc=khalasa@piap.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=marek.vasut@gmail.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=maximlevitsky@gmail.com \
    --cc=mcuos.com@gmail.com \
    --cc=realmz6@gmail.com \
    --cc=rmallon@gmail.com \
    --cc=robert.jarzmik@free.fr \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=shawnguo@kernel.org \
    --cc=starvik@axis.com \
    --cc=stefan@agner.ch \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tony@atomide.com \
    --cc=wens@csie.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 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.