All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Dan Brown <dan_brown@ieee.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-mtd@lists.infradead.org
Subject: [PATCH v3 15/23] mtd: rawnand: diskonchip: Marking unused variables as __always_unused
Date: Mon,  9 Nov 2020 18:21:58 +0000	[thread overview]
Message-ID: <20201109182206.3037326-16-lee.jones@linaro.org> (raw)
In-Reply-To: <20201109182206.3037326-1-lee.jones@linaro.org>

'dummy' is never checked (as per the nomenclature) and the use of
'emtpymatch' is currently #if 0'ed out.  We could also #if 0 the
declaration, but #ifery is pretty ugly, so I like to keep it to a
minimum.

Fixes the following W=1 kernel build warning(s):

 drivers/mtd/nand/raw/diskonchip.c: In function ‘DoC_Delay’:
 drivers/mtd/nand/raw/diskonchip.c:219:16: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
 drivers/mtd/nand/raw/diskonchip.c: In function ‘doc200x_calculate_ecc’:
 drivers/mtd/nand/raw/diskonchip.c:706:6: warning: variable ‘emptymatch’ set but not used [-Wunused-but-set-variable]

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Dan Brown <dan_brown@ieee.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mtd/nand/raw/diskonchip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
index 94432a453e5ee..d5050e32cc421 100644
--- a/drivers/mtd/nand/raw/diskonchip.c
+++ b/drivers/mtd/nand/raw/diskonchip.c
@@ -216,7 +216,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
 
 static void DoC_Delay(struct doc_priv *doc, unsigned short cycles)
 {
-	volatile char dummy;
+	volatile char __always_unused dummy;
 	int i;
 
 	for (i = 0; i < cycles; i++) {
@@ -703,7 +703,7 @@ static int doc200x_calculate_ecc(struct nand_chip *this, const u_char *dat,
 	struct doc_priv *doc = nand_get_controller_data(this);
 	void __iomem *docptr = doc->virtadr;
 	int i;
-	int emptymatch = 1;
+	int __always_unused emptymatch = 1;
 
 	/* flush the pipeline */
 	if (DoC_is_2000(doc)) {
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: Dan Brown <dan_brown@ieee.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org,
	Boris Brezillon <boris.brezillon@collabora.com>,
	linux-mtd@lists.infradead.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH v3 15/23] mtd: rawnand: diskonchip: Marking unused variables as __always_unused
Date: Mon,  9 Nov 2020 18:21:58 +0000	[thread overview]
Message-ID: <20201109182206.3037326-16-lee.jones@linaro.org> (raw)
In-Reply-To: <20201109182206.3037326-1-lee.jones@linaro.org>

'dummy' is never checked (as per the nomenclature) and the use of
'emtpymatch' is currently #if 0'ed out.  We could also #if 0 the
declaration, but #ifery is pretty ugly, so I like to keep it to a
minimum.

Fixes the following W=1 kernel build warning(s):

 drivers/mtd/nand/raw/diskonchip.c: In function ‘DoC_Delay’:
 drivers/mtd/nand/raw/diskonchip.c:219:16: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
 drivers/mtd/nand/raw/diskonchip.c: In function ‘doc200x_calculate_ecc’:
 drivers/mtd/nand/raw/diskonchip.c:706:6: warning: variable ‘emptymatch’ set but not used [-Wunused-but-set-variable]

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Dan Brown <dan_brown@ieee.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mtd/nand/raw/diskonchip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
index 94432a453e5ee..d5050e32cc421 100644
--- a/drivers/mtd/nand/raw/diskonchip.c
+++ b/drivers/mtd/nand/raw/diskonchip.c
@@ -216,7 +216,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
 
 static void DoC_Delay(struct doc_priv *doc, unsigned short cycles)
 {
-	volatile char dummy;
+	volatile char __always_unused dummy;
 	int i;
 
 	for (i = 0; i < cycles; i++) {
@@ -703,7 +703,7 @@ static int doc200x_calculate_ecc(struct nand_chip *this, const u_char *dat,
 	struct doc_priv *doc = nand_get_controller_data(this);
 	void __iomem *docptr = doc->virtadr;
 	int i;
-	int emptymatch = 1;
+	int __always_unused emptymatch = 1;
 
 	/* flush the pipeline */
 	if (DoC_is_2000(doc)) {
-- 
2.25.1


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

  parent reply	other threads:[~2020-11-09 18:22 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 18:21 [PATCH v3 00/23] Rid W=1 warnings in MTD Lee Jones
2020-11-09 18:21 ` Lee Jones
2020-11-09 18:21 ` Lee Jones
2020-11-09 18:21 ` Lee Jones
2020-11-09 18:21 ` [PATCH v3 01/23] mtd: mtdpart: Fix misdocumented function parameter 'mtd' Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:11   ` Miquel Raynal
2020-11-19 21:11     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 02/23] mtd: devices: phram: File headers are not good candidates for kernel-doc Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:11   ` Miquel Raynal
2020-11-19 21:11     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 03/23] mtd: onenand: onenand_base: Fix expected kernel-doc formatting Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:11   ` Miquel Raynal
2020-11-19 21:11     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 04/23] mtd: devices: docg3: Fix kernel-doc 'bad line' and 'excessive doc' issues Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:11   ` Miquel Raynal
2020-11-19 21:11     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 05/23] mtd: Fix misspelled function parameter 'section' Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:10   ` Miquel Raynal
2020-11-19 21:10     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 06/23] mtd: onenand: onenand_bbt: Fix expected kernel-doc formatting Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:10   ` Miquel Raynal
2020-11-19 21:10     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 07/23] mtd: spi-nor: hisi-sfc: Demote non-conformant kernel-doc Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:10   ` Miquel Raynal
2020-11-19 21:10     ` Miquel Raynal
2020-11-19 21:10     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 08/23] mtd: ubi: build: Document 'ubi_num' in struct mtd_dev_param Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:09   ` Miquel Raynal
2020-11-19 21:09     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 09/23] mtd: spinand: toshiba: Demote non-conformant kernel-doc header Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:09   ` Miquel Raynal
2020-11-19 21:09     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 10/23] mtd: ubi: kapi: Correct documentation for 'ubi_leb_read_sg's 'sgl' parameter Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:09   ` Miquel Raynal
2020-11-19 21:09     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 11/23] mtd: ubi: eba: Fix a couple of misdocumentation issues Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:09   ` Miquel Raynal
2020-11-19 21:09     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 12/23] mtd: ubi: wl: Fix a couple of kernel-doc issues Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:09   ` Miquel Raynal
2020-11-19 21:09     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 13/23] mtd: rawnand: brcmnand: Demote non-conformant kernel-doc headers Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:08   ` Miquel Raynal
2020-11-19 21:08     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 14/23] mtd: ubi: gluebi: Fix misnamed function parameter documentation Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:08   ` Miquel Raynal
2020-11-19 21:08     ` Miquel Raynal
2020-11-09 18:21 ` Lee Jones [this message]
2020-11-09 18:21   ` [PATCH v3 15/23] mtd: rawnand: diskonchip: Marking unused variables as __always_unused Lee Jones
2020-11-19 21:08   ` Miquel Raynal
2020-11-19 21:08     ` Miquel Raynal
2020-11-09 18:21 ` [PATCH v3 16/23] mtd: rawnand: cafe_nand: Remove superfluous param doc and add another Lee Jones
2020-11-09 18:21   ` Lee Jones
2020-11-19 21:08   ` Miquel Raynal
2020-11-19 21:08     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 17/23] mtd: rawnand: s3c2410: Add documentation for 2 missing struct members Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:08   ` Miquel Raynal
2020-11-19 21:08     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 18/23] mtd: rawnand: omap_elm: Finish half populated function header, demote empty ones Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 19/23] mtd: rawnand: omap2: Fix a bunch of kernel-doc misdemeanours Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 20/23] mtd: rawnand: sunxi: Document 'sunxi_nfc's 'caps' member Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 21/23] mtd: rawnand: arasan: Document 'anfc_op's 'buf' member Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 22/23] mtd: onenand: Fix some kernel-doc misdemeanours Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-09 18:22 ` [PATCH v3 23/23] mtd: devices: powernv_flash: Add function names to headers and fix 'dev' Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-09 18:22   ` Lee Jones
2020-11-19 21:07   ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-19 21:07     ` Miquel Raynal
2020-11-20  7:50     ` Lee Jones
2020-11-20  7:50       ` Lee Jones
2020-11-20  7:50       ` Lee Jones
2020-11-20 11:42       ` Miquel Raynal
2020-11-20 11:42         ` Miquel Raynal
2020-11-20 11:42         ` Miquel Raynal

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=20201109182206.3037326-16-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dan_brown@ieee.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    --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.