summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-06-07 10:09:50 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-06-17 18:20:53 +1000
commit41b98b82a22388174bda7eb21bbfddaafb2c838f (patch)
tree4e63c7ffcf6db9771030641d5eb30d4bca94bf42 /block
parentb41c12d269f7d27a47f3d0fabf834c2acdea3f3d (diff)
partitions-add-aix-lvm-partition-support-files-checkpatch-fixes
WARNING: line over 80 characters #119: FILE: block/partitions/aix.c:95: +static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 * buffer, size_t count) ERROR: "foo * bar" should be "foo *bar" #119: FILE: block/partitions/aix.c:95: +static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 * buffer, size_t count) ERROR: code indent should use tabs where possible #124: FILE: block/partitions/aix.c:100: + return 0;$ WARNING: please, no spaces at the start of a line #124: FILE: block/partitions/aix.c:100: + return 0;$ WARNING: Avoid CamelCase: <Sector> #128: FILE: block/partitions/aix.c:104: + Sector sect; ERROR: spaces required around that '+=' (ctx:WxV) #137: FILE: block/partitions/aix.c:113: + totalreadcount +=copied; ^ ERROR: do not use assignment in if condition #235: FILE: block/partitions/aix.c:211: + if (vgda_sector && (d = read_part_sector(state, vgda_sector, &sect))) { ERROR: do not use assignment in if condition #244: FILE: block/partitions/aix.c:220: + if (numlvs && (d = read_part_sector(state, vgda_sector + 1, &sect))) { WARNING: line over 80 characters #252: FILE: block/partitions/aix.c:228: + for (i = 0; foundlvs < numlvs && i < state->limit; i += 1) { WARNING: line over 80 characters #294: FILE: block/partitions/aix.c:270: + (i + 1 - lp_ix) * pp_blocks_size + psn_part1, WARNING: line over 80 characters #295: FILE: block/partitions/aix.c:271: + lvip[lv_ix].pps_per_lv * pp_blocks_size); WARNING: line over 80 characters #296: FILE: block/partitions/aix.c:272: + snprintf(tmp, sizeof(tmp), " <%s>\n", n[lv_ix].name); WARNING: printk() should include KERN_ facility level #306: FILE: block/partitions/aix.c:282: + printk("partition %s (%u pp's found) is not contiguous\n", WARNING: kfree(NULL) is safe this check is probably not required #311: FILE: block/partitions/aix.c:287: + if (n) + kfree(n); total: 5 errors, 9 warnings, 291 lines checked NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/partitions-add-aix-lvm-partition-support-files.patch has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/partitions/aix.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index ef46cf3594f8..43be471d9b1d 100644
--- a/block/partitions/aix.c
+++ b/block/partitions/aix.c
@@ -92,12 +92,13 @@ static u64 last_lba(struct block_device *bdev)
* Description: Reads @count bytes from @state->bdev into @buffer.
* Returns number of bytes read on success, 0 on error.
*/
-static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 * buffer, size_t count)
+static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer,
+ size_t count)
{
size_t totalreadcount = 0;
if (!buffer || lba + count / 512 > last_lba(state->bdev))
- return 0;
+ return 0;
while (count) {
int copied = 512;
@@ -110,7 +111,7 @@ static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 * buffer, si
memcpy(buffer, data, copied);
put_dev_sector(sect);
buffer += copied;
- totalreadcount +=copied;
+ totalreadcount += copied;
count -= copied;
}
return totalreadcount;
@@ -268,9 +269,10 @@ int aix_partition(struct parsed_partitions *state)
char tmp[70];
put_partition(state, lv_ix + 1,
- (i + 1 - lp_ix) * pp_blocks_size + psn_part1,
- lvip[lv_ix].pps_per_lv * pp_blocks_size);
- snprintf(tmp, sizeof(tmp), " <%s>\n", n[lv_ix].name);
+ (i + 1 - lp_ix) * pp_blocks_size + psn_part1,
+ lvip[lv_ix].pps_per_lv * pp_blocks_size);
+ snprintf(tmp, sizeof(tmp), " <%s>\n",
+ n[lv_ix].name);
strlcat(state->pp_buf, tmp, PAGE_SIZE);
lvip[lv_ix].lv_is_contiguous = 1;
ret = 1;
@@ -280,12 +282,12 @@ int aix_partition(struct parsed_partitions *state)
}
for (i = 0; i < state->limit; i += 1)
if (lvip[i].pps_found && !lvip[i].lv_is_contiguous)
- printk("partition %s (%u pp's found) is not contiguous\n",
+ pr_warn("partition %s (%u pp's found) is "
+ "not contiguous\n",
n[i].name, lvip[i].pps_found);
kfree(pvd);
}
- if (n)
- kfree(n);
+ kfree(n);
kfree(lvip);
return ret;
}