Re: [PATCH 3/3] IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c

2008-02-25 Thread Paolo Ciarrocchi
On Mon, Feb 25, 2008 at 8:31 AM, Ingo Molnar [EMAIL PROTECTED] wrote:

  * Paolo Ciarrocchi [EMAIL PROTECTED] wrote:

   Before:
   total: 34 errors, 14 warnings, 456 lines checked
  
   After:
   total: 0 errors, 8 warnings, 456 lines checked

  sidenote: please also indicate to maintainers that the cleanup causes no
  change in generated code. Find below of how one of your cleanup patches
  looks like in its final form in x86.git. (i auto-generated all of the
  commit log)

  info like that makes it easier for maintainers to see the intended zero
  impact of your changes.

Sure, I'll script that.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/6] IDE: new series of Coding Style Fixes

2008-02-24 Thread Paolo Ciarrocchi
On Sun, Feb 24, 2008 at 5:38 PM, Bartlomiej Zolnierkiewicz
[EMAIL PROTECTED] wrote:

  On Saturday 23 February 2008, Paolo Ciarrocchi wrote:
   Bart,
   here is a new series of patches that remove some errors
   and warnings reported by checkpatch.pl from the IDE subsystem.
  
   All the patches have been compile tested and are against this morning (CET 
 time :-)
   linux-next
  
   Paolo Ciarrocchi (6):
 IDE: Coding Style fixes to drivers/ide/pci/opti621.c
 IDE: Coding Style fixes to drivers/ide/legacy/hd.c
 IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c
 IDE: Coding Style fixes to drivers/ide/pci/it8213.c

  the above change (patch 4/6) seems to be m.i.a. ?


Yes, sorry about that. I must have forgot to manually send out the patch.
I'll do that as soon as I access again to the linux box.

I really wish to be able to use git-send-mail with gmail,
unfortunatelly it's still not working
even applying all the suggestions I've got from other gmail/git users.

 IDE: Coding Style fixes to drivers/ide/ide-floppy.c
 IDE: Coding Style fixes to drivers/ide/pci/cmd640.c
  
drivers/ide/ide-floppy.c |4 +-
drivers/ide/legacy/ali14xx.c |   11 +++--
drivers/ide/legacy/hd.c  |   79 ++--
drivers/ide/pci/cmd640.c |   90 
 +-
drivers/ide/pci/it8213.c |9 ++--
drivers/ide/pci/opti621.c|   50 
6 files changed, 122 insertions(+), 121 deletions(-)

  I applied all the rest (some with minor fixes).

Good. Where can I look to see the end result of our work?


Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/6] IDE: Coding Style fixes to drivers/ide/pci/it8213.c

2008-02-24 Thread Paolo Ciarrocchi
File is now error free, only a few
WARNING: line over 80 characters
are left.

Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/it8213.c |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c
index a5ba7e8..5b5b0cc 100644
--- a/drivers/ide/pci/it8213.c
+++ b/drivers/ide/pci/it8213.c
@@ -35,7 +35,7 @@ static void it8213_set_pio_mode(ide_drive_t *drive, const u8 
pio)
static DEFINE_SPINLOCK(tune_lock);
int control = 0;
 
-   static const u8 timings[][2]= {
+   static const u8 timings[][2] = {
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
@@ -105,11 +105,10 @@ static void it8213_set_dma_mode(ide_drive_t *drive, const 
u8 speed)
 
if (!(reg48  u_flag))
pci_write_config_byte(dev, 0x48, reg48 | u_flag);
-   if (speed = XFER_UDMA_5) {
+   if (speed = XFER_UDMA_5)
pci_write_config_byte(dev, 0x55, (u8) reg55|w_flag);
-   } else {
+   else
pci_write_config_byte(dev, 0x55, (u8) reg55  ~w_flag);
-   }
 
if ((reg4a  a_speed) != u_speed)
pci_write_config_word(dev, 0x4a, (reg4a  ~a_speed) | 
u_speed);
@@ -170,7 +169,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
{   \
.name   = name_str, \
.init_hwif  = init_hwif_it8213, \
-   .enablebits = {{0x41,0x80,0x80}}, \
+   .enablebits = { {0x41, 0x80, 0x80} }, \
.host_flags = IDE_HFLAG_SINGLE, \
.pio_mask   = ATA_PIO4, \
.swdma_mask = ATA_SWDMA2_ONLY,  \
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] IDE: Coding Style fixes to drivers/ide/ide-cd.c

2008-02-24 Thread Paolo Ciarrocchi
Before:
total: 43 errors, 66 warnings, 2183 lines checked

After:
total: 0 errors, 36 warnings, 2192 lines checked

I didn't (and I don't plan to) fix the warnings:
WARNING: line over 80 characters


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/ide-cd.c |  245 ++
 1 files changed, 127 insertions(+), 118 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 546f436..3181e71 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -13,8 +13,8 @@
  *
  * Suggestions are welcome. Patches that work are more welcome though. ;-)
  * For those wishing to work on this driver, please be sure you download
- * and comply with the latest Mt. Fuji (SFF8090 version 4) and ATAPI 
- * (SFF-8020i rev 2.6) standards. These documents can be obtained by 
+ * and comply with the latest Mt. Fuji (SFF8090 version 4) and ATAPI
+ * (SFF-8020i rev 2.6) standards. These documents can be obtained by
  * anonymous ftp from:
  * 
ftp://fission.dt.wdc.com/pub/standards/SFF_atapi/spec/SFF8020-r2.6/PS/8020r26.ps
  * ftp://ftp.avc-pioneer.com/Mtfuji4/Spec/Fuji4r10.pdf
@@ -51,7 +51,7 @@
 
 static DEFINE_MUTEX(idecd_ref_mutex);
 
-#define to_ide_cd(obj) container_of(obj, struct cdrom_info, kref) 
+#define to_ide_cd(obj) container_of(obj, struct cdrom_info, kref)
 
 #define ide_cd_g(disk) \
