LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 10/22] ide-tape: shorten some function names
Date: Mon, 4 Feb 2008 14:40:28 +0100 [thread overview]
Message-ID: <1202132440-26648-11-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1202132440-26648-1-git-send-email-petkovbb@gmail.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-tape.c | 32 +++++++++++++++-----------------
1 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index ae2c76d..4fee160 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1053,7 +1053,7 @@ static void idetape_postpone_request (ide_drive_t *drive)
* command. We will transfer some of the data (as requested by the drive) and
* will re-point interrupt handler to us. When data transfer is finished, we
* will act according to the algorithm described before
- * idetape_issue_packet_command.
+ * idetape_issue_pc.
*/
typedef void idetape_io_buf(ide_drive_t *, idetape_pc_t *, unsigned int);
@@ -1233,7 +1233,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
*
* The handling will be done in three stages:
*
- * 1. idetape_issue_packet_command will send the packet command to the
+ * 1. idetape_issue_pc will send the packet command to the
* drive, and will set the interrupt handler to idetape_pc_intr.
*
* 2. On each interrupt, idetape_pc_intr will be called. This step
@@ -1308,7 +1308,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
return ide_started;
}
-static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape_pc_t *pc)
+static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, idetape_pc_t *pc)
{
ide_hwif_t *hwif = drive->hwif;
idetape_tape_t *tape = drive->driver_data;
@@ -1614,7 +1614,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
*/
if (tape->failed_pc != NULL &&
tape->pc->c[0] == REQUEST_SENSE) {
- return idetape_issue_packet_command(drive, tape->failed_pc);
+ return idetape_issue_pc(drive, tape->failed_pc);
}
if (postponed_rq != NULL)
if (rq != postponed_rq) {
@@ -1707,7 +1707,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
}
BUG();
out:
- return idetape_issue_packet_command(drive, pc);
+ return idetape_issue_pc(drive, pc);
err:
printk(KERN_ERR "ide-tape: Error processing request %u\n", rq->cmd[0]);
@@ -2263,11 +2263,8 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks, struct
return (tape->blk_size * (blocks-rq.current_nr_sectors));
}
-/*
- * idetape_insert_pipeline_into_queue is used to start servicing the
- * pipeline stages, starting from tape->next_stage.
- */
-static void idetape_insert_pipeline_into_queue (ide_drive_t *drive)
+/* start servicing the pipeline stages, starting from tape->next_stage. */
+static void idetape_plug_pipeline(ide_drive_t *drive)
{
idetape_tape_t *tape = drive->driver_data;
@@ -2359,7 +2356,7 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
spin_unlock_irqrestore(&tape->lock, flags);
} else {
spin_unlock_irqrestore(&tape->lock, flags);
- idetape_insert_pipeline_into_queue(drive);
+ idetape_plug_pipeline(drive);
if (idetape_pipeline_active(tape))
continue;
/*
@@ -2396,7 +2393,7 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
tape->insert_time = jiffies;
tape->insert_size = 0;
tape->insert_speed = 0;
- idetape_insert_pipeline_into_queue(drive);
+ idetape_plug_pipeline(drive);
}
}
if (test_and_clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags))
@@ -2415,7 +2412,7 @@ static void idetape_wait_for_pipeline (ide_drive_t *drive)
unsigned long flags;
while (tape->next_stage || idetape_pipeline_active(tape)) {
- idetape_insert_pipeline_into_queue(drive);
+ idetape_plug_pipeline(drive);
spin_lock_irqsave(&tape->lock, flags);
if (idetape_pipeline_active(tape))
idetape_wait_for_request(drive, tape->active_data_rq);
@@ -2508,7 +2505,7 @@ static void idetape_restart_speed_control (ide_drive_t *drive)
tape->controlled_previous_head_time = tape->uncontrolled_previous_head_time = jiffies;
}
-static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
+static int idetape_init_read(ide_drive_t *drive, int max_stages)
{
idetape_tape_t *tape = drive->driver_data;
idetape_stage_t *new_stage;
@@ -2569,7 +2566,7 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
tape->insert_time = jiffies;
tape->insert_size = 0;
tape->insert_speed = 0;
- idetape_insert_pipeline_into_queue(drive);
+ idetape_plug_pipeline(drive);
}
}
return 0;
@@ -2599,7 +2596,7 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks)
* Wait for the next block to be available at the head
* of the pipeline
*/
- idetape_initiate_read(drive, tape->max_stages);
+ idetape_init_read(drive, tape->max_stages);
if (tape->first_stage == NULL) {
if (test_bit(IDETAPE_PIPELINE_ERROR, &tape->flags))
return 0;
@@ -2862,7 +2859,8 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf,
(count % tape->blk_size) == 0)
tape->user_bs_factor = count / tape->blk_size;
}
- if ((rc = idetape_initiate_read(drive, tape->max_stages)) < 0)
+ rc = idetape_init_read(drive, tape->max_stages);
+ if (rc < 0)
return rc;
if (count == 0)
return (0);
--
1.5.3.7
next prev parent reply other threads:[~2008-02-04 13:47 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 13:40 Borislav Petkov
2008-02-04 13:40 ` [PATCH 01/22] ide-tape: refactor the debug logging facility Borislav Petkov
2008-02-04 13:40 ` [PATCH 02/22] ide-tape: remove struct idetape_read_position_result_t Borislav Petkov
2008-02-05 1:23 ` Bartlomiej Zolnierkiewicz
2008-02-04 13:40 ` [PATCH 03/22] ide-tape: remove unreachable code chunk Borislav Petkov
2008-02-04 13:40 ` [PATCH 04/22] ide-tape: simplify code branching in the interrupt handler Borislav Petkov
2008-02-04 13:40 ` [PATCH 05/22] ide-tape: remove typedef idetape_chrdev_direction_t Borislav Petkov
2008-02-04 13:40 ` [PATCH 06/22] ide-tape: struct idetape_tape_t: remove unused members Borislav Petkov
2008-09-22 13:25 ` Sergei Shtylyov
2008-09-22 13:58 ` Boris Petkov
2008-09-22 15:50 ` Sergei Shtylyov
2008-02-04 13:40 ` [PATCH 07/22] ide-tape: struct idetape_tape_t: shorten member names v2 Borislav Petkov
2008-02-05 1:23 ` Bartlomiej Zolnierkiewicz
2008-02-05 4:47 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 08/22] ide-tape: remove packet command and struct request memory buffers Borislav Petkov
2008-02-04 13:40 ` [PATCH 09/22] ide-tape: remove idetape_increase_max_pipeline_stages() Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov [this message]
2008-02-04 13:40 ` [PATCH 11/22] ide-tape: remove atomic test/set macros Borislav Petkov
2008-02-04 13:40 ` [PATCH 12/22] ide-tape: dump gcw fields on error in idetape_identify_device() Borislav Petkov
2008-02-04 13:40 ` [PATCH 13/22] ide-tape: remove struct idetape_id_gcw Borislav Petkov
2008-02-04 13:40 ` [PATCH 14/22] ide-tape: cleanup and fix comments Borislav Petkov
2008-02-05 1:27 ` Bartlomiej Zolnierkiewicz
2008-02-04 13:40 ` [PATCH 15/22] ide-tape: remove unused "length" arg from idetape_create_read_buffer_cmd() Borislav Petkov
2008-02-04 13:40 ` [PATCH 16/22] ide-tape: include proper headers Borislav Petkov
2008-02-04 13:40 ` [PATCH 17/22] ide-tape: collect module-related macro calls at the end Borislav Petkov
2008-02-04 13:40 ` [PATCH 18/22] ide-tape: remove leftover OnStream support warning Borislav Petkov
2008-02-04 13:40 ` [PATCH 19/22] ide-tape: fix syntax error in idetape_identify_device() Borislav Petkov
2008-02-04 13:40 ` [PATCH 20/22] ide-tape: cleanup the remaining codestyle issues Borislav Petkov
2008-02-05 1:27 ` Bartlomiej Zolnierkiewicz
2008-02-04 13:40 ` [PATCH 21/22] ide-tape: bump minor driver version Borislav Petkov
2008-02-04 13:40 ` [PATCH 22/22] ide-tape: schedule driver for removal after 6 months in case it turns out Borislav Petkov
2008-02-05 1:20 ` ide-tape redux (was: Bartlomiej Zolnierkiewicz
2008-02-06 5:23 ` Borislav Petkov
2008-02-06 5:27 ` Borislav Petkov
2008-02-09 16:25 ` Bartlomiej Zolnierkiewicz
2008-02-09 19:42 ` [PATCH 1/2] ide-tape: move all struct and other defs at the top Borislav Petkov
2008-02-11 22:12 ` Bartlomiej Zolnierkiewicz
2008-02-09 16:25 ` ide-tape redux (was: Bartlomiej Zolnierkiewicz
2008-02-09 19:43 ` [PATCH 2/2] ide-tape: remove atomic test/set macros for packet commands Borislav Petkov
2008-02-11 22:12 ` Bartlomiej Zolnierkiewicz
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=1202132440-26648-11-git-send-email-petkovbb@gmail.com \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
--subject='Re: [PATCH 10/22] ide-tape: shorten some function names' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).