linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] libata: move ata_id_n_sectors() upward
@ 2007-09-03  3:31 Tejun Heo
  2007-09-03  3:32 ` [PATCH 2/3] libata: clean up read/set native_max address functions Tejun Heo
  2007-09-20 21:22 ` [PATCH 1/3] libata: move ata_id_n_sectors() upward Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2007-09-03  3:31 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide

Move ata_id_n_sectors() upward right below ata_id_c_string().  This is
to accomodate later changes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/libata-core.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index dc5031f..b7b0c42 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -821,6 +821,21 @@ void ata_id_c_string(const u16 *id, unsigned char *s,
 	*p = '\0';
 }
 
+static u64 ata_id_n_sectors(const u16 *id)
+{
+	if (ata_id_has_lba(id)) {
+		if (ata_id_has_lba48(id))
+			return ata_id_u64(id, 100);
+		else
+			return ata_id_u32(id, 60);
+	} else {
+		if (ata_id_current_chs_valid(id))
+			return ata_id_u32(id, 57);
+		else
+			return id[1] * id[3] * id[6];
+	}
+}
+
 static u64 ata_tf_to_lba48(struct ata_taskfile *tf)
 {
 	u64 sectors = 0;
@@ -1021,21 +1036,6 @@ static u64 ata_hpa_resize(struct ata_device *dev)
 	return sectors;
 }
 
-static u64 ata_id_n_sectors(const u16 *id)
-{
-	if (ata_id_has_lba(id)) {
-		if (ata_id_has_lba48(id))
-			return ata_id_u64(id, 100);
-		else
-			return ata_id_u32(id, 60);
-	} else {
-		if (ata_id_current_chs_valid(id))
-			return ata_id_u32(id, 57);
-		else
-			return id[1] * id[3] * id[6];
-	}
-}
-
 /**
  *	ata_id_to_dma_mode	-	Identify DMA mode from id block
  *	@dev: device to identify
-- 
1.5.0.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-20 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-03  3:31 [PATCH 1/3] libata: move ata_id_n_sectors() upward Tejun Heo
2007-09-03  3:32 ` [PATCH 2/3] libata: clean up read/set native_max address functions Tejun Heo
2007-09-20 21:22 ` [PATCH 1/3] libata: move ata_id_n_sectors() upward Jeff Garzik

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).