[PATCH 08/16] ide: remove ->nice0 and ->nice2 fields from ide_drive_t

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Monday, January 21, 2008 - 7:31 pm

* ->nice0 and ->nice2 ide_drive_t fields are always zero so remove them.

* IDE_NICE_0 and IDE_NICE_2 defines from <linux/hdreg.h> are no longer
  used by any kernel code so cover them with #ifndef/#endif __KERNEL__.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide.c     |    5 +----
 include/linux/hdreg.h |    4 +++-
 include/linux/ide.h   |    2 --
 3 files changed, 4 insertions(+), 7 deletions(-)

Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1035,11 +1035,8 @@ int generic_ide_ioctl(ide_drive_t *drive
 		case HDIO_GET_NICE:
 			return put_user(drive->dsc_overlap	<<	IDE_NICE_DSC_OVERLAP	|
 					drive->atapi_overlap	<<	IDE_NICE_ATAPI_OVERLAP	|
-					drive->nice0		<< 	IDE_NICE_0		|
-					drive->nice1		<<	IDE_NICE_1		|
-					drive->nice2		<<	IDE_NICE_2,
+					drive->nice1 << IDE_NICE_1,
 					(long __user *) arg);
-
 #ifdef CONFIG_IDE_TASK_IOCTL
 		case HDIO_DRIVE_TASKFILE:
 		        if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
Index: b/include/linux/hdreg.h
===================================================================
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -706,8 +706,10 @@ struct hd_driveid {
  */
 #define IDE_NICE_DSC_OVERLAP	(0)	/* per the DSC overlap protocol */
 #define IDE_NICE_ATAPI_OVERLAP	(1)	/* not supported yet */
-#define IDE_NICE_0		(2)	/* when sure that it won't affect us */
 #define IDE_NICE_1		(3)	/* when probably won't affect us much */
+#ifndef __KERNEL__
+#define IDE_NICE_0		(2)	/* when sure that it won't affect us */
 #define IDE_NICE_2		(4)	/* when we know it's on our expense */
+#endif
 
 #endif	/* _LINUX_HDREG_H */
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -407,8 +407,6 @@ typedef struct ide_drive_s {
 	unsigned no_unmask	: 1;	/* disallow setting unmask bit */
 	unsigned no_io_32bit	: 1;	/* disallow enabling 32bit I/O */
 	unsigned atapi_overlap	: 1;	/* ATAPI overlap (not supported) */
-	unsigned nice0		: 1;	/* give obvious excess bandwidth */
-	unsigned nice2		: 1;	/* give a share in our own bandwidth */
 	unsigned doorlocking	: 1;	/* for removable only: door lock/unlock works */
 	unsigned nodma		: 1;	/* disallow DMA */
 	unsigned autotune	: 2;	/* 0=default, 1=autotune, 2=noautotune */
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/16] ide: various fixes/cleanups, Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:30 pm)
[PATCH 16/16] ide: move check_dma_crc() to ide-dma.c, Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:32 pm)
[PATCH 15/16] ide: remove ide_auto_reduce_xfer(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:32 pm)
Re: [PATCH 15/16] ide: remove ide_auto_reduce_xfer(), Sergei Shtylyov, (Tue Jan 22, 12:39 pm)
[PATCH 14/16] ide: move drive-&gt;crc_count check out from c..., Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:32 pm)
[PATCH 13/16] ide: remove ide_ata66_check(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:32 pm)
Re: [PATCH 13/16] ide: remove ide_ata66_check(), Sergei Shtylyov, (Tue Jan 22, 12:31 pm)
[PATCH 12/16] ide: remove set_transfer(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
Re: [PATCH 12/16] ide: remove set_transfer(), Sergei Shtylyov, (Tue Jan 22, 10:24 am)
[PATCH 11/16] ide: unexport SELECT_DRIVE(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
Re: [PATCH 11/16] ide: unexport SELECT_DRIVE(), Sergei Shtylyov, (Tue Jan 22, 12:28 pm)
[PATCH 10/16] ide: use __ide_set_handler() in ide_execute_co..., Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 09/16] ide: remove SATA_*_REG macros, Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 08/16] ide: remove ->nice0 and ->nice2 fields f..., Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 07/16] ide: convert -&gt;straight8 field in ide_hwif_..., Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 06/16] ide: remove unused -&gt;auto_poll field from i..., Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 05/16] ide-probe: remove needless Status register reads, Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
[PATCH 04/16] ide-cris: use ide_execute_command(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:31 pm)
Re: [PATCH 04/16] ide-cris: use ide_execute_command(), Sergei Shtylyov, (Tue Jan 22, 10:34 am)
[PATCH 03/16] trm290: use ide_execute_command(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:30 pm)
Re: [PATCH 03/16] trm290: use ide_execute_command(), Sergei Shtylyov, (Tue Jan 22, 10:32 am)
[PATCH 02/16] ide-scsi: use ide_execute_command(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:30 pm)
Re: [PATCH 02/16] ide-scsi: use ide_execute_command(), Sergei Shtylyov, (Tue Jan 22, 10:32 am)
[PATCH 01/16] ide-tape: use ide_execute_command(), Bartlomiej Zolnierkiewicz..., (Mon Jan 21, 7:30 pm)
Re: [PATCH 01/16] ide-tape: use ide_execute_command(), Sergei Shtylyov, (Tue Jan 22, 10:32 am)