All of 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 6/9] ide-atapi: remove pc arg to drive->pc_io_buffers
Date: Tue, 16 Dec 2008 08:36:06 +0100	[thread overview]
Message-ID: <1229412969-3552-7-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1229412969-3552-1-git-send-email-petkovbb@gmail.com>

... and get the ptr from drive->pc.

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
 drivers/ide/ide-atapi.c |    6 +++---
 drivers/ide/ide-tape.c  |   16 ++++++++--------
 include/linux/ide.h     |    5 ++---
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index f299d8e..89ce8f0 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -68,9 +68,9 @@ int ide_check_atapi_device(ide_drive_t *drive, const char *s)
 EXPORT_SYMBOL_GPL(ide_check_atapi_device);
 
 /* PIO data transfer routine using the scatter gather table. */
-int ide_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-		    unsigned int bcount, int write)
+int ide_io_buffers(ide_drive_t *drive, unsigned int bcount, int write)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	ide_hwif_t *hwif = drive->hwif;
 	const struct ide_tp_ops *tp_ops = hwif->tp_ops;
 	xfer_func_t *xf = write ? tp_ops->output_data : tp_ops->input_data;
@@ -438,7 +438,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
 	if ((drive->media == ide_floppy && !rq->data) ||
 	    (drive->media == ide_tape && pc->bh)) {
 
-		drive->pc_io_buffers(drive, pc, bcount, write);
+		drive->pc_io_buffers(drive, bcount, write);
 
 		if (drive->media == ide_floppy)
 			blk_end_request_callback(rq, 0, bcount,
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index fef9a78..2bfa612 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -313,9 +313,9 @@ static struct ide_tape_obj *ide_tape_chrdev_get(unsigned int i)
 	return tape;
 }
 
-static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				  unsigned int bcount)
+static void idetape_input_buffers(ide_drive_t *drive, unsigned int bcount)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	struct idetape_bh *bh = pc->bh;
 	int count;
 
@@ -342,9 +342,9 @@ static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
 	pc->bh = bh;
 }
 
-static void idetape_output_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				   unsigned int bcount)
+static void idetape_output_buffers(ide_drive_t *drive, unsigned int bcount)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	struct idetape_bh *bh = pc->bh;
 	int count;
 
@@ -601,13 +601,13 @@ static void ide_tape_handle_dsc(ide_drive_t *drive)
 	idetape_postpone_request(drive);
 }
 
-static int ide_tape_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				unsigned int bcount, int write)
+static int ide_tape_io_buffers(ide_drive_t *drive, unsigned int bcount,
+			       int write)
 {
 	if (write)
-		idetape_output_buffers(drive, pc, bcount);
+		idetape_output_buffers(drive, bcount);
 	else
-		idetape_input_buffers(drive, pc, bcount);
+		idetape_input_buffers(drive, bcount);
 
 	return bcount;
 }
diff --git a/include/linux/ide.h b/include/linux/ide.h
index dac382b..0940db9 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -663,8 +663,7 @@ struct ide_drive_s {
 	void (*pc_callback)(struct ide_drive_s *, int);
 
 	void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *);
-	int  (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *,
-			      unsigned int, int);
+	int  (*pc_io_buffers)(struct ide_drive_s *, unsigned int, int);
 
 	unsigned long atapi_flags;
 
@@ -1206,7 +1205,7 @@ void ide_tf_read(ide_drive_t *, ide_task_t *);
 void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int);
 void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int);
 
-int ide_io_buffers(ide_drive_t *, struct ide_atapi_pc *, unsigned int, int);
+int ide_io_buffers(ide_drive_t *, unsigned int, int);
 
 extern void SELECT_DRIVE(ide_drive_t *);
 void SELECT_MASK(ide_drive_t *, int);
-- 
1.6.0.4


WARNING: multiple messages have this Message-ID (diff)
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 6/9] ide-atapi: remove pc arg to drive->pc_io_buffers
Date: Tue, 16 Dec 2008 08:36:06 +0100	[thread overview]
Message-ID: <1229412969-3552-7-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1229412969-3552-1-git-send-email-petkovbb@gmail.com>

... and get the ptr from drive->pc.

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
 drivers/ide/ide-atapi.c |    6 +++---
 drivers/ide/ide-tape.c  |   16 ++++++++--------
 include/linux/ide.h     |    5 ++---
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index f299d8e..89ce8f0 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -68,9 +68,9 @@ int ide_check_atapi_device(ide_drive_t *drive, const char *s)
 EXPORT_SYMBOL_GPL(ide_check_atapi_device);
 
 /* PIO data transfer routine using the scatter gather table. */
