Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753705AbeAFPMJ (ORCPT + 1 other); Sat, 6 Jan 2018 10:12:09 -0500 Received: from mout.web.de ([212.227.15.3]:62594 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753403AbeAFPMH (ORCPT ); Sat, 6 Jan 2018 10:12:07 -0500 Subject: [PATCH 5/5] mtd/rfd_ftl: Add some spaces for better code readability From: SF Markus Elfring To: linux-mtd@lists.infradead.org, Boris Brezillon , Brian Norris , Cyrille Pitchen , David Woodhouse , Marek Vasut , Richard Weinberger Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <847904e4-c5a2-0716-24ae-c2ac085fe3a3@users.sourceforge.net> Date: Sat, 6 Jan 2018 16:11:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:yZqjO2/lkIkFvLzLKA0u/LnLq7d9Ndgklf99Do32ml89mwHA4Ai tGWUH3URrGE46FyPHlh8J16a16QcnJcGSf5VsAYQwJxTe96oEG/Q263X7vDu6/QhczAGs3x 2N2kW/HuhIpeGbx0WyPHYqdFlCn0v+gY5OQMTxpxfi27UIuvg/kEv/6gSUIvTNHQESD9ebC 85BebE9hq55sCBdPocl9Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:oWrvHMrzKPY=:1DaQIvGPkpvJOKmeAyYMBY 6MRuatWicLdAHkzi7l90O+XadIHsQSFPhTRoSltbru24h6DHKXpOewVT8hO61AKWzxHJ/447x X632HIfc3Rvr6j7mXJR9SMa5OW5NPfH+SQ1sP9XFR1kFhmx7Baw7Ig9nLrLdvyZPXq1aKj39h aezZaqVXcp13StiVVLukVCZwN/UMxf+hfyNJ38JG2U2HGGXShL+zLKK1SuT3i+3CZ4YgPm8u6 d/F73DjNp3UvnD2Kwn4zxXb+Wjv4sIiQ3spJrF/S7Ih8g2rT4SAHJ28e3M7TGQGkwet8fDT27 Z+0x1YmISJZQ/kUJNC9I30dPnHT0xbTgOkjdGm6XTypTTVx6gtc6tVjX/ciZ/srq2alHTP1BR 72ARaam+Z7lizdAOQo0VQPxr0RVrd0KMl9txe+bFEzeW5YomiMecOrhv23Jjj4B2ixnA4kxN+ fLc01yPvTwSMZOEATDZPJ+pT0lT5sRU608DSpqi728VKGlMhtUlPN2WfcfpRMpG07NXSmldxt aL43sH04Upo+3p+UUPw4RIaEFLOoGYFyRpILErcrUsfrv+p9YyMQOXKqxLP9/FdngG1n/uUvH U4DGvh+WApTBZQWnmtmaiI+za9cE0se7IZhIh8d3hgzrZ6nqpjDsvx04kbOsnY6rNv/rjaRwO Ze5iOCHk/arX5JJ9pidUdx4CPowYR3p0LC6SnsoNHjCLLx/BUHgN/p7gXGedaY5TjuZp4b4Ho 3ISTjGB3Euq3kEG9DiKiZxmznDYVOsEeItODDoSZQ2hotL5Qaus4i8MKOXzg4efljZ12nTyaY kwmvFXQ+tOnFovBgwdZdN4DzhEQOPswIztE3sw8BQBYi8udqnM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sat, 6 Jan 2018 15:47:01 +0100 Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/mtd/rfd_ftl.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index e3155ec4be64..b6cc3690b9ed 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -103,7 +103,7 @@ static int build_block_map(struct partition *part, int block_no) block->state = BLOCK_OK; - for (i=0; idata_sectors_per_block; i++) { + for (i = 0; i < part->data_sectors_per_block; i++) { u16 entry; entry = le16_to_cpu(part->header_cache[HEADER_MAP_OFFSET + i]); @@ -193,10 +193,10 @@ static int scan_header(struct partition *part) if (!part->sector_map) goto free_blocks; - for (i=0; isector_count; i++) + for (i = 0; i < part->sector_count; i++) part->sector_map[i] = -1; - for (i=0, blocks_found=0; itotal_blocks; i++) { + for (i = 0, blocks_found = 0; i < part->total_blocks; i++) { rc = mtd_read(part->mbd.mtd, i * part->block_size, part->header_size, &retlen, (u_char *)part->header_cache); @@ -380,7 +380,7 @@ static int move_block_contents(struct partition *part, int block_no, u_long *old goto err; } - for (i=0; idata_sectors_per_block; i++) { + for (i = 0; i < part->data_sectors_per_block; i++) { u16 entry = le16_to_cpu(map[HEADER_MAP_OFFSET + i]); u_long addr; @@ -452,7 +452,7 @@ static int reclaim_block(struct partition *part, u_long *old_sector) else old_sector_block = -1; - for (block=0; blocktotal_blocks; block++) { + for (block = 0; block < part->total_blocks; block++) { int this_score; if (block == part->reserved_block) @@ -625,8 +625,7 @@ static int find_free_sector(const struct partition *part, const struct block *bl if (++i == part->data_sectors_per_block) i = 0; - } - while(i != stop); + } while (i != stop); return -1; } @@ -718,7 +717,7 @@ static int rfd_ftl_writesect(struct mtd_blktrans_dev *dev, u_long sector, char * old_addr = part->sector_map[sector]; - for (i=0; itotal_blocks; i++) { + for (i = 0; i < part->total_blocks; i++) pr_debug("rfd_ftl_remove_dev:'%s': erase unit #%02d: %d erases\n", part->mbd.mtd->name, i, part->blocks[i].erases); - } del_mtd_blktrans_dev(dev); vfree(part->sector_map); -- 2.15.1