Re: [PATCH 5/5] ide-cd: fix remaining checkpatch.pl issues

From: Bartlomiej Zolnierkiewicz
Date: Wed Feb 27 2008 - 16:08:09 EST


On Wednesday 27 February 2008, Borislav Petkov wrote:
> Some of them are:
> WARNING: braces {} are not necessary for single statement blocks
> CHECK: multiple assignments should be avoided
> WARNING: printk() should include KERN_ facility level
> WARNING: no space between function name and open parenthesis '('
>
> Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>

interdiff for the merged version

diff -u b/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- b/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -185,8 +185,7 @@
if (valid < 0)
valid = 0;
if (sector < get_capacity(info->disk) &&
- drive->probed_capacity - sector < 4 * 75)
-
+ drive->probed_capacity - sector < 4 * 75)
set_capacity(info->disk, sector);
}
}
@@ -218,7 +217,7 @@

rq->data = sense;
rq->cmd[0] = GPCMD_REQUEST_SENSE;
- rq->cmd[4] = 18;
+ rq->cmd[4] = 18;
rq->data_len = 18;

rq->cmd_type = REQ_TYPE_SENSE;
@@ -310,8 +309,8 @@
sense_key = err >> 4;

if (rq == NULL) {
- printk(KERN_ERR "%s: missing rq in cdrom_decode_status\n",
- drive->name);
+ printk(KERN_ERR "%s: missing rq in %s\n",
+ drive->name, __func__);
return 1;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/