Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 151a6701 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: remove SECTOR_WORDS define



Just use SECTOR_SIZE instead.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 8185d5aa
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
	}

+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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)
	{
+3 −2
Original line number Diff line number Diff line
@@ -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;
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading