]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: remove SECTOR_WORDS define
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 10 Oct 2008 20:39:28 +0000 (22:39 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 10 Oct 2008 20:39:28 +0000 (22:39 +0200)
Just use SECTOR_SIZE instead.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-disk.c
drivers/ide/ide-iops.c
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-taskfile.c
include/linux/ide.h

index 2e43ae15fb1b00ae5ab8f20c2064b2e43f8fb998..474070c1ddb6bb2f29cc9c3a568eb039420255a2 100644 (file)
@@ -539,13 +539,14 @@ static int proc_idedisk_read_smart(char *page, char **start, off_t off,
 
        if (get_smart_data(drive, page, sub_cmd) == 0) {
                unsigned short *val = (unsigned short *) page;
-               char *out = ((char *)val) + (SECTOR_WORDS * 4);
+               char *out = (char *)val + SECTOR_SIZE;
+
                page = out;
                do {
                        out += sprintf(out, "%04x%c", le16_to_cpu(*val),
                                       (++i & 7) ? ' ' : '\n');
                        val += 1;
-               } while (i < (SECTOR_WORDS * 2));
+               } while (i < SECTOR_SIZE / 2);
                len = out - page;
        }
 
index ee44878e40d0990e438ca0cdaf2b48e8731fa3f0..6256c2df62cc2ee0f4390debc2e4e45bb529e5ec 100644 (file)
@@ -693,7 +693,7 @@ int ide_driveid_update(ide_drive_t *drive)
        }
        local_irq_save(flags);
        SELECT_MASK(drive, 0);
-       id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC);
+       id = kmalloc(SECTOR_SIZE, GFP_ATOMIC);
        if (!id) {
                local_irq_restore(flags);
                return 0;
index 62f7e1ef10c14e7efc95faea531b5c3bfce571d3..be121ffcc1dcc9319944b6bbcd3644910f98064c 100644 (file)
@@ -561,7 +561,7 @@ static inline u8 probe_for_drive (ide_drive_t *drive)
         *      Also note that 0 everywhere means "can't do X"
         */
  
-       drive->id = kzalloc(SECTOR_WORDS *4, GFP_KERNEL);
+       drive->id = kzalloc(SECTOR_SIZE, GFP_KERNEL);
        drive->id_read = 0;
        if(drive->id == NULL)
        {
index 5634b3971d217fecce1da1c4523697bdd00c41b5..6489c647be824263e4bd660c1f7ceb4818dde1a0 100644 (file)
@@ -100,13 +100,14 @@ static int proc_ide_read_identify
 
                err = taskfile_lib_get_identify(drive, page);
                if (!err) {
-                       char *out = ((char *)page) + (SECTOR_WORDS * 4);
+                       char *out = (char *)page + SECTOR_SIZE;
+
                        page = out;
                        do {
                                out += sprintf(out, "%04x%c",
                                        le16_to_cpup(val), (++i & 7) ? ' ' : '\n');
                                val += 1;
-                       } while (i < (SECTOR_WORDS * 2));
+                       } while (i < SECTOR_SIZE / 2);
                        len = out - page;
                }
        }
index b1fb815dbf68bb2fda773b1f898235afbc81e46e..7ffe9004a4d69137a6e4b788997873e6669daf48 100644 (file)
@@ -768,7 +768,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 
        if (args[3]) {
                tfargs.tf_flags |= IDE_TFLAG_IO_16BIT;
-               bufsize = SECTOR_WORDS * 4 * args[3];
+               bufsize = SECTOR_SIZE * args[3];
                buf = kzalloc(bufsize, GFP_KERNEL);
                if (buf == NULL)
                        return -ENOMEM;
index 4667ec8aeebb0a93fbe3df82ff05c51129b3ae8c..4444b0884e5dbb4ca2aad16b894481cfe7a4b46c 100644 (file)
@@ -126,7 +126,7 @@ struct ide_io_ports {
 #define PARTN_BITS     6       /* number of minor dev bits for partitions */
 #define MAX_DRIVES     2       /* per interface; 2 assumed by lots of code */
 #define SECTOR_SIZE    512
-#define SECTOR_WORDS   (SECTOR_SIZE / 4)       /* number of 32bit words per sector */
+
 #define IDE_LARGE_SEEK(b1,b2,t)        (((b1) > (b2) + (t)) || ((b2) > (b1) + (t)))
 
 /*