mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: linux-mtd@lists.infradead.org
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Huang Shijie <shijie8@gmail.com>,
	"grmoore@altera.com" <grmoore@altera.com>,
	Rashika Kheria <rashika.kheria@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/7] mtd: denali: change the type of iterators to int
Date: Tue,  9 Sep 2014 11:01:54 +0900	[thread overview]
Message-ID: <1410228117-14820-5-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1410228117-14820-1-git-send-email-yamada.m@jp.panasonic.com>

We should rathar use "int" type for loop iterators.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v2: None

 drivers/mtd/nand/denali.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index dcd6771..259ca0ba 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -178,7 +178,7 @@ static void reset_bank(struct denali_nand_info *denali)
 /* Reset the flash controller */
 static uint16_t denali_nand_reset(struct denali_nand_info *denali)
 {
-	uint32_t i;
+	int i;
 
 	dev_dbg(denali->dev, "%s, Line %d, Function: %s\n",
 		       __FILE__, __LINE__, __func__);
@@ -499,7 +499,8 @@ static uint16_t denali_nand_timing_set(struct denali_nand_info *denali)
 {
 	uint16_t status = PASS;
 	uint32_t id_bytes[8], addr;
-	uint8_t i, maf_id, device_id;
+	uint8_t maf_id, device_id;
+	int i;
 
 	dev_dbg(denali->dev,
 			"%s, Line %d, Function: %s\n",
@@ -830,7 +831,8 @@ static int write_data_to_flash_mem(struct denali_nand_info *denali,
 							const uint8_t *buf,
 							int len)
 {
-	uint32_t i, *buf32;
+	uint32_t *buf32;
+	int i;
 
 	/*
 	 * verify that the len is a multiple of 4.
@@ -850,7 +852,8 @@ static int read_data_from_flash_mem(struct denali_nand_info *denali,
 								uint8_t *buf,
 								int len)
 {
-	uint32_t i, *buf32;
+	uint32_t *buf32;
+	int i;
 
 	/*
 	 * we assume that len will be a multiple of 4, if not it would be nice
-- 
1.9.1


  parent reply	other threads:[~2014-09-09  2:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09  2:01 [PATCH v2 0/7] mtd: denali: A collection of trivial coding style fixes Masahiro Yamada
2014-09-09  2:01 ` [PATCH v2 1/7] mtd: denali: fix the format of comment blocks Masahiro Yamada
2014-09-09  2:01 ` [PATCH v2 2/7] mtd: denali: remove unnecessary variable initializations Masahiro Yamada
2014-09-09  2:01 ` [PATCH v2 3/7] mtd: denali: remove unnecessary casts Masahiro Yamada
2014-09-09  2:01 ` Masahiro Yamada [this message]
2014-09-09  2:01 ` [PATCH v2 5/7] mtd: denali: remove a set-but-unused variable Masahiro Yamada
2014-09-09  2:01 ` [PATCH v2 6/7] mtd: denali: remove unnecessary parentheses Masahiro Yamada
2014-09-09  2:01 ` [PATCH v2 7/7] mtd: denali: fix indents and other trivial things Masahiro Yamada
2014-09-16  0:36 ` [PATCH v2 0/7] mtd: denali: A collection of trivial coding style fixes Brian Norris
2014-09-16  2:11   ` Masahiro Yamada
2014-09-16  5:07     ` Brian Norris
2014-09-16 11:08       ` Masahiro Yamada

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=1410228117-14820-5-git-send-email-yamada.m@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=grmoore@altera.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rashika.kheria@gmail.com \
    --cc=shijie8@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®