linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] mtd: ndfc: silence an array underflow static checker warning
@ 2014-07-31 15:36 Dan Carpenter
  2014-08-04 21:15 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-07-31 15:36 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Grant Likely, kernel-janitors, Brian Norris, linux-mtd,
	Rob Herring

We check "cs" for array overflows but we don't check for underflows and
it upsets the static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 69eaba6..253a644 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -203,7 +203,8 @@ static int ndfc_probe(struct platform_device *ofdev)
 	struct ndfc_controller *ndfc;
 	const __be32 *reg;
 	u32 ccr;
-	int err, len, cs;
+	u32 cs;
+	int err, len;
 
 	/* Read the reg property to get the chip select */
 	reg = of_get_property(ofdev->dev.of_node, "reg", &len);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] mtd: ndfc: silence an array underflow static checker warning
  2014-07-31 15:36 [patch] mtd: ndfc: silence an array underflow static checker warning Dan Carpenter
@ 2014-08-04 21:15 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-08-04 21:15 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Grant Likely, linux-mtd, kernel-janitors, Rob Herring,
	David Woodhouse

On Thu, Jul 31, 2014 at 06:36:20PM +0300, Dan Carpenter wrote:
> We check "cs" for array overflows but we don't check for underflows and
> it upsets the static checkers.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Queued to l2-mtd.git/next.

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-04 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 15:36 [patch] mtd: ndfc: silence an array underflow static checker warning Dan Carpenter
2014-08-04 21:15 ` Brian Norris

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).