IDE: Coding Style fixes to drivers/ide/ide-cd.c

Before:
total: 43 errors, 66 warnings, 2183 lines checked

After:
total: 0 errors, 36 warnings, 2192 lines checked

I didn't (and I don't plan to) fix the warnings:
WARNING: line over 80 characters

[bart: minor fixes, md5sum checked (modulo s/"ignore = NULL;"/"ignore;"/ fix)]

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Paolo Ciarrocchi 2008-04-26 17:36:42 +02:00 committed by Bartlomiej Zolnierkiewicz
parent 175f354b75
commit 9ce70fb2b5

View File

@ -100,7 +100,8 @@ static int cdrom_log_sense(ide_drive_t *drive, struct request *rq,
return 0;
switch (sense->sense_key) {
case NO_SENSE: case RECOVERED_ERROR:
case NO_SENSE:
case RECOVERED_ERROR:
break;
case NOT_READY:
/*
@ -339,8 +340,8 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
cdrom_saw_media_change(drive);
/*printk("%s: media changed\n",drive->name);*/
return 0;
} else if ((sense_key == ILLEGAL_REQUEST) &&
(rq->cmd[0] == GPCMD_START_STOP_UNIT)) {
} else if (sense_key == ILLEGAL_REQUEST &&
rq->cmd[0] == GPCMD_START_STOP_UNIT) {
/*
* Don't print error message for this condition--
* SFF8090i indicates that 5/24/00 is the correct
@ -406,20 +407,26 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
/* Media change. */
cdrom_saw_media_change (drive);
/* Arrange to retry the request.
But be sure to give up if we've retried
too many times. */
/*
* Arrange to retry the request.
* But be sure to give up if we've retried
* too many times.
*/
if (++rq->errors > ERROR_MAX)
do_end_request = 1;
} else if (sense_key == ILLEGAL_REQUEST ||
sense_key == DATA_PROTECT) {
/* No point in retrying after an illegal
request or data protect error.*/
/*
* No point in retrying after an illegal
* request or data protect error.
*/
ide_dump_status_no_sense(drive, "command error", stat);
do_end_request = 1;
} else if (sense_key == MEDIUM_ERROR) {
/* No point in re-trying a zillion times on a bad
* sector... If we got here the error is not correctable */
/*
* No point in re-trying a zillion times on a bad
* sector... If we got here the error is not correctable
*/
ide_dump_status_no_sense(drive, "media error (bad sector)", stat);
do_end_request = 1;
} else if (sense_key == BLANK_CHECK) {
@ -796,8 +803,10 @@ static ide_startstop_t cdrom_start_seek (ide_drive_t *drive, unsigned int block)
return cdrom_start_packet_command(drive, 0, cdrom_start_seek_continuation);
}
/* Fix up a possibly partially-processed request so that we can
start it over entirely, or even put it back on the request queue. */
/*
* Fix up a possibly partially-processed request so that we can
* start it over entirely, or even put it back on the request queue.
*/
static void restore_request(struct request *rq)
{
if (rq->buffer != bio_data(rq->bio)) {
@ -1229,9 +1238,9 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block)
}
info->cd_flags &= ~IDE_CD_FLAG_SEEKING;
}
if ((rq_data_dir(rq) == READ) && IDE_LARGE_SEEK(info->last_block, block, IDECD_SEEK_THRESHOLD) && drive->dsc_overlap) {
if ((rq_data_dir(rq) == READ) && IDE_LARGE_SEEK(info->last_block, block, IDECD_SEEK_THRESHOLD) && drive->dsc_overlap)
action = cdrom_start_seek(drive, block);
} else
else
action = cdrom_start_rw(drive, rq);
info->last_block = block;
return action;
@ -1976,7 +1985,8 @@ static int idecd_open(struct inode * inode, struct file * file)
struct cdrom_info *info;
int rc = -ENOMEM;
if (!(info = ide_cd_get(disk)))
info = ide_cd_get(disk);
if (!info)
return -ENXIO;
rc = cdrom_open(&info->devinfo, inode, file);
@ -2087,7 +2097,7 @@ static struct block_device_operations idecd_ops = {
};
/* options */
static char *ignore = NULL;
static char *ignore;
module_param(ignore, charp, 0400);
MODULE_DESCRIPTION("ATAPI CD-ROM Driver");