container_of((disk)-private_data, struct cdrom_info, driver)
@@ -83,7 +83,7 @@ static void ide_cd_put(struct cdrom_info *cd)
 
 /* Mark that we've seen a media change, and invalidate our internal
buffers. */
-static void cdrom_saw_media_change (ide_drive_t *drive)
+static void cdrom_saw_media_change(ide_drive_t *drive)
 {
struct cdrom_info *cd = drive-driver_data;
 
@@ -100,37 +100,37 @@ static int cdrom_log_sense(ide_drive_t *drive, struct 
request *rq,
return 0;
 
switch (sense-sense_key) {
-   case NO_SENSE: case RECOVERED_ERROR:
-   break;
-   case NOT_READY:
-   /*
-* don't care about tray state messages for
-* e.g. capacity commands or in-progress or
-* becoming ready
-*/
-   if (sense-asc == 0x3a || sense-asc == 0x04)
-   break;
-   log = 1;
-   break;
-   case ILLEGAL_REQUEST:
-   /*
-* don't log START_STOP unit with LoEj set, since
-* we cannot reliably check if drive can auto-close
-*/
-   if (rq-cmd[0] == GPCMD_START_STOP_UNIT  sense-asc 
== 0x24)
-   break;
-   log = 1;
+   case NO_SENSE: case RECOVERED_ERROR:
+   break;
+   case NOT_READY:
+   /*
+* don't care about tray state messages for
+* e.g. capacity commands or in-progress or
+* becoming ready
+*/
+   if (sense-asc == 0x3a || sense-asc == 0x04)
break;
-   case UNIT_ATTENTION:
-   /*
-* Make good and sure we've seen this potential media
-* change. Some drives (i.e. Creative) fail to present
-* the correct sense key in the error register.
-*/
-   cdrom_saw_media_change(drive);
+   log = 1;
+   break;
+   case ILLEGAL_REQUEST:
+   /*
+* don't log START_STOP unit with LoEj set, since
+* we cannot reliably check if drive can auto-close
+*/
+   if (rq-cmd[0] == GPCMD_START_STOP_UNIT  sense-asc == 0x24)
break;
-   default:
-   log = 1;
+   log = 1;
+   break;
+   case UNIT_ATTENTION:
+   /*
+* Make good and sure we've seen this potential media
+* change. Some drives (i.e. Creative) fail to present
+* the correct sense key in the error register.
+*/
+   cdrom_saw_media_change(drive);
+   break;
+   default:
+   log = 1;
break;
}
return log;
@@ -158,8 +158,8 @@ void cdrom_analyze_sense_data(ide_drive_t *drive,
if (sense-sense_key == 0x05  sense-asc == 0x24)
return;
 
-   if (sense-error_code == 0x70) {/* Current Error */
-   switch(sense-sense_key) {
+   if (sense-error_code == 0x70) {/* Current Error */
+   switch (sense-sense_key) {
case MEDIUM_ERROR:
case VOLUME_OVERFLOW:
case ILLEGAL_REQUEST

[PATCH 3/3] IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c

2008-02-24 Thread Paolo Ciarrocchi
Before:
total: 34 errors, 14 warnings, 456 lines checked

After:
total: 0 errors, 8 warnings, 456 lines checked



Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/cy82c693.c |   74 ++--
 1 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 833fa4d..08eab7e 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -6,7 +6,7 @@
  *
  * The CY82C693 chipset is used on Digital's PC-Alpha 164SX boards.
  * Writing the driver was quite simple, since most of the job is
- * done by the generic pci-ide support. 
+ * done by the generic pci-ide support.
  * The hard part was finding the CY82C693's datasheet on Cypress's
  * web page :-(. But Altavista solved this problem :-).
  *
@@ -15,12 +15,12 @@
  * - I recently got a 16.8G IBM DTTA, so I was able to test it with
  *   a large and fast disk - the results look great, so I'd say the
  *   driver is working fine :-)
- *   hdparm -t reports 8.17 MB/sec at about 6% CPU usage for the DTTA 
- * - this is my first linux driver, so there's probably a lot  of room 
+ *   hdparm -t reports 8.17 MB/sec at about 6% CPU usage for the DTTA
+ * - this is my first linux driver, so there's probably a lot  of room
  *   for optimizations and bug fixing, so feel free to do it.
  * - use idebus=xx parameter to set PCI bus speed - needed to calc
  *   timings for PIO modes (default will be 40)
- * - if using PIO mode it's a good idea to set the PIO mode and 
+ * - if using PIO mode it's a good idea to set the PIO mode and
  *   32-bit I/O support (if possible), e.g. hdparm -p2 -c1 /dev/hda
  * - I had some problems with my IBM DHEA with PIO modes  2
  *   (lost interrupts) ?
@@ -110,11 +110,11 @@ typedef struct pio_clocks_s {
  * calc clocks using bus_speed
  * returns (rounded up) time in bus clocks for time in ns
  */
-static int calc_clk (int time, int bus_speed)
+static int calc_clk(int time, int bus_speed)
 {
int clocks;
 
-   clocks = (time*bus_speed+999)/1000 -1;
+   clocks = (time*bus_speed+999)/1000 - 1;
 
if (clocks  0)
clocks = 0;
@@ -132,8 +132,8 @@ static int calc_clk (int time, int bus_speed)
  * NOTE: for mode 0,1 and 2 drives 8-bit IDE command control registers are used
  *   for mode 3 and 4 drives 8 and 16-bit timings are the same
  *
- */ 
-static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
+ */
+static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
 {
int clk1, clk2;
int bus_speed = system_bus_clock(); /* get speed of PCI bus */
@@ -158,7 +158,7 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
clk1 = (clk14)|clk2;  /* combine active and recovery clocks */
 
/* note: we use the same values for 16bit IOR and IOW
- * those are all the same, since I don't have other
+*  those are all the same, since I don't have other
 *  timings than those from ide-lib.c
 */
 
@@ -186,7 +186,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const 
u8 mode)
outb(index, CY82_INDEX_PORT);
data = inb(CY82_DATA_PORT);
 
-   printk (KERN_INFO %s (ch=%d, dev=%d): DMA mode is %d (single=%d)\n,
+   printk(KERN_INFO %s (ch=%d, dev=%d): DMA mode is %d (single=%d)\n,
drive-name, HWIF(drive)-channel, drive-select.b.unit,
(data0x3), ((data2)1));
 #endif /* CY82C693_DEBUG_LOGS */
@@ -202,7 +202,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const 
u8 mode)
mode  3, single);
 #endif /* CY82C693_DEBUG_INFO */
 
-   /* 
+   /*
 * note: below we set the value for Bus Master IDE TimeOut Register
 * I'm not absolutly sure what this does, but it solved my problem
 * with IDE DMA and sound, so I now can play sound and work with
@@ -216,8 +216,8 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const 
u8 mode)
outb(CY82_INDEX_TIMEOUT, CY82_INDEX_PORT);
outb(data, CY82_DATA_PORT);
 
-#if CY82C693_DEBUG_INFO
-   printk (KERN_INFO %s: Set IDE Bus Master TimeOut Register to 0x%X\n,
+#if CY82C693_DEBUG_INFO
+   printk(KERN_INFO %s: Set IDE Bus Master TimeOut Register to 0x%X\n,
drive-name, data);
 #endif /* CY82C693_DEBUG_INFO */
 }
@@ -242,14 +242,14 @@ static void cy82c693_set_pio_mode(ide_drive_t *drive, 
const u8 pio)
 
 #if CY82C693_DEBUG_LOGS
/* for debug let's show the register values */
-   
-   if (drive-select.b.unit == 0) {
+
+   if (drive-select.b.unit == 0) {
/*
-* get master drive registers   
+* get master drive registers
 * address setup control register
 * is 32 bit !!!
-*/ 
-   pci_read_config_dword(dev, CY82_IDE_ADDRSETUP, addrCtrl

[PATCH 0/3] Various IDE coding style fixes

2008-02-24 Thread Paolo Ciarrocchi
Hi Bart,
three more patches, all are compile tested and against yesterday linux-next

IDE: Replace __FUNCTION__ with __func__ depends 
on IDE: Coding Style fixes to drivers/ide/ide-cd.c


Paolo Ciarrocchi (3):
  IDE: Coding Style fixes to drivers/ide/ide-cd.c
  IDE: Replace __FUNCTION__ with __func__
  IDE: Coding Style fixes to drivers/ide/pci/cy82c693.c

 drivers/ide/ide-cd.c   |  259 +++-
 drivers/ide/pci/cy82c693.c |   74 +++---
 2 files changed, 171 insertions(+), 162 deletions(-)

Ciao,
  Paolo
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] IDE: Replace __FUNCTION__ with __func__

2008-02-24 Thread Paolo Ciarrocchi
On 2/25/08, Joe Perches [EMAIL PROTECTED] wrote:
 On Sun, 2008-02-24 at 22:11 +0100, Paolo Ciarrocchi wrote:
  -   driver.\n, __FUNCTION__, drive-name);
  +   driver.\n, __func__, drive-name);

 Is there consensus on this style conversion?

I did that in a separate patch because i'm not sure about that.

 Right now, there's 629 uses of __FUNCTION__ and 439 uses of __func__.

Checkpatch.pl indicate the conversion as a janitorial task.

Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/10] IDE: Coding Style fixes to drivers/ide/pci/sis5513.c

2008-02-23 Thread Paolo Ciarrocchi
About 300 errors and warnings fixed.
File is now error free.
Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/sis5513.c |  190 ++---
 1 files changed, 93 insertions(+), 97 deletions(-)

diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index e29c90f..bf4ddbc 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -59,10 +59,10 @@
 #define ATA_16 0x01
 #define ATA_33 0x02
 #define ATA_66 0x03
-#define ATA_100a   0x04 // SiS730/SiS550 is ATA100 with ATA66 layout
+#define ATA_100a   0x04 /* SiS730/SiS550 is ATA100 with ATA66 layout */
 #define ATA_1000x05
-#define ATA_133a   0x06 // SiS961b with 133 support
-#define ATA_1330x07 // SiS962/963
+#define ATA_133a   0x06 /* SiS961b with 133 support */
+#define ATA_1330x07 /* SiS962/963 */
 
 static u8 chipset_family;
 
@@ -111,69 +111,69 @@ static const struct {
Indexed by chipset_family and (dma_mode - XFER_UDMA_0) */
 
 /* {0, ATA_16, ATA_33, ATA_66, ATA_100a, ATA_100, ATA_133} */
-static u8 cycle_time_offset[] = {0,0,5,4,4,0,0};
-static u8 cycle_time_range[] = {0,0,2,3,3,4,4};
+static u8 cycle_time_offset[] = {0, 0, 5, 4, 4, 0, 0};
+static u8 cycle_time_range[] = {0, 0, 2, 3, 3, 4, 4};
 static u8 cycle_time_value[][XFER_UDMA_6 - XFER_UDMA_0 + 1] = {
-   {0,0,0,0,0,0,0}, /* no udma */
-   {0,0,0,0,0,0,0}, /* no udma */
-   {3,2,1,0,0,0,0}, /* ATA_33 */
-   {7,5,3,2,1,0,0}, /* ATA_66 */
-   {7,5,3,2,1,0,0}, /* ATA_100a (730 specific), differences are on 
cycle_time range and offset */
-   {11,7,5,4,2,1,0}, /* ATA_100 */
-   {15,10,7,5,3,2,1}, /* ATA_133a (earliest 691 southbridges) */
-   {15,10,7,5,3,2,1}, /* ATA_133 */
+   {0, 0, 0, 0, 0, 0, 0}, /* no udma */
+   {0, 0, 0, 0, 0, 0, 0}, /* no udma */
+   {3, 2, 1, 0, 0, 0, 0}, /* ATA_33 */
+   {7, 5, 3, 2, 1, 0, 0}, /* ATA_66 */
+   {7, 5, 3, 2, 1, 0, 0}, /* ATA_100a (730 specific), differences are on 
cycle_time range and offset */
+   {11, 7, 5, 4, 2, 1, 0}, /* ATA_100 */
+   {15, 10, 7, 5, 3, 2, 1}, /* ATA_133a (earliest 691 southbridges) */
+   {15, 10, 7, 5, 3, 2, 1}, /* ATA_133 */
 };
 /* CRC Valid Setup Time vary across IDE clock setting 33/66/100/133
See SiS962 data sheet for more detail */
 static u8 cvs_time_value[][XFER_UDMA_6 - XFER_UDMA_0 + 1] = {
-   {0,0,0,0,0,0,0}, /* no udma */
-   {0,0,0,0,0,0,0}, /* no udma */
-   {2,1,1,0,0,0,0},
-   {4,3,2,1,0,0,0},
-   {4,3,2,1,0,0,0},
-   {6,4,3,1,1,1,0},
-   {9,6,4,2,2,2,2},
-   {9,6,4,2,2,2,2},
+   {0, 0, 0, 0, 0, 0, 0}, /* no udma */
+   {0, 0, 0, 0, 0, 0, 0}, /* no udma */
+   {2, 1, 1, 0, 0, 0, 0},
+   {4, 3, 2, 1, 0, 0, 0},
+   {4, 3, 2, 1, 0, 0, 0},
+   {6, 4, 3, 1, 1, 1, 0},
+   {9, 6, 4, 2, 2, 2, 2},
+   {9, 6, 4, 2, 2, 2, 2},
 };
 /* Initialize time, Active time, Recovery time vary across
IDE clock settings. These 3 arrays hold the register value
for PIO0/1/2/3/4 and DMA0/1/2 mode in order */
 static u8 ini_time_value[][8] = {
-   {0,0,0,0,0,0,0,0},
-   {0,0,0,0,0,0,0,0},
-   {2,1,0,0,0,1,0,0},
-   {4,3,1,1,1,3,1,1},
-   {4,3,1,1,1,3,1,1},
-   {6,4,2,2,2,4,2,2},
-   {9,6,3,3,3,6,3,3},
-   {9,6,3,3,3,6,3,3},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {2, 1, 0, 0, 0, 1, 0, 0},
+   {4, 3, 1, 1, 1, 3, 1, 1},
+   {4, 3, 1, 1, 1, 3, 1, 1},
+   {6, 4, 2, 2, 2, 4, 2, 2},
+   {9, 6, 3, 3, 3, 6, 3, 3},
+   {9, 6, 3, 3, 3, 6, 3, 3},
 };
 static u8 act_time_value[][8] = {
-   {0,0,0,0,0,0,0,0},
-   {0,0,0,0,0,0,0,0},
-   {9,9,9,2,2,7,2,2},
-   {19,19,19,5,4,14,5,4},
-   {19,19,19,5,4,14,5,4},
-   {28,28,28,7,6,21,7,6},
-   {38,38,38,10,9,28,10,9},
-   {38,38,38,10,9,28,10,9},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {9, 9, 9, 2, 2, 7, 2, 2},
+   {19, 19, 19, 5, 4, 14, 5, 4},
+   {19, 19, 19, 5, 4, 14, 5, 4},
+   {28, 28, 28, 7, 6, 21, 7, 6},
+   {38, 38, 38, 10, 9, 28, 10, 9},
+   {38, 38, 38, 10, 9, 28, 10, 9},
 };
 static u8 rco_time_value[][8] = {
-   {0,0,0,0,0,0,0,0},
-   {0,0,0,0,0,0,0,0},
-   {9,2,0,2,0,7,1,1},
-   {19,5,1,5,2,16,3,2},
-   {19,5,1,5,2,16,3,2},
-   {30,9,3,9,4,25,6,4},
-   {40,12,4,12,5,34,12,5},
-   {40,12,4,12,5,34,12,5},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {0, 0, 0, 0, 0, 0, 0, 0},
+   {9, 2, 0, 2, 0, 7, 1, 1},
+   {19, 5, 1, 5, 2, 16, 3, 2},
+   {19, 5, 1, 5, 2, 16, 3, 2},
+   {30, 9, 3, 9, 4, 25, 6, 4},
+   {40, 12, 4, 12, 5, 34, 12, 5},
+   {40, 12, 4, 12, 5, 34, 12, 5},
 };
 
 /*
  * Printing configuration
  */
 /* Used for chipset type printing at boot time */
-static char* chipset_capability[] = {
+static char *chipset_capability[] = {
ATA, ATA 16

[PATCH 02/10] IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/legacy/umc8672.c |   53 -
 1 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index 43ee632..7783b59 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -19,7 +19,7 @@
  */
 
 /*
- * VLB Controller Support from 
+ * VLB Controller Support from
  * Wolfram Podien
  * Rohoefe 3
  * D28832 Achim
@@ -32,7 +32,7 @@
  * #define UMC_DRIVE0 11
  * in the beginning of the driver, which sets the speed of drive 0 to 11 (there
  * are some lines present). 0 - 11 are allowed speed values. These values are
- * the results from the DOS speed test program supplied from UMC. 11 is the 
+ * the results from the DOS speed test program supplied from UMC. 11 is the
  * highest speed (about PIO mode 3)
  */
 #define REALLY_SLOW_IO /* some systems can safely undef this */
@@ -60,46 +60,45 @@
 #define UMC_DRIVE3  1  /* In case of crash reduce speed */
 
 static u8 current_speeds[4] = {UMC_DRIVE0, UMC_DRIVE1, UMC_DRIVE2, UMC_DRIVE3};
-static const u8 pio_to_umc [5] = {0,3,7,10,11};/* rough guesses */
+static const u8 pio_to_umc [5] = {0, 3, 7, 10, 11};/* rough guesses */
 
 /*   012345678910   11  */
 static const u8 speedtab [3][12] = {
{0xf, 0xb, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 },
{0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 },
-   {0xff,0xcb,0xc0,0x58,0x36,0x33,0x23,0x22,0x21,0x11,0x10,0x0}};
+   {0xff, 0xcb, 0xc0, 0x58, 0x36, 0x33, 0x23, 0x22, 0x21, 0x11, 0x10, 0x0} 
};
 
-static void out_umc (char port,char wert)
+static void out_umc(char port, char wert)
 {
-   outb_p(port,0x108);
-   outb_p(wert,0x109);
+   outb_p(port, 0x108);
+   outb_p(wert, 0x109);
 }
 
-static inline u8 in_umc (char port)
+static inline u8 in_umc(char port)
 {
-   outb_p(port,0x108);
+   outb_p(port, 0x108);
return inb_p(0x109);
 }
 
-static void umc_set_speeds (u8 speeds[])
+static void umc_set_speeds(u8 speeds[])
 {
int i, tmp;
 
-   outb_p(0x5A,0x108); /* enable umc */
+   outb_p(0x5A, 0x108); /* enable umc */
 
-   out_umc (0xd7,(speedtab[0][speeds[2]] | (speedtab[0][speeds[3]]4)));
-   out_umc (0xd6,(speedtab[0][speeds[0]] | (speedtab[0][speeds[1]]4)));
+   out_umc(0xd7, (speedtab[0][speeds[2]] | (speedtab[0][speeds[3]]4)));
+   out_umc(0xd6, (speedtab[0][speeds[0]] | (speedtab[0][speeds[1]]4)));
tmp = 0;
-   for (i = 3; i = 0; i--) {
+   for (i = 3; i = 0; i--)
tmp = (tmp  2) | speedtab[1][speeds[i]];
+   out_umc(0xdc, tmp);
+   for (i = 0; i  4; i++) {
+   out_umc(0xd0+i, speedtab[2][speeds[i]]);
+   out_umc(0xd8+i, speedtab[2][speeds[i]]);
}
-   out_umc (0xdc,tmp);
-   for (i = 0;i  4; i++) {
-   out_umc (0xd0+i,speedtab[2][speeds[i]]);
-   out_umc (0xd8+i,speedtab[2][speeds[i]]);
-   }
-   outb_p(0xa5,0x108); /* disable umc */
+   outb_p(0xa5, 0x108); /* disable umc */
 
-   printk (umc8672: drive speeds [0 to 11]: %d %d %d %d\n,
+   printk(umc8672: drive speeds [0 to 11]: %d %d %d %d\n,
speeds[0], speeds[1], speeds[2], speeds[3]);
 }
 
@@ -115,7 +114,7 @@ static void umc_set_pio_mode(ide_drive_t *drive, const u8 
pio)
printk(KERN_ERR umc8672: other interface is busy: exiting 
tune_umc()\n);
} else {
current_speeds[drive-name[2] - 'a'] = pio_to_umc[pio];
-   umc_set_speeds (current_speeds);
+   umc_set_speeds(current_speeds);
}
spin_unlock_irqrestore(ide_lock, flags);
 }
@@ -138,16 +137,16 @@ static int __init umc8672_probe(void)
return 1;
}
local_irq_save(flags);
-   outb_p(0x5A,0x108); /* enable umc */
+   outb_p(0x5A, 0x108); /* enable umc */
if (in_umc (0xd5) != 0xa0) {
local_irq_restore(flags);
printk(KERN_ERR umc8672: not found\n);
release_region(0x108, 2);
-   return 1;  
+   return 1;
}
-   outb_p(0xa5,0x108); /* disable umc */
+   outb_p(0xa5, 0x108); /* disable umc */
 
-   umc_set_speeds (current_speeds);
+   umc_set_speeds(current_speeds);
local_irq_restore(flags);
 
memset(hw, 0, sizeof(hw));
@@ -177,7 +176,7 @@ static int __init umc8672_probe(void)
return 0;
 }
 
-int probe_umc8672 = 0;
+int probe_umc8672;
 
 module_param_named(probe, probe_umc8672, bool, 0);
 MODULE_PARM_DESC(probe, probe for UMC8672 chipset);
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo

[PATCH 03/10] IDE: Coding Style fixes to drivers/ide/ide-pnp.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/ide-pnp.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index c125b05..479663d 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -11,7 +11,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * (for example /usr/src/linux/COPYING); if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include linux/init.h
@@ -20,12 +20,12 @@
 
 /* Add your devices here :)) */
 static struct pnp_device_id idepnp_devices[] = {
-   /* Generic ESDI/IDE/ATA compatible hard disk controller */
+   /* Generic ESDI/IDE/ATA compatible hard disk controller */
{.id = PNP0600, .driver_data = 0},
{.id = }
 };
 
-static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id 
*dev_id)
+static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id 
*dev_id)
 {
hw_regs_t hw;
ide_hwif_t *hwif;
@@ -47,7 +47,7 @@ static int idepnp_probe(struct pnp_dev * dev, const struct 
pnp_device_id *dev_id
ide_init_port_hw(hwif, hw);
 
printk(KERN_INFO ide%d: generic PnP IDE interface\n, index);
-   pnp_set_drvdata(dev,hwif);
+   pnp_set_drvdata(dev, hwif);
 
ide_device_add(idx, NULL);
 
@@ -57,7 +57,7 @@ static int idepnp_probe(struct pnp_dev * dev, const struct 
pnp_device_id *dev_id
return -1;
 }
 
-static void idepnp_remove(struct pnp_dev * dev)
+static void idepnp_remove(struct pnp_dev *dev)
 {
ide_hwif_t *hwif = pnp_get_drvdata(dev);
 
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/10] IDE: Coding Style fixes to drivers/ide/setup-pci.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/setup-pci.c |   45 -
 1 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 1f2d8f9..631be79 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -27,13 +27,13 @@
  *
  * We attempt to place the PCI interface into PCI native mode. If
  * we succeed the BARs are ok and the controller is in PCI mode.
- * Returns 0 on success or an errno code. 
+ * Returns 0 on success or an errno code.
  *
  * FIXME: if we program the interface and then fail to set the BARS
  * we don't switch it back to legacy mode. Do we actually care ??
  */
- 
-static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name)
+
+static int ide_setup_pci_baseregs(struct pci_dev *dev, const char *name)
 {
u8 progif = 0;
 
@@ -71,7 +71,7 @@ static void ide_pci_clear_simplex(unsigned long dma_base, 
const char *name)
printk(KERN_INFO %s: simplex device: DMA forced\n, name);
 }
 
-/**
+/*
  * ide_get_or_set_dma_base -   setup BMIBA
  * @d: IDE port info
  * @hwif: IDE interface
@@ -140,11 +140,10 @@ void ide_setup_pci_noise(struct pci_dev *dev, const 
struct ide_port_info *d)
  PCI slot %s\n, d-name, dev-vendor, dev-device,
 dev-revision, pci_name(dev));
 }
-
 EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
 
 
-/**
+/*
  * ide_pci_enable  -   do PCI enables
  * @dev: PCI device
  * @d: IDE port info
@@ -153,7 +152,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
  * but if that fails then we only need IO space. The PCI code should
  * have setup the proper resources for us already for controllers in
  * legacy mode.
- * 
+ *
  * Returns zero on success or an error code
  */
 
@@ -212,8 +211,8 @@ static int ide_pci_configure(struct pci_dev *dev, const 
struct ide_port_info *d)
 * Maybe the user deliberately *disabled* the device,
 * but we'll eventually ignore it again if no drives respond.
 */
-   if (ide_setup_pci_baseregs(dev, d-name) || pci_write_config_word(dev, 
PCI_COMMAND, pcicmd|PCI_COMMAND_IO)) 
-   {
+   if (ide_setup_pci_baseregs(dev, d-name) || pci_write_config_word(dev,
+   PCI_COMMAND, pcicmd|PCI_COMMAND_IO)) {
printk(KERN_INFO %s: device disabled (BIOS)\n, d-name);
return -ENODEV;
}
@@ -241,15 +240,15 @@ static int ide_pci_configure(struct pci_dev *dev, const 
struct ide_port_info *d)
 static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info 
*d, int bar)
 {
ulong flags = pci_resource_flags(dev, bar);
-   
+
/* Unconfigured ? */
if (!flags || pci_resource_len(dev, bar) == 0)
return 0;
 
-   /* I/O space */ 
-   if(flags  PCI_BASE_ADDRESS_IO_MASK)
+   /* I/O space */
+   if (flags  PCI_BASE_ADDRESS_IO_MASK)
return 0;
-   
+
/* Bad */
printk(KERN_ERR %s: IO baseregs (BIOS) are reported 
as MEM, report to 
@@ -257,7 +256,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, const 
struct ide_port_info *
return -EINVAL;
 }
 
-/**
+/*
  * ide_hwif_configure  -   configure an IDE interface
  * @dev: PCI device holding interface
  * @d: IDE port info
@@ -284,7 +283,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev,
/*  Possibly we should fail if these checks report true */
ide_pci_check_iomem(dev, d, 2*port);
ide_pci_check_iomem(dev, d, 2*port+1);
- 
+
ctl  = pci_resource_start(dev, 2*port+1);
base = pci_resource_start(dev, 2*port);
if ((ctl  !base) || (base  !ctl)) {
@@ -293,8 +292,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev,
return NULL;
}
}
-   if (!ctl)
-   {
+   if (!ctl) {
/* Use default values */
ctl = port ? 0x374 : 0x3f4;
base = port ? 0x170 : 0x1f0;
@@ -328,7 +326,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev,
 }
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
-/**
+/*
  * ide_hwif_setup_dma  -   configure DMA interface
  * @hwif: IDE interface
  * @d: IDE port info
@@ -351,9 +349,9 @@ void ide_hwif_setup_dma(ide_hwif_t *hwif, const struct 
ide_port_info *d)
unsigned long dma_base = ide_get_or_set_dma_base(d, hwif);
if (dma_base  !(pcicmd  PCI_COMMAND_MASTER)) {
/*
-* Set up BM-DMA capability
+* Set up BM-DMA capability
 * (PnP BIOS should have done

[PATCH 05/10] IDE: Coding Style fixes to drivers/ide/ide-proc.c

2008-02-23 Thread Paolo Ciarrocchi
Lot of errors and warnings removed.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/ide-proc.c |  175 +++
 1 files changed, 86 insertions(+), 89 deletions(-)

diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 7c4af31..a1833d6 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -47,28 +47,28 @@ static int proc_ide_read_imodel
const char  *name;
 
switch (hwif-chipset) {
-   case ide_generic:   name = generic;   break;
-   case ide_pci:   name = pci;   break;
-   case ide_cmd640:name = cmd640;break;
-   case ide_dtc2278:   name = dtc2278;   break;
-   case ide_ali14xx:   name = ali14xx;   break;
-   case ide_qd65xx:name = qd65xx;break;
-   case ide_umc8672:   name = umc8672;   break;
-   case ide_ht6560b:   name = ht6560b;   break;
-   case ide_rz1000:name = rz1000;break;
-   case ide_trm290:name = trm290;break;
-   case ide_cmd646:name = cmd646;break;
-   case ide_cy82c693:  name = cy82c693;  break;
-   case ide_4drives:   name = 4drives;   break;
-   case ide_pmac:  name = mac-io;break;
-   case ide_au1xxx:name = au1xxx;break;
-   case ide_palm3710:  name = palm3710;  break;
-   case ide_etrax100:  name = etrax100;  break;
-   case ide_acorn: name = acorn; break;
-   default:name = (unknown); break;
+   case ide_generic:   name = generic;   break;
+   case ide_pci:   name = pci;   break;
+   case ide_cmd640:name = cmd640;break;
+   case ide_dtc2278:   name = dtc2278;   break;
+   case ide_ali14xx:   name = ali14xx;   break;
+   case ide_qd65xx:name = qd65xx;break;
+   case ide_umc8672:   name = umc8672;   break;
+   case ide_ht6560b:   name = ht6560b;   break;
+   case ide_rz1000:name = rz1000;break;
+   case ide_trm290:name = trm290;break;
+   case ide_cmd646:name = cmd646;break;
+   case ide_cy82c693:  name = cy82c693;  break;
+   case ide_4drives:   name = 4drives;   break;
+   case ide_pmac:  name = mac-io;break;
+   case ide_au1xxx:name = au1xxx;break;
+   case ide_palm3710:  name = palm3710;  break;
+   case ide_etrax100:  name = etrax100;  break;
+   case ide_acorn: name = acorn; break;
+   default:name = (unknown); break;
}
len = sprintf(page, %s\n, name);
-   PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+   PROC_IDE_READ_RETURN(page, start, off, count, eof, len);
 }
 
 static int proc_ide_read_mate
@@ -81,7 +81,7 @@ static int proc_ide_read_mate
len = sprintf(page, %s\n, hwif-mate-name);
else
len = sprintf(page, (none)\n);
-   PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+   PROC_IDE_READ_RETURN(page, start, off, count, eof, len);
 }
 
 static int proc_ide_read_channel
@@ -93,7 +93,7 @@ static int proc_ide_read_channel
page[0] = hwif-channel ? '1' : '0';
page[1] = '\n';
len = 2;
-   PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+   PROC_IDE_READ_RETURN(page, start, off, count, eof, len);
 }
 
 static int proc_ide_read_identify
@@ -120,10 +120,10 @@ static int proc_ide_read_identify
len = out - page;
}
}
-   PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+   PROC_IDE_READ_RETURN(page, start, off, count, eof, len);
 }
 
-/**
+/*
  * __ide_add_setting   -   add an ide setting option
  * @drive: drive to use
  * @name: setting name
@@ -185,10 +185,9 @@ int ide_add_setting(ide_drive_t *drive, const char *name, 
int rw, int data_type,
 {
return __ide_add_setting(drive, name, rw, data_type, min, max, 
mul_factor, div_factor, data, set, 1);
 }
-
 EXPORT_SYMBOL(ide_add_setting);
 
-/**
+/*
  * __ide_remove_setting-   remove an ide setting option
  * @drive: drive to use
  * @name: setting name
@@ -197,7 +196,7 @@ EXPORT_SYMBOL(ide_add_setting);
  * The caller must hold the setting semaphore.
  */
 
-static void __ide_remove_setting (ide_drive_t *drive, char *name)
+static void __ide_remove_setting(ide_drive_t *drive, char *name)
 {
ide_settings_t **p, *setting;
 
@@ -205,7 +204,8 @@ static void __ide_remove_setting (ide_drive_t *drive, char 
*name)
 
while ((*p

[PATCH 06/10] IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error and warning free.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/legacy/ide-4drives.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c
index d7bc94f..c352f12 100644
--- a/drivers/ide/legacy/ide-4drives.c
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -4,7 +4,7 @@
 #include linux/module.h
 #include linux/ide.h
 
-int probe_4drives = 0;
+int probe_4drives;
 
 module_param_named(probe, probe_4drives, bool, 0);
 MODULE_PARM_DESC(probe, probe for generic IDE chipset with 4 drives/port);
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 07/10] IDE: Coding Style fixes to drivers/ide/pci/slc90e66.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free, only 1 warning left.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/slc90e66.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 2ce384a..eab557c 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -27,9 +27,9 @@ static void slc90e66_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
unsigned long flags;
u16 master_data;
u8 slave_data;
-   int control = 0;
+   int control = 0;
 /* ISP  RTC */
-   static const u8 timings[][2]= {
+   static const u8 timings[][2] = {
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
@@ -136,7 +136,7 @@ static void __devinit init_hwif_slc90e66(ide_hwif_t *hwif)
 static const struct ide_port_info slc90e66_chipset __devinitdata = {
.name   = SLC90E66,
.init_hwif  = init_hwif_slc90e66,
-   .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
+   .enablebits = { {0x41, 0x80, 0x80}, {0x43, 0x80, 0x80} },
.host_flags = IDE_HFLAG_LEGACY_IRQS,
.pio_mask   = ATA_PIO4,
.swdma_mask = ATA_SWDMA2_ONLY,
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/10] IDE: Coding Style fixes to drivers/ide/pci/generic.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/generic.c |   50 ++--
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index f83afa1..f9a5879 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -49,21 +49,21 @@ static const struct ide_port_info generic_chipsets[] 
__devinitdata = {
 
{   /* 1 */
.name   = NS87410,
-   .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
+   .enablebits = { {0x43, 0x08, 0x08}, {0x47, 0x08, 0x08} },
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
.udma_mask  = ATA_UDMA6,
},
 
-   /*  2 */ DECLARE_GENERIC_PCI_DEV(SAMURAI, 0),
-   /*  3 */ DECLARE_GENERIC_PCI_DEV(HT6565,  0),
-   /*  4 */ DECLARE_GENERIC_PCI_DEV(UM8673F, IDE_HFLAGS_UMC),
-   /*  5 */ DECLARE_GENERIC_PCI_DEV(UM8886A, IDE_HFLAGS_UMC),
-   /*  6 */ DECLARE_GENERIC_PCI_DEV(UM8886BF,IDE_HFLAGS_UMC),
-   /*  7 */ DECLARE_GENERIC_PCI_DEV(HINT_IDE,0),
-   /*  8 */ DECLARE_GENERIC_PCI_DEV(VIA_IDE, IDE_HFLAG_NO_AUTODMA),
-   /*  9 */ DECLARE_GENERIC_PCI_DEV(OPTI621V,IDE_HFLAG_NO_AUTODMA),
+   /*  2 */ DECLARE_GENERIC_PCI_DEV(SAMURAI, 0),
+   /*  3 */ DECLARE_GENERIC_PCI_DEV(HT6565, 0),
+   /*  4 */ DECLARE_GENERIC_PCI_DEV(UM8673F, IDE_HFLAGS_UMC),
+   /*  5 */ DECLARE_GENERIC_PCI_DEV(UM8886A, IDE_HFLAGS_UMC),
+   /*  6 */ DECLARE_GENERIC_PCI_DEV(UM8886BF, IDE_HFLAGS_UMC),
+   /*  7 */ DECLARE_GENERIC_PCI_DEV(HINT_IDE, 0),
+   /*  8 */ DECLARE_GENERIC_PCI_DEV(VIA_IDE, IDE_HFLAG_NO_AUTODMA),
+   /*  9 */ DECLARE_GENERIC_PCI_DEV(OPTI621V, IDE_HFLAG_NO_AUTODMA),
 
{   /* 10 */
.name   = VIA8237SATA,
@@ -89,7 +89,7 @@ static const struct ide_port_info generic_chipsets[] 
__devinitdata = {
}
 };
 
-/**
+/*
  * generic_init_one-   called when a PIIX is found
  * @dev: the generic device
  * @id: the matching pci id
@@ -97,7 +97,7 @@ static const struct ide_port_info generic_chipsets[] 
__devinitdata = {
  * Called when the PCI registration layer (or the IDE initialization)
  * finds a device matching our IDE device tables.
  */
- 
+
 static int __devinit generic_init_one(struct pci_dev *dev, const struct 
pci_device_id *id)
 {
const struct ide_port_info *d = generic_chipsets[id-driver_data];
@@ -145,22 +145,22 @@ out:
 }
 
 static const struct pci_device_id generic_pci_tbl[] = {
-   { PCI_VDEVICE(NS,   PCI_DEVICE_ID_NS_87410), 1 },
-   { PCI_VDEVICE(PCTECH,   PCI_DEVICE_ID_PCTECH_SAMURAI_IDE),   2 },
-   { PCI_VDEVICE(HOLTEK,   PCI_DEVICE_ID_HOLTEK_6565),  3 },
-   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8673F),  4 },
-   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8886A),  5 },
-   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8886BF), 6 },
-   { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 7 },
-   { PCI_VDEVICE(VIA,  PCI_DEVICE_ID_VIA_82C561),   8 },
-   { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558),  9 },
+   { PCI_VDEVICE(NS,   PCI_DEVICE_ID_NS_87410), 1 },
+   { PCI_VDEVICE(PCTECH,   PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), 2 },
+   { PCI_VDEVICE(HOLTEK,   PCI_DEVICE_ID_HOLTEK_6565), 3 },
+   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8673F), 4 },
+   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8886A), 5 },
+   { PCI_VDEVICE(UMC,  PCI_DEVICE_ID_UMC_UM8886BF), 6 },
+   { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 7 },
+   { PCI_VDEVICE(VIA,  PCI_DEVICE_ID_VIA_82C561), 8 },
+   { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558), 9 },
 #ifdef CONFIG_BLK_DEV_IDE_SATA
