Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112885
b: refs/heads/master
c: 151a670
h: refs/heads/master
i:
  112883: 064fac7
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent ff0adb8 commit bc2276a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8185d5aa93e0a5c111adc4952a5b87193a68ae5b
refs/heads/master: 151a670186a0f8441798f90c8701647adb7a1589
5 changes: 3 additions & 2 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/ide/ide-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

/*
Expand Down

0 comments on commit bc2276a

Please sign in to comment.