-int ide_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-		    unsigned int bcount, int write)
+int ide_io_buffers(ide_drive_t *drive, unsigned int bcount, int write)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	ide_hwif_t *hwif = drive->hwif;
 	const struct ide_tp_ops *tp_ops = hwif->tp_ops;
 	xfer_func_t *xf = write ? tp_ops->output_data : tp_ops->input_data;
@@ -438,7 +438,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
 	if ((drive->media == ide_floppy && !rq->data) ||
 	    (drive->media == ide_tape && pc->bh)) {
 
-		drive->pc_io_buffers(drive, pc, bcount, write);
+		drive->pc_io_buffers(drive, bcount, write);
 
 		if (drive->media == ide_floppy)
 			blk_end_request_callback(rq, 0, bcount,
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index fef9a78..2bfa612 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -313,9 +313,9 @@ static struct ide_tape_obj *ide_tape_chrdev_get(unsigned int i)
 	return tape;
 }
 
-static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				  unsigned int bcount)
+static void idetape_input_buffers(ide_drive_t *drive, unsigned int bcount)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	struct idetape_bh *bh = pc->bh;
 	int count;
 
@@ -342,9 +342,9 @@ static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
 	pc->bh = bh;
 }
 
-static void idetape_output_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				   unsigned int bcount)
+static void idetape_output_buffers(ide_drive_t *drive, unsigned int bcount)
 {
+	struct ide_atapi_pc *pc = drive->pc;
 	struct idetape_bh *bh = pc->bh;
 	int count;
 
@@ -601,13 +601,13 @@ static void ide_tape_handle_dsc(ide_drive_t *drive)
 	idetape_postpone_request(drive);
 }
 
-static int ide_tape_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
-				unsigned int bcount, int write)
+static int ide_tape_io_buffers(ide_drive_t *drive, unsigned int bcount,
+			       int write)
 {
 	if (write)
-		idetape_output_buffers(drive, pc, bcount);
+		idetape_output_buffers(drive, bcount);
 	else
-		idetape_input_buffers(drive, pc, bcount);
+		idetape_input_buffers(drive, bcount);
 
 	return bcount;
 }
diff --git a/include/linux/ide.h b/include/linux/ide.h
index dac382b..0940db9 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -663,8 +663,7 @@ struct ide_drive_s {
 	void (*pc_callback)(struct ide_drive_s *, int);
 
 	void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *);
-	int  (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *,
-			      unsigned int, int);
+	int  (*pc_io_buffers)(struct ide_drive_s *, unsigned int, int);
 
 	unsigned long atapi_flags;
 
@@ -1206,7 +1205,7 @@ void ide_tf_read(ide_drive_t *, ide_task_t *);
 void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int);
 void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int);
 
-int ide_io_buffers(ide_drive_t *, struct ide_atapi_pc *, unsigned int, int);
+int ide_io_buffers(ide_drive_t *, unsigned int, int);
 
 extern void SELECT_DRIVE(ide_drive_t *);
 void SELECT_MASK(ide_drive_t *, int);
-- 
1.6.0.4


  parent reply	other threads:[~2008-12-16  7:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  7:36 [PATCH 0/9] ide-atapi: remove ide_atapi_pc from the irq handler Borislav Petkov
2008-12-16  7:36 ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 1/9] ide-atapi: remove PC_FLAG_WRITING atapi flag Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 2/9] ide-atapi: replace pc->flags with drive->pc_flags Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 3/9] ide-atapi: replace pc->buf with rq->data in the irq handler Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 4/9] ide-atapi: replace pc->req_xfer with drive->pc_req_xfer Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 5/9] ide-atapi: replace pc->buf_size with drive->pc_buf_size Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` Borislav Petkov [this message]
2008-12-16  7:36   ` [PATCH 6/9] ide-atapi: remove pc arg to drive->pc_io_buffers Borislav Petkov
2008-12-16  7:36 ` [PATCH 7/9] ide-atapi: use rq pointer directly instead of pc->rq deref Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 8/9] ide-atapi: replace pc->error with drive->pc_error Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16  7:36 ` [PATCH 9/9] ide-atapi: remove pc arg to drive->pc_update_buffers Borislav Petkov
2008-12-16  7:36   ` Borislav Petkov
2008-12-16 20:35 ` [PATCH 0/9] ide-atapi: remove ide_atapi_pc from the irq handler Bartlomiej Zolnierkiewicz
2008-12-17  7:25   ` Borislav Petkov
2008-12-17 16:45     ` Bartlomiej Zolnierkiewicz
2008-12-17 19:29       ` Borislav Petkov

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=1229412969-3552-7-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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.