-   { PCI_VDEVICE(VIA,  PCI_DEVICE_ID_VIA_8237_SATA),   10 },
+   { PCI_VDEVICE(VIA,  PCI_DEVICE_ID_VIA_8237_SATA), 10 },
 #endif
-   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO), 11 },
-   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO_1),   12 },
-   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO_2),   13 },
-   { PCI_VDEVICE(NETCELL,  PCI_DEVICE_ID_REVOLUTION),  14 },
+   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO), 11 },
+   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), 12 },
+   { PCI_VDEVICE(TOSHIBA,  PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), 13 },
+   { PCI_VDEVICE(NETCELL,  PCI_DEVICE_ID_REVOLUTION), 14 },
/*
 * Must come last.  If you add entries adjust
 * this table and generic_chipsets[] appropriately.
-- 
1.5.4.2.316.gf7a7

[PATCH 10/10] IDE: Coding Style fixes to drivers/ide/pci/tc86c001.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error and warning free.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/tc86c001.c |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 1e4a626..c154351 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -18,20 +18,20 @@ static void tc86c001_set_mode(ide_drive_t *drive, const u8 
speed)
u16 mode, scr   = inw(scr_port);
 
switch (speed) {
-   case XFER_UDMA_4:   mode = 0x00c0; break;
-   case XFER_UDMA_3:   mode = 0x00b0; break;
-   case XFER_UDMA_2:   mode = 0x00a0; break;
-   case XFER_UDMA_1:   mode = 0x0090; break;
-   case XFER_UDMA_0:   mode = 0x0080; break;
-   case XFER_MW_DMA_2: mode = 0x0070; break;
-   case XFER_MW_DMA_1: mode = 0x0060; break;
-   case XFER_MW_DMA_0: mode = 0x0050; break;
-   case XFER_PIO_4:mode = 0x0400; break;
-   case XFER_PIO_3:mode = 0x0300; break;
-   case XFER_PIO_2:mode = 0x0200; break;
-   case XFER_PIO_1:mode = 0x0100; break;
-   case XFER_PIO_0:
-   default:mode = 0x; break;
+   case XFER_UDMA_4:   mode = 0x00c0; break;
+   case XFER_UDMA_3:   mode = 0x00b0; break;
+   case XFER_UDMA_2:   mode = 0x00a0; break;
+   case XFER_UDMA_1:   mode = 0x0090; break;
+   case XFER_UDMA_0:   mode = 0x0080; break;
+   case XFER_MW_DMA_2: mode = 0x0070; break;
+   case XFER_MW_DMA_1: mode = 0x0060; break;
+   case XFER_MW_DMA_0: mode = 0x0050; break;
+   case XFER_PIO_4:mode = 0x0400; break;
+   case XFER_PIO_3:mode = 0x0300; break;
+   case XFER_PIO_2:mode = 0x0200; break;
+   case XFER_PIO_1:mode = 0x0100; break;
+   case XFER_PIO_0:
+   default:mode = 0x; break;
}
 
scr = (speed  XFER_MW_DMA_0) ? 0xf8ff : 0xff0f;
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/10] IDE: Coding Style Fixes

2008-02-23 Thread Paolo Ciarrocchi
On Sat, Feb 23, 2008 at 3:04 PM, Paolo Ciarrocchi
[EMAIL PROTECTED] wrote:
 Hi Bartlomiej,
  The following 10 patches remove a huge number of errors and warnings
  reported by checkpatch.pl from the IDE subsystem.

  All the patches have been compile tested.

I forgot to mention that the series is against a linux-next tree cloned
a few hours ago.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/10] IDE: Coding Style fixes to drivers/ide/pci/generic.c

2008-02-23 Thread Paolo Ciarrocchi
 | -/**
 | +/*
 ^^^

 Hi Paolo, it seems you just broke kdoc structure

thank you for your comment, i didn't know that.
Won't happen in future patches.
Bart, can you fix that or do you want me to re-create the series?

Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/6] IDE: new series of Coding Style Fixes

2008-02-23 Thread Paolo Ciarrocchi
Bart,
here is a new series of patches that remove some errors
and warnings reported by checkpatch.pl from the IDE subsystem.

All the patches have been compile tested and are against this morning (CET time 
:-)
linux-next

Paolo Ciarrocchi (6):
  IDE: Coding Style fixes to drivers/ide/pci/opti621.c
  IDE: Coding Style fixes to drivers/ide/legacy/hd.c
  IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c
  IDE: Coding Style fixes to drivers/ide/pci/it8213.c
  IDE: Coding Style fixes to drivers/ide/ide-floppy.c
  IDE: Coding Style fixes to drivers/ide/pci/cmd640.c

 drivers/ide/ide-floppy.c |4 +-
 drivers/ide/legacy/ali14xx.c |   11 +++--
 drivers/ide/legacy/hd.c  |   79 ++--
 drivers/ide/pci/cmd640.c |   90 +-
 drivers/ide/pci/it8213.c |9 ++--
 drivers/ide/pci/opti621.c|   50 
 6 files changed, 122 insertions(+), 121 deletions(-)

Ciao,
Paolo
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/6] IDE: Coding Style fixes to drivers/ide/pci/opti621.c

2008-02-23 Thread Paolo Ciarrocchi
Compile tested.

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/opti621.c |   50 ++--
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index cfd46ae..3df74b7 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -57,9 +57,9 @@
  * (use idebus=xx to select PCI bus speed).
  *
  * Version 0.1, Nov 8, 1996
- * by Jaromir Koutek, for 2.1.8. 
+ * by Jaromir Koutek, for 2.1.8.
  * Initial version of driver.
- * 
+ *
  * Version 0.2
  * Number 0.2 skipped.
  *
@@ -75,7 +75,7 @@
  * by Jaromir Koutek
  * Updates for use with (again) new IDE block driver.
  * Update of documentation.
- * 
+ *
  * Version 0.6, Jan 2, 1999
  * by Jaromir Koutek
  * Reversed to version 0.3 of the driver, because
@@ -208,29 +208,29 @@ typedef struct pio_clocks_s {
 
 static void compute_clocks(int pio, pio_clocks_t *clks)
 {
-if (pio != PIO_NOT_EXIST) {
-   int adr_setup, data_pls;
+   if (pio != PIO_NOT_EXIST) {
+   int adr_setup, data_pls;
int bus_speed = system_bus_clock();
 
-   adr_setup = ide_pio_timings[pio].setup_time;
-   data_pls = ide_pio_timings[pio].active_time;
-   clks-address_time = cmpt_clk(adr_setup, bus_speed);
-   clks-data_time = cmpt_clk(data_pls, bus_speed);
-   clks-recovery_time = cmpt_clk(ide_pio_timings[pio].cycle_time
-   - adr_setup-data_pls, bus_speed);
-   if (clks-address_time1) clks-address_time = 1;
-   if (clks-address_time4) clks-address_time = 4;
-   if (clks-data_time1) clks-data_time = 1;
-   if (clks-data_time16) clks-data_time = 16;
-   if (clks-recovery_time2) clks-recovery_time = 2;
-   if (clks-recovery_time17) clks-recovery_time = 17;
+   adr_setup = ide_pio_timings[pio].setup_time;
+   data_pls = ide_pio_timings[pio].active_time;
+   clks-address_time = cmpt_clk(adr_setup, bus_speed);
+   clks-data_time = cmpt_clk(data_pls, bus_speed);
+   clks-recovery_time = cmpt_clk(ide_pio_timings[pio].cycle_time
+   - adr_setup-data_pls, bus_speed);
+   if (clks-address_time  1) clks-address_time = 1;
+   if (clks-address_time  4) clks-address_time = 4;
+   if (clks-data_time  1) clks-data_time = 1;
+   if (clks-data_time  16) clks-data_time = 16;
+   if (clks-recovery_time  2) clks-recovery_time = 2;
+   if (clks-recovery_time  17) clks-recovery_time = 17;
} else {
clks-address_time = 1;
clks-data_time = 1;
clks-recovery_time = 2;
/* minimal values */
}
- 
+
 }
 
 static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
@@ -247,8 +247,8 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
 
/* sets drive-drive_data for both drives */
compute_pios(drive, pio);
-   pio1 = hwif-drives[0].drive_data;
-   pio2 = hwif-drives[1].drive_data;
+   pio1 = hwif-drives[0].drive_data;
+   pio2 = hwif-drives[1].drive_data;
 
compute_clocks(pio1, first);
compute_clocks(pio2, second);
@@ -275,7 +275,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
 
spin_lock_irqsave(opti621_lock, flags);
 
-   reg_base = hwif-io_ports[IDE_DATA_OFFSET];
+   reg_base = hwif-io_ports[IDE_DATA_OFFSET];
 
/* allow Register-B */
outb(0xc0, reg_base + CNTRL_REG);
@@ -324,7 +324,7 @@ static void __devinit opti621_port_init_devs(ide_hwif_t 
*hwif)
 /*
  * init_hwif_opti621() is called once for each hwif found at boot.
  */
-static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
+static void __devinit init_hwif_opti621(ide_hwif_t *hwif)
 {
hwif-port_init_devs = opti621_port_init_devs;
hwif-set_pio_mode = opti621_set_pio_mode;
@@ -334,15 +334,15 @@ static const struct ide_port_info opti621_chipsets[] 
__devinitdata = {
{   /* 0 */
.name   = OPTI621,
.init_hwif  = init_hwif_opti621,
-   .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+   .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
.pio_mask   = ATA_PIO3,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
-   },{ /* 1 */
+   }, {/* 1 */
.name   = OPTI621X,
.init_hwif  = init_hwif_opti621,
-   .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
+   .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
.host_flags

[PATCH 2/6] IDE: Coding Style fixes to drivers/ide/legacy/hd.c

2008-02-23 Thread Paolo Ciarrocchi
Fix a lot of errors and warnings.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/legacy/hd.c |   79 ---
 1 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index 0b0d867..b16bdbd 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -122,12 +122,12 @@ static int hd_error;
  *  This struct defines the HD's and their types.
  */
 struct hd_i_struct {
-   unsigned int head,sect,cyl,wpcom,lzone,ctl;
+   unsigned int head, sect, cyl, wpcom, lzone, ctl;
int unit;
int recalibrate;
int special_op;
 };
-   
+
 #ifdef HD_TYPE
 static struct hd_i_struct hd_info[] = { HD_TYPE };
 static int NR_HD = ARRAY_SIZE(hd_info);
@@ -147,7 +147,7 @@ static struct timer_list device_timer;
mod_timer(device_timer, jiffies + TIMEOUT_VALUE);  \
} while (0)
 
-static void (*do_hd)(void) = NULL;
+static void (*do_hd)(void);
 #define SET_HANDLER(x) \
 if ((do_hd = (x)) != NULL) \
SET_TIMER; \
@@ -168,7 +168,7 @@ unsigned long read_timer(void)
 
spin_lock_irqsave(i8253_lock, flags);
t = jiffies * 11932;
-   outb_p(0, 0x43);
+   outb_p(0, 0x43);
i = inb_p(0x40);
i |= inb(0x40)  8;
spin_unlock_irqrestore(i8253_lock, flags);
@@ -183,7 +183,7 @@ static void __init hd_setup(char *str, int *ints)
if (ints[0] != 3)
return;
if (hd_info[0].head != 0)
-   hdind=1;
+   hdind = 1;
hd_info[hdind].head = ints[2];
hd_info[hdind].sect = ints[3];
hd_info[hdind].cyl = ints[1];
@@ -193,7 +193,7 @@ static void __init hd_setup(char *str, int *ints)
NR_HD = hdind+1;
 }
 
-static void dump_status (const char *msg, unsigned int stat)
+static void dump_status(const char *msg, unsigned int stat)
 {
char *name = hd?;
if (CURRENT)
@@ -291,7 +291,7 @@ static int controller_ready(unsigned int drive, unsigned 
int head)
return 0;
 }
 
-   
+
 static void hd_out(struct hd_i_struct *disk,
   unsigned int nsect,
   unsigned int sect,
@@ -313,15 +313,15 @@ static void hd_out(struct hd_i_struct *disk,
return;
}
SET_HANDLER(intr_addr);
-   outb_p(disk-ctl,HD_CMD);
-   port=HD_DATA;
-   outb_p(disk-wpcom2,++port);
-   outb_p(nsect,++port);
-   outb_p(sect,++port);
-   outb_p(cyl,++port);
-   outb_p(cyl8,++port);
-   outb_p(0xA0|(disk-unit4)|head,++port);
-   outb_p(cmd,++port);
+   outb_p(disk-ctl, HD_CMD);
+   port = HD_DATA;
+   outb_p(disk-wpcom2, ++port);
+   outb_p(nsect, ++port);
+   outb_p(sect, ++port);
+   outb_p(cyl, ++port);
+   outb_p(cyl8, ++port);
+   outb_p(0xA0|(disk-unit4)|head, ++port);
+   outb_p(cmd, ++port);
 }
 
 static void hd_request (void);
@@ -344,14 +344,14 @@ static void reset_controller(void)
 {
int i;
 
-   outb_p(4,HD_CMD);
-   for(i = 0; i  1000; i++) barrier();
-   outb_p(hd_info[0].ctl  0x0f,HD_CMD);
-   for(i = 0; i  1000; i++) barrier();
+   outb_p(4, HD_CMD);
+   for (i = 0; i  1000; i++) barrier();
+   outb_p(hd_info[0].ctl  0x0f, HD_CMD);
+   for (i = 0; i  1000; i++) barrier();
if (drive_busy())
printk(hd: controller still busy\n);
else if ((hd_error = inb(HD_ERROR)) != 1)
-   printk(hd: controller reset failed: %02x\n,hd_error);
+   printk(hd: controller reset failed: %02x\n, hd_error);
 }
 
 static void reset_hd(void)
@@ -371,8 +371,8 @@ repeat:
if (++i  NR_HD) {
struct hd_i_struct *disk = hd_info[i];
disk-special_op = disk-recalibrate = 1;
-   hd_out(disk,disk-sect,disk-sect,disk-head-1,
-   disk-cyl,WIN_SPECIFY,reset_hd);
+   hd_out(disk, disk-sect, disk-sect, disk-head-1,
+   disk-cyl, WIN_SPECIFY, reset_hd);
if (reset)
goto repeat;
} else
@@ -393,7 +393,7 @@ static void unexpected_hd_interrupt(void)
unsigned int stat = inb_p(HD_STATUS);
 
if (stat  (BUSY_STAT|DRQ_STAT|ECC_STAT|ERR_STAT)) {
-   dump_status (unexpected interrupt, stat);
+   dump_status(unexpected interrupt, stat);
SET_TIMER;
}
 }
@@ -453,7 +453,7 @@ static void read_intr(void)
return;
 ok_to_read:
req = CURRENT;
-   insw(HD_DATA,req-buffer,256);
+   insw(HD_DATA, req-buffer, 256);
req-sector++;
req-buffer += 512;
req-errors = 0;
@@ -507,7 +507,7 @@ ok_to_write:
end_request(req, 1);
if (i  0) {
SET_HANDLER(write_intr);
-   outsw(HD_DATA,req-buffer,256);
+   outsw(HD_DATA, req-buffer, 256

[PATCH 3/6] IDE: Coding Style fixes to drivers/ide/legacy/ali14xx.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free, 2 warnings left.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/legacy/ali14xx.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index c9536dd..33bb7b8 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -86,7 +86,7 @@ static u8 regOff; /* output to base port to close 
registers */
 /*
  * Read a controller register.
  */
-static inline u8 inReg (u8 reg)
+static inline u8 inReg(u8 reg)
 {
outb_p(reg, regPort);
return inb(dataPort);
@@ -95,7 +95,7 @@ static inline u8 inReg (u8 reg)
 /*
  * Write a controller register.
  */
-static void outReg (u8 data, u8 reg)
+static void outReg(u8 data, u8 reg)
 {
outb_p(reg, regPort);
outb_p(data, dataPort);
@@ -143,7 +143,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
 /*
  * Auto-detect the IDE controller port.
  */
-static int __init findPort (void)
+static int __init findPort(void)
 {
int i;
u8 t;
@@ -175,7 +175,8 @@ static int __init findPort (void)
 /*
  * Initialize controller registers with default values.
  */
-static int __init initRegisters (void) {
+static int __init initRegisters(void)
+{
const RegInitializer *p;
u8 t;
unsigned long flags;
@@ -239,7 +240,7 @@ static int __init ali14xx_probe(void)
return 0;
 }
 
-int probe_ali14xx = 0;
+int probe_ali14xx;
 
 module_param_named(probe, probe_ali14xx, bool, 0);
 MODULE_PARM_DESC(probe, probe for ALI M14xx chipsets);
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] IDE: Coding Style fixes to drivers/ide/ide-floppy.c

2008-02-23 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/ide-floppy.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 5f133df..cea77e0 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -396,7 +396,7 @@ static void idefloppy_retry_pc(ide_drive_t *drive)
 }
 
 /* The usual interrupt handler called during a packet command. */
-static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive)
+static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
 {
idefloppy_floppy_t *floppy = drive-driver_data;
ide_hwif_t *hwif = drive-hwif;
@@ -1602,7 +1602,7 @@ static struct block_device_operations idefloppy_ops = {
.ioctl  = idefloppy_ioctl,
.getgeo = idefloppy_getgeo,
.media_changed  = idefloppy_media_changed,
-   .revalidate_disk= idefloppy_revalidate_disk
+   .revalidate_disk = idefloppy_revalidate_disk
 };
 
 static int ide_floppy_probe(ide_drive_t *drive)
-- 
1.5.4.2.316.gf7a7

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/6] IDE: Coding Style fixes to drivers/ide/pci/cmd640.c

2008-02-23 Thread Paolo Ciarrocchi
Fix all the errors and a few warnings.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 drivers/ide/pci/cmd640.c |   90 +++---
 1 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index 77537b2..70bc3fe 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -4,7 +4,7 @@
 
 /*
  *  Original authors:  [EMAIL PROTECTED] (Igor Abramov)
- * [EMAIL PROTECTED] (Mark Lord)
+ * [EMAIL PROTECTED] (Mark Lord)
  *
  *  See linux/MAINTAINERS for address of current maintainer.
  *
@@ -98,7 +98,7 @@
 
 #define CMD640_PREFETCH_MASKS 1
 
-//#define CMD640_DUMP_REGS
+/*#define CMD640_DUMP_REGS */
 
 #include linux/types.h
 #include linux/kernel.h
@@ -112,7 +112,7 @@
 /*
  * This flag is set in ide.c by the parameter:  ide0=cmd640_vlb
  */
-int cmd640_vlb = 0;
+int cmd640_vlb;
 
 /*
  * CMD640 specific registers definition.
@@ -206,13 +206,13 @@ static unsigned int cmd640_chip_version;
 
 /* PCI method 1 access */
 
-static void put_cmd640_reg_pci1 (u16 reg, u8 val)
+static void put_cmd640_reg_pci1(u16 reg, u8 val)
 {
outl_p((reg  0xfc) | cmd640_key, 0xcf8);
outb_p(val, (reg  3) | 0xcfc);
 }
 
-static u8 get_cmd640_reg_pci1 (u16 reg)
+static u8 get_cmd640_reg_pci1(u16 reg)
 {
outl_p((reg  0xfc) | cmd640_key, 0xcf8);
return inb_p((reg  3) | 0xcfc);
@@ -220,14 +220,14 @@ static u8 get_cmd640_reg_pci1 (u16 reg)
 
 /* PCI method 2 access (from CMD datasheet) */
 
-static void put_cmd640_reg_pci2 (u16 reg, u8 val)
+static void put_cmd640_reg_pci2(u16 reg, u8 val)
 {
outb_p(0x10, 0xcf8);
outb_p(val, cmd640_key + reg);
outb_p(0, 0xcf8);
 }
 
-static u8 get_cmd640_reg_pci2 (u16 reg)
+static u8 get_cmd640_reg_pci2(u16 reg)
 {
u8 b;
 
@@ -239,13 +239,13 @@ static u8 get_cmd640_reg_pci2 (u16 reg)
 
 /* VLB access */
 
-static void put_cmd640_reg_vlb (u16 reg, u8 val)
+static void put_cmd640_reg_vlb(u16 reg, u8 val)
 {
outb_p(reg, cmd640_key);
outb_p(val, cmd640_key + 4);
 }
 
-static u8 get_cmd640_reg_vlb (u16 reg)
+static u8 get_cmd640_reg_vlb(u16 reg)
 {
outb_p(reg, cmd640_key);
return inb_p(cmd640_key + 4);
@@ -267,11 +267,11 @@ static void put_cmd640_reg(u16 reg, u8 val)
unsigned long flags;
 
spin_lock_irqsave(cmd640_lock, flags);
-   __put_cmd640_reg(reg,val);
+   __put_cmd640_reg(reg, val);
spin_unlock_irqrestore(cmd640_lock, flags);
 }
 
-static int __init match_pci_cmd640_device (void)
+static int __init match_pci_cmd640_device(void)
 {
const u8 ven_dev[4] = {0x95, 0x10, 0x40, 0x06};
unsigned int i;
@@ -291,7 +291,7 @@ static int __init match_pci_cmd640_device (void)
 /*
  * Probe for CMD640x -- pci method 1
  */
-static int __init probe_for_cmd640_pci1 (void)
+static int __init probe_for_cmd640_pci1(void)
 {
__get_cmd640_reg = get_cmd640_reg_pci1;
__put_cmd640_reg = put_cmd640_reg_pci1;
@@ -307,7 +307,7 @@ static int __init probe_for_cmd640_pci1 (void)
 /*
  * Probe for CMD640x -- pci method 2
  */
-static int __init probe_for_cmd640_pci2 (void)
+static int __init probe_for_cmd640_pci2(void)
 {
__get_cmd640_reg = get_cmd640_reg_pci2;
__put_cmd640_reg = put_cmd640_reg_pci2;
@@ -321,7 +321,7 @@ static int __init probe_for_cmd640_pci2 (void)
 /*
  * Probe for CMD640x -- vlb
  */
-static int __init probe_for_cmd640_vlb (void)
+static int __init probe_for_cmd640_vlb(void)
 {
u8 b;
 
@@ -342,7 +342,7 @@ static int __init probe_for_cmd640_vlb (void)
  *  Returns 1 if an IDE interface/drive exists at 0x170,
  *  Returns 0 otherwise.
  */
-static int __init secondary_port_responding (void)
+static int __init secondary_port_responding(void)
 {
unsigned long flags;
 
@@ -366,7 +366,7 @@ static int __init secondary_port_responding (void)
 /*
  * Dump out all cmd640 registers.  May be called from ide.c
  */
-static void cmd640_dump_regs (void)
+static void cmd640_dump_regs(void)
 {
unsigned int reg = cmd640_vlb ? 0x50 : 0x00;
 
@@ -435,7 +435,7 @@ static void set_prefetch_mode(ide_drive_t *drive, unsigned 
int index, int mode)
 /*
  * Dump out current drive clocks settings
  */
-static void display_clocks (unsigned int index)
+static void display_clocks(unsigned int index)
 {
u8 active_count, recovery_count;
 
@@ -454,7 +454,7 @@ static void display_clocks (unsigned int index)
  * Pack active and recovery counts into single byte representation
  * used by controller
  */
-static inline u8 pack_nibbles (u8 upper, u8 lower)
+static inline u8 pack_nibbles(u8 upper, u8 lower)
 {
return ((upper  0x0f)  4) | (lower  0x0f);
 }
@@ -462,7 +462,7 @@ static inline u8 pack_nibbles (u8 upper, u8 lower)
 /*
  * This routine retrieves the initial drive timings from the chipset.
  */
-static void __init retrieve_drive_counts (unsigned int index)
+static void