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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Change a WARN message in checkpatch

2008-02-24 Thread Paolo Ciarrocchi
On 2/25/08, Andy Whitcroft
> As we want the messages to be as short as possible, I am leaning towards
> standardising on:
>
> spaces prohibited 
> spaces required 
>
in that case i would prefer:
 space not required 
 space required 

ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] x86: 2 Coding Style patches

2008-02-24 Thread Paolo Ciarrocchi
This email didn't reach lkml...

Hi Ingo,
 two more coding style patches.
 Compile tested, against x86/testing 4a6af5bbbd74dd812224900d3468b008d117da29

 Paolo Ciarrocchi (2):
  x86: Coding Style fixes to arch/x86/power/cpu_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/common.c

  arch/x86/kernel/cpu/common.c |  105 ++---
  arch/x86/power/cpu_32.c  |   41 +---
  2 files changed, 79 insertions(+), 67 deletions(-)

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


[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 = (clk1<<4)|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,
(data&0x3), ((data>>2)&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

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

2008-02-24 Thread Paolo Ciarrocchi
Applies on top of the previous patch.


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 drivers/ide/ide-cd.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 3181e71..76317ab 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -650,7 +650,7 @@ int ide_cd_check_ireason(ide_drive_t *drive, int len, int 
ireason, int rw)
 
/* Whoops... */
printk(KERN_ERR "%s: %s: wrong transfer direction!\n",
-   drive->name, __FUNCTION__);
+   drive->name, __func__);
 
xf = rw ? hwif->atapi_output_bytes : hwif->atapi_input_bytes;
ide_cd_pad_transfer(drive, xf, len);
@@ -663,7 +663,7 @@ int ide_cd_check_ireason(ide_drive_t *drive, int len, int 
ireason, int rw)
} else {
/* Drive wants a command packet, or invalid ireason... */
printk(KERN_ERR "%s: %s: bad interrupt reason 0x%02x\n",
-   drive->name, __FUNCTION__, ireason);
+   drive->name, __func__, ireason);
}
 
cdrom_end_request(drive, 0);
@@ -682,7 +682,7 @@ static int ide_cd_check_transfer_size(ide_drive_t *drive, 
int len)
return 0;
 
printk(KERN_ERR "%s: %s: Bad transfer size %d\n",
-   drive->name, __FUNCTION__, len);
+   drive->name, __func__, len);
 
if (cd->cd_flags & IDE_CD_FLAG_LIMIT_NFRAMES)
printk(KERN_ERR "  This drive is not supported by "
@@ -727,7 +727,7 @@ static ide_startstop_t cdrom_start_rw_cont(ide_drive_t 
*drive)
if (rq->current_nr_sectors !=
bio_cur_sectors(rq->bio)) {
printk(KERN_ERR "%s: %s: buffer botch (%u)\n",
-   drive->name, __FUNCTION__,
+   drive->name, __func__,
rq->current_nr_sectors);
cdrom_end_request(drive, 0);
return ide_stopped;
@@ -961,7 +961,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (rq->current_nr_sectors > 0) {
printk(KERN_ERR "%s: %s: data underrun "
"(%d blocks)\n",
-   drive->name, __FUNCTION__,
+   drive->name, __func__,
rq->current_nr_sectors);
if (!write)
rq->cmd_flags |= REQ_FAILED;
@@ -1018,7 +1018,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t 
*drive)
printk(KERN_ERR "%s: %s: The drive "
"appears confused (ireason = 0x%02x). "
"Trying to recover by ending request.\n",
-   drive->name, __FUNCTION__, ireason);
+   drive->name, __func__, ireason);
goto end_request;
}
 
@@ -1936,7 +1936,7 @@ static void ide_cd_release(struct kref *kref)
kfree(info->toc);
if (devinfo->handle == drive && unregister_cdrom(devinfo))
printk(KERN_ERR "%s: %s failed to unregister device from the 
cdrom "
-   "driver.\n", __FUNCTION__, drive->name);
+   "driver.\n", __func__, drive->name);
drive->dsc_overlap = 0;
drive->driver_data = NULL;
blk_queue_prep_rq(drive->queue, NULL);
-- 
1.5.4.2.316.gf7a7

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


[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->sen

[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Change a WARN message in checkpatch

2008-02-24 Thread Paolo Ciarrocchi
On Sun, Feb 24, 2008 at 4:18 PM, Benny Halevy <[EMAIL PROTECTED]> wrote:
[...]
>  How about:
>  -   WARN("no space between function name and 
> open parenthesis '('\n" . $herecurr);
>  +   WARN("there should be no space between 
> function name and open parenthesis '('\n" . $herecurr);

I originally suggested:
+   WARN("don't put a space between
function name and open parenthesis '('\n" . $herecurr);
but I really prefer your version.

>  The original phrasing can be interpreted like "there is no space between 
> ..." and the correct
>  interpretation should be "there should be no space between ..."

Indeed.

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


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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] x86: Coding Style fixes to arch/x86/kernel/cpu/common.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/common.c |  105 ++---
 1 files changed, 56 insertions(+), 49 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 750456f..d0de972 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -62,9 +62,9 @@ __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
 static int cachesize_override __cpuinitdata = -1;
 static int disable_x86_serial_nr __cpuinitdata = 1;
 
-struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
+struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
 
-static void __cpuinit default_init(struct cpuinfo_x86 * c)
+static void __cpuinit default_init(struct cpuinfo_x86 *c)
 {
/* Not much we can do here... */
/* Check if at least it has cpuid */
@@ -81,11 +81,11 @@ static struct cpu_dev __cpuinitdata default_cpu = {
.c_init = default_init,
.c_vendor = "Unknown",
 };
-static struct cpu_dev * this_cpu __cpuinitdata = _cpu;
+static struct cpu_dev *this_cpu __cpuinitdata = _cpu;
 
 static int __init cachesize_setup(char *str)
 {
-   get_option (, _override);
+   get_option(, _override);
return 1;
 }
 __setup("cachesize=", cachesize_setup);
@@ -107,12 +107,12 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c)
/* Intel chips right-justify this string for some dumb reason;
   undo that brain damage */
p = q = >x86_model_id[0];
-   while ( *p == ' ' )
+   while (*p == ' ')
 p++;
-   if ( p != q ) {
-while ( *p )
+   if (p != q) {
+while (*p)
  *q++ = *p++;
-while ( q <= >x86_model_id[48] )
+while (q <= >x86_model_id[48])
  *q++ = '\0';  /* Zero-pad the rest */
}
 
@@ -130,7 +130,7 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
cpuid(0x8005, , , , );
printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache 
%dK (%d bytes/line)\n",
edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
-   c->x86_cache_size=(ecx>>24)+(edx>>24);  
+   c->x86_cache_size = (ecx>>24)+(edx>>24);
}
 
if (n < 0x8006) /* Some chips just has a large L1. */
@@ -138,16 +138,16 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
 
ecx = cpuid_ecx(0x8006);
l2size = ecx >> 16;
-   
+
/* do processor-specific cache resizing */
if (this_cpu->c_size_cache)
-   l2size = this_cpu->c_size_cache(c,l2size);
+   l2size = this_cpu->c_size_cache(c, l2size);
 
/* Allow user to override all this if necessary. */
if (cachesize_override != -1)
l2size = cachesize_override;
 
-   if ( l2size == 0 )
+   if (l2size == 0)
return; /* Again, no L2 cache is possible */
 
c->x86_cache_size = l2size;
@@ -156,16 +156,19 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
   l2size, ecx & 0xFF);
 }
 
-/* Naming convention should be:  [()] */
-/* This table only is used unless init_() below doesn't set it; */
-/* in particular, if CPUID levels 0x8002..4 are supported, this isn't used 
*/
+/*
+ * Naming convention should be:  [()]
+ * This table only is used unless init_() below doesn't set it;
+ * in particular, if CPUID levels 0x8002..4 are supported, this isn't used
+ *
+ */
 
 /* Look up CPU names by table lookup. */
 static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
 {
struct cpu_model_info *info;
 
-   if ( c->x86_model >= 16 )
+   if (c->x86_model >= 16)
return NULL;/* Range check */
 
if (!this_cpu)
@@ -190,9 +193,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, 
int early)
 
for (i = 0; i < X86_VENDOR_NUM; i++) {
if (cpu_devs[i]) {
-   if (!strcmp(v,cpu_devs[i]->c_ident[0]) ||
-   (cpu_devs[i]->c_ident[1] && 
-!strcmp(v,cpu_devs[i]->c_ident[1]))) {
+   if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
+   (cpu_devs[i]->c_ident[1] &&
+!strcmp(v, cpu_devs[i]->c_ident[1]))) {
c->x86_vendor = i;
if (!early)
this_cpu = cpu_devs[i];
@@ -210,7 +213,7 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, 
int early)
 }
 
 
-static int __init x86_fxsr_setup(char * s)
+static int __init x86_fxsr_setup(char *s)
 {
setup_clear_cpu_cap(X86_FEATURE_FXSR);
setup_clear_cpu_c

[PATCH 1/2] x86: Coding Style fixes to arch/x86/power/cpu_32.c

2008-02-24 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.
Patch is against x86#testing


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/power/cpu_32.c |   41 +++--
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 7f9c6da..7dc5d5c 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -27,17 +27,17 @@ static void __save_processor_state(struct saved_context 
*ctxt)
/*
 * descriptor tables
 */
-   store_gdt(>gdt);
-   store_idt(>idt);
-   store_tr(ctxt->tr);
+   store_gdt(>gdt);
+   store_idt(>idt);
+   store_tr(ctxt->tr);
 
/*
 * segment registers
 */
-   savesegment(es, ctxt->es);
-   savesegment(fs, ctxt->fs);
-   savesegment(gs, ctxt->gs);
-   savesegment(ss, ctxt->ss);
+   savesegment(es, ctxt->es);
+   savesegment(fs, ctxt->fs);
+   savesegment(gs, ctxt->gs);
+   savesegment(ss, ctxt->ss);
 
/*
 * control registers
@@ -48,10 +48,12 @@ static void __save_processor_state(struct saved_context 
*ctxt)
ctxt->cr4 = read_cr4();
 }
 
+/* Needed by apm.c */
 void save_processor_state(void)
 {
__save_processor_state(_context);
 }
+EXPORT_SYMBOL(save_processor_state);
 
 static void do_fpu_end(void)
 {
@@ -64,9 +66,14 @@ static void do_fpu_end(void)
 static void fix_processor_context(void)
 {
int cpu = smp_processor_id();
-   struct tss_struct * t = _cpu(init_tss, cpu);
+   struct tss_struct *t = _cpu(init_tss, cpu);
 
-   set_tss_desc(cpu,t);/* This just modifies memory; should not be 
necessary. But... This is necessary, because 386 hardware has concept of busy 
TSS or some similar stupidity. */
+   set_tss_desc(cpu, t);   /*
+* This just modifies memory; should not be
+* necessary. But... This is necessary, because
+* 386 hardware has concept of busy TSS or some
+* similar stupidity.
+*/
 
load_TR_desc(); /* This does ltr */
load_LDT(>active_mm->context); /* This does lldt */
@@ -100,16 +107,16 @@ static void __restore_processor_state(struct 
saved_context *ctxt)
 * now restore the descriptor tables to their proper values
 * ltr is done i fix_processor_context().
 */
-   load_gdt(>gdt);
-   load_idt(>idt);
+   load_gdt(>gdt);
+   load_idt(>idt);
 
/*
 * segment registers
 */
-   loadsegment(es, ctxt->es);
-   loadsegment(fs, ctxt->fs);
-   loadsegment(gs, ctxt->gs);
-   loadsegment(ss, ctxt->ss);
+   loadsegment(es, ctxt->es);
+   loadsegment(fs, ctxt->fs);
+   loadsegment(gs, ctxt->gs);
+   loadsegment(ss, ctxt->ss);
 
/*
 * sysenter MSRs
@@ -123,11 +130,9 @@ static void __restore_processor_state(struct saved_context 
*ctxt)
mcheck_init(_cpu_data);
 }
 
+/* Needed by apm.c */
 void restore_processor_state(void)
 {
__restore_processor_state(_context);
 }
-
-/* Needed by apm.c */
-EXPORT_SYMBOL(save_processor_state);
 EXPORT_SYMBOL(restore_processor_state);
-- 
1.5.4.2.316.gf7a7

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


[PATCH 1/2] x86: Coding Style fixes to arch/x86/power/cpu_32.c

2008-02-24 Thread Paolo Ciarrocchi
File is now error free.
Compile tested.
Patch is against x86#testing


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/power/cpu_32.c |   41 +++--
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 7f9c6da..7dc5d5c 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -27,17 +27,17 @@ static void __save_processor_state(struct saved_context 
*ctxt)
/*
 * descriptor tables
 */
-   store_gdt(ctxt-gdt);
-   store_idt(ctxt-idt);
-   store_tr(ctxt-tr);
+   store_gdt(ctxt-gdt);
+   store_idt(ctxt-idt);
+   store_tr(ctxt-tr);
 
/*
 * segment registers
 */
-   savesegment(es, ctxt-es);
-   savesegment(fs, ctxt-fs);
-   savesegment(gs, ctxt-gs);
-   savesegment(ss, ctxt-ss);
+   savesegment(es, ctxt-es);
+   savesegment(fs, ctxt-fs);
+   savesegment(gs, ctxt-gs);
+   savesegment(ss, ctxt-ss);
 
/*
 * control registers
@@ -48,10 +48,12 @@ static void __save_processor_state(struct saved_context 
*ctxt)
ctxt-cr4 = read_cr4();
 }
 
+/* Needed by apm.c */
 void save_processor_state(void)
 {
__save_processor_state(saved_context);
 }
+EXPORT_SYMBOL(save_processor_state);
 
 static void do_fpu_end(void)
 {
@@ -64,9 +66,14 @@ static void do_fpu_end(void)
 static void fix_processor_context(void)
 {
int cpu = smp_processor_id();
-   struct tss_struct * t = per_cpu(init_tss, cpu);
+   struct tss_struct *t = per_cpu(init_tss, cpu);
 
-   set_tss_desc(cpu,t);/* This just modifies memory; should not be 
necessary. But... This is necessary, because 386 hardware has concept of busy 
TSS or some similar stupidity. */
+   set_tss_desc(cpu, t);   /*
+* This just modifies memory; should not be
+* necessary. But... This is necessary, because
+* 386 hardware has concept of busy TSS or some
+* similar stupidity.
+*/
 
load_TR_desc(); /* This does ltr */
load_LDT(current-active_mm-context); /* This does lldt */
@@ -100,16 +107,16 @@ static void __restore_processor_state(struct 
saved_context *ctxt)
 * now restore the descriptor tables to their proper values
 * ltr is done i fix_processor_context().
 */
-   load_gdt(ctxt-gdt);
-   load_idt(ctxt-idt);
+   load_gdt(ctxt-gdt);
+   load_idt(ctxt-idt);
 
/*
 * segment registers
 */
-   loadsegment(es, ctxt-es);
-   loadsegment(fs, ctxt-fs);
-   loadsegment(gs, ctxt-gs);
-   loadsegment(ss, ctxt-ss);
+   loadsegment(es, ctxt-es);
+   loadsegment(fs, ctxt-fs);
+   loadsegment(gs, ctxt-gs);
+   loadsegment(ss, ctxt-ss);
 
/*
 * sysenter MSRs
@@ -123,11 +130,9 @@ static void __restore_processor_state(struct saved_context 
*ctxt)
mcheck_init(boot_cpu_data);
 }
 
+/* Needed by apm.c */
 void restore_processor_state(void)
 {
__restore_processor_state(saved_context);
 }
-
-/* Needed by apm.c */
-EXPORT_SYMBOL(save_processor_state);
 EXPORT_SYMBOL(restore_processor_state);
-- 
1.5.4.2.316.gf7a7

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


[PATCH 2/2] x86: Coding Style fixes to arch/x86/kernel/cpu/common.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/common.c |  105 ++---
 1 files changed, 56 insertions(+), 49 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 750456f..d0de972 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -62,9 +62,9 @@ __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
 static int cachesize_override __cpuinitdata = -1;
 static int disable_x86_serial_nr __cpuinitdata = 1;
 
-struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
+struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
 
-static void __cpuinit default_init(struct cpuinfo_x86 * c)
+static void __cpuinit default_init(struct cpuinfo_x86 *c)
 {
/* Not much we can do here... */
/* Check if at least it has cpuid */
@@ -81,11 +81,11 @@ static struct cpu_dev __cpuinitdata default_cpu = {
.c_init = default_init,
.c_vendor = Unknown,
 };
-static struct cpu_dev * this_cpu __cpuinitdata = default_cpu;
+static struct cpu_dev *this_cpu __cpuinitdata = default_cpu;
 
 static int __init cachesize_setup(char *str)
 {
-   get_option (str, cachesize_override);
+   get_option(str, cachesize_override);
return 1;
 }
 __setup(cachesize=, cachesize_setup);
@@ -107,12 +107,12 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c)
/* Intel chips right-justify this string for some dumb reason;
   undo that brain damage */
p = q = c-x86_model_id[0];
-   while ( *p == ' ' )
+   while (*p == ' ')
 p++;
-   if ( p != q ) {
-while ( *p )
+   if (p != q) {
+while (*p)
  *q++ = *p++;
-while ( q = c-x86_model_id[48] )
+while (q = c-x86_model_id[48])
  *q++ = '\0';  /* Zero-pad the rest */
}
 
@@ -130,7 +130,7 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
cpuid(0x8005, dummy, dummy, ecx, edx);
printk(KERN_INFO CPU: L1 I Cache: %dK (%d bytes/line), D cache 
%dK (%d bytes/line)\n,
edx24, edx0xFF, ecx24, ecx0xFF);
-   c-x86_cache_size=(ecx24)+(edx24);  
+   c-x86_cache_size = (ecx24)+(edx24);
}
 
if (n  0x8006) /* Some chips just has a large L1. */
@@ -138,16 +138,16 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
 
ecx = cpuid_ecx(0x8006);
l2size = ecx  16;
-   
+
/* do processor-specific cache resizing */
if (this_cpu-c_size_cache)
-   l2size = this_cpu-c_size_cache(c,l2size);
+   l2size = this_cpu-c_size_cache(c, l2size);
 
/* Allow user to override all this if necessary. */
if (cachesize_override != -1)
l2size = cachesize_override;
 
-   if ( l2size == 0 )
+   if (l2size == 0)
return; /* Again, no L2 cache is possible */
 
c-x86_cache_size = l2size;
@@ -156,16 +156,19 @@ void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
   l2size, ecx  0xFF);
 }
 
-/* Naming convention should be: Name [(Codename)] */
-/* This table only is used unless init_vendor() below doesn't set it; */
-/* in particular, if CPUID levels 0x8002..4 are supported, this isn't used 
*/
+/*
+ * Naming convention should be: Name [(Codename)]
+ * This table only is used unless init_vendor() below doesn't set it;
+ * in particular, if CPUID levels 0x8002..4 are supported, this isn't used
+ *
+ */
 
 /* Look up CPU names by table lookup. */
 static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
 {
struct cpu_model_info *info;
 
-   if ( c-x86_model = 16 )
+   if (c-x86_model = 16)
return NULL;/* Range check */
 
if (!this_cpu)
@@ -190,9 +193,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, 
int early)
 
for (i = 0; i  X86_VENDOR_NUM; i++) {
if (cpu_devs[i]) {
-   if (!strcmp(v,cpu_devs[i]-c_ident[0]) ||
-   (cpu_devs[i]-c_ident[1]  
-!strcmp(v,cpu_devs[i]-c_ident[1]))) {
+   if (!strcmp(v, cpu_devs[i]-c_ident[0]) ||
+   (cpu_devs[i]-c_ident[1] 
+!strcmp(v, cpu_devs[i]-c_ident[1]))) {
c-x86_vendor = i;
if (!early)
this_cpu = cpu_devs[i];
@@ -210,7 +213,7 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, 
int early)
 }
 
 
-static int __init x86_fxsr_setup(char * s)
+static int __init x86_fxsr_setup(char *s)
 {
setup_clear_cpu_cap(X86_FEATURE_FXSR);
setup_clear_cpu_cap(X86_FEATURE_XMM);
@@ -219,7 +222,7 @@ static int __init x86_fxsr_setup(char * s)
 __setup(nofxsr, x86_fxsr_setup);
 
 
-static int

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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Change a WARN message in checkpatch

2008-02-24 Thread Paolo Ciarrocchi
On Sun, Feb 24, 2008 at 4:18 PM, Benny Halevy [EMAIL PROTECTED] wrote:
[...]
  How about:
  -   WARN(no space between function name and 
 open parenthesis '('\n . $herecurr);
  +   WARN(there should be no space between 
 function name and open parenthesis '('\n . $herecurr);

I originally suggested:
+   WARN(don't put a space between
function name and open parenthesis '('\n . $herecurr);
but I really prefer your version.

  The original phrasing can be interpreted like there is no space between 
 ... and the correct
  interpretation should be there should be no space between ...

Indeed.

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


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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 2/3] IDE: Replace __FUNCTION__ with __func__

2008-02-24 Thread Paolo Ciarrocchi
Applies on top of the previous patch.


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

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 3181e71..76317ab 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -650,7 +650,7 @@ int ide_cd_check_ireason(ide_drive_t *drive, int len, int 
ireason, int rw)
 
/* Whoops... */
printk(KERN_ERR %s: %s: wrong transfer direction!\n,
-   drive-name, __FUNCTION__);
+   drive-name, __func__);
 
xf = rw ? hwif-atapi_output_bytes : hwif-atapi_input_bytes;
ide_cd_pad_transfer(drive, xf, len);
@@ -663,7 +663,7 @@ int ide_cd_check_ireason(ide_drive_t *drive, int len, int 
ireason, int rw)
} else {
/* Drive wants a command packet, or invalid ireason... */
printk(KERN_ERR %s: %s: bad interrupt reason 0x%02x\n,
-   drive-name, __FUNCTION__, ireason);
+   drive-name, __func__, ireason);
}
 
cdrom_end_request(drive, 0);
@@ -682,7 +682,7 @@ static int ide_cd_check_transfer_size(ide_drive_t *drive, 
int len)
return 0;
 
printk(KERN_ERR %s: %s: Bad transfer size %d\n,
-   drive-name, __FUNCTION__, len);
+   drive-name, __func__, len);
 
if (cd-cd_flags  IDE_CD_FLAG_LIMIT_NFRAMES)
printk(KERN_ERR   This drive is not supported by 
@@ -727,7 +727,7 @@ static ide_startstop_t cdrom_start_rw_cont(ide_drive_t 
*drive)
if (rq-current_nr_sectors !=
bio_cur_sectors(rq-bio)) {
printk(KERN_ERR %s: %s: buffer botch (%u)\n,
-   drive-name, __FUNCTION__,
+   drive-name, __func__,
rq-current_nr_sectors);
cdrom_end_request(drive, 0);
return ide_stopped;
@@ -961,7 +961,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (rq-current_nr_sectors  0) {
printk(KERN_ERR %s: %s: data underrun 
(%d blocks)\n,
-   drive-name, __FUNCTION__,
+   drive-name, __func__,
rq-current_nr_sectors);
if (!write)
rq-cmd_flags |= REQ_FAILED;
@@ -1018,7 +1018,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t 
*drive)
printk(KERN_ERR %s: %s: The drive 
appears confused (ireason = 0x%02x). 
Trying to recover by ending request.\n,
-   drive-name, __FUNCTION__, ireason);
+   drive-name, __func__, ireason);
goto end_request;
}
 
@@ -1936,7 +1936,7 @@ static void ide_cd_release(struct kref *kref)
kfree(info-toc);
if (devinfo-handle == drive  unregister_cdrom(devinfo))
printk(KERN_ERR %s: %s failed to unregister device from the 
cdrom 
-   driver.\n, __FUNCTION__, drive-name);
+   driver.\n, __func__, drive-name);
drive-dsc_overlap = 0;
drive-driver_data = NULL;
blk_queue_prep_rq(drive-queue, NULL);
-- 
1.5.4.2.316.gf7a7

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


[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/2] x86: 2 Coding Style patches

2008-02-24 Thread Paolo Ciarrocchi
This email didn't reach lkml...

Hi Ingo,
 two more coding style patches.
 Compile tested, against x86/testing 4a6af5bbbd74dd812224900d3468b008d117da29

 Paolo Ciarrocchi (2):
  x86: Coding Style fixes to arch/x86/power/cpu_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/common.c

  arch/x86/kernel/cpu/common.c |  105 ++---
  arch/x86/power/cpu_32.c  |   41 +---
  2 files changed, 79 insertions(+), 67 deletions(-)

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


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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Change a WARN message in checkpatch

2008-02-24 Thread Paolo Ciarrocchi
On 2/25/08, Andy Whitcroft
 As we want the messages to be as short as possible, I am leaning towards
 standardising on:

 spaces prohibited where
 spaces required where

in that case i would prefer:
 space not required where
 space required where

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


[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 
 #include 
@@ -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(_lock, flags);
-   __put_cmd640_reg(reg,val);
+   __put_cmd640_reg(reg, val);
spin_unlock_irqrestore(_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)
+stat

[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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(_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(_lock, flags);
t = jiffies * 11932;
-   outb_p(0, 0x43);
+   outb_p(0, 0x43);
i = inb_p(0x40);
i |= inb(0x40) << 8;
spin_unlock_irqrestore(_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->wpcom>>2,++port);
-   outb_p(nsect,++port);
-   outb_p(sect,++port);
-   outb_p(cyl,++port);
-   outb_p(cyl>>8,++port);
-   outb_p(0xA0|(disk->unit<<4)|head,++port);
-   outb_p(cmd,++port);
+   outb_p(disk->ctl, HD_CMD);
+   port = HD_DATA;
+   outb_p(disk->wpcom>>2, ++port);
+   outb_p(nsect, ++port);
+   outb_p(sect, ++port);
+   outb_p(cyl, ++port);
+   outb_p(cyl>>8, ++port);
+   outb_p(0xA0|(disk->unit<<4)|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 = _info[i];
disk->special_op = disk->recalibrate = 1;
-   hd_out(disk,disk->sect,disk->sect,disk->head-1,
-   disk->cyl,WIN_SPECIFY,_hd);
+   hd_out(disk, disk->sect, disk->sect, disk->head-1,
+   disk->cyl, WIN_SPECIFY, _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_t

[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_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;
+   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, );
compute_clocks(pio2, );
@@ -275,7 +275,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const 
u8 pio)
 
spin_lock_irqsave(_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 = _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",
  

[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

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


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

diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 440266f..673f7dc 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -63,8 +63,7 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif)
 *  actually do our cable checking etc. Thankfully we don't need
 *  to do the plumbing for other cases.
 */
-   switch (port_map[port])
-   {
+   switch (port_map[port]) {
case PORT_PATA0:
if (control & (1 << 3)) /* 40/80 pin primary */
return ATA_CBL_PATA40;
-- 
1.5.4.2.316.gf7a7

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


[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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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 = _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_P

[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);
 
-/**
+/*
 

[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 
 #include 
 
-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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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 
@@ -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, );
 
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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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)) {
/*
-* 

[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(_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(, 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 

[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[] = {
"

[PATCH 00/10] IDE: Coding Style Fixes

2008-02-23 Thread Paolo Ciarrocchi
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.


Paolo Ciarrocchi (10):
  IDE: Coding Style fixes to drivers/ide/pci/sis5513.c
  IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c
  IDE: Coding Style fixes to drivers/ide/ide-pnp.c
  IDE: Coding Style fixes to drivers/ide/setup-pci.c
  IDE: Coding Style fixes to drivers/ide/ide-proc.c
  IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c
  IDE: Coding Style fixes to drivers/ide/pci/slc90e66.c
  IDE: Coding Style fixes to drivers/ide/pci/generic.c
  IDE: Coding Style fixes to drivers/ide/pci/jmicron.c
  IDE: Coding Style fixes to drivers/ide/pci/tc86c001.c

 drivers/ide/ide-pnp.c|   10 +-
 drivers/ide/ide-proc.c   |  175 +--
 drivers/ide/legacy/ide-4drives.c |2 +-
 drivers/ide/legacy/umc8672.c |   53 +--
 drivers/ide/pci/generic.c|   50 +-
 drivers/ide/pci/jmicron.c|3 +-
 drivers/ide/pci/sis5513.c|  190 +++---
 drivers/ide/pci/slc90e66.c   |6 +-
 drivers/ide/pci/tc86c001.c   |   28 +++---
 drivers/ide/setup-pci.c  |   45 -
 10 files changed, 274 insertions(+), 288 deletions(-)

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


Re: [PATCH] Change a WARN message in checkpatch

2008-02-23 Thread Paolo Ciarrocchi
On Mon, Jan 28, 2008 at 4:13 PM, Paolo Ciarrocchi
<[EMAIL PROTECTED]> wrote:
>
> On Jan 28, 2008 3:56 PM, Andy Whitcroft <[EMAIL PROTECTED]> wrote:
>  > On Mon, Jan 14, 2008 at 11:29:13PM +0100, Paolo Ciarrocchi wrote:
>  > > Hi Andy,
>  > > When I started using checkpatch I was confused by the following WARN 
> message:
>  > >
>  > >   no space between function name and open parenthesis
>  > >
>  > > I thought the problem was that a space was missing while the truth is 
> the opposite.
>  > >
>  > > How about the following patch?
>  >
>  > I can see how that language would be confusing.  Your patch makes the
>  > english clearer, but somehow seems clumsy.  There must be a better way
>  > to say this.  I will think on it and see what I can come up with.
>
>  Fair enought, I'm not English mother tongue and I'm sure you can come
>  up with a better
>  sentence :-)

AFAICS the problem is still present.

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


Re: [PATCH] Change a WARN message in checkpatch

2008-02-23 Thread Paolo Ciarrocchi
On Mon, Jan 28, 2008 at 4:13 PM, Paolo Ciarrocchi
[EMAIL PROTECTED] wrote:

 On Jan 28, 2008 3:56 PM, Andy Whitcroft [EMAIL PROTECTED] wrote:
   On Mon, Jan 14, 2008 at 11:29:13PM +0100, Paolo Ciarrocchi wrote:
Hi Andy,
When I started using checkpatch I was confused by the following WARN 
 message:
   
  no space between function name and open parenthesis
   
I thought the problem was that a space was missing while the truth is 
 the opposite.
   
How about the following patch?
  
   I can see how that language would be confusing.  Your patch makes the
   english clearer, but somehow seems clumsy.  There must be a better way
   to say this.  I will think on it and see what I can come up with.

  Fair enought, I'm not English mother tongue and I'm sure you can come
  up with a better
  sentence :-)

AFAICS the problem is still present.

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


[PATCH 00/10] IDE: Coding Style Fixes

2008-02-23 Thread Paolo Ciarrocchi
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.


Paolo Ciarrocchi (10):
  IDE: Coding Style fixes to drivers/ide/pci/sis5513.c
  IDE: Coding Style fixes to drivers/ide/legacy/umc8672.c
  IDE: Coding Style fixes to drivers/ide/ide-pnp.c
  IDE: Coding Style fixes to drivers/ide/setup-pci.c
  IDE: Coding Style fixes to drivers/ide/ide-proc.c
  IDE: Coding Style fixes to drivers/ide/legacy/ide-4drives.c
  IDE: Coding Style fixes to drivers/ide/pci/slc90e66.c
  IDE: Coding Style fixes to drivers/ide/pci/generic.c
  IDE: Coding Style fixes to drivers/ide/pci/jmicron.c
  IDE: Coding Style fixes to drivers/ide/pci/tc86c001.c

 drivers/ide/ide-pnp.c|   10 +-
 drivers/ide/ide-proc.c   |  175 +--
 drivers/ide/legacy/ide-4drives.c |2 +-
 drivers/ide/legacy/umc8672.c |   53 +--
 drivers/ide/pci/generic.c|   50 +-
 drivers/ide/pci/jmicron.c|3 +-
 drivers/ide/pci/sis5513.c|  190 +++---
 drivers/ide/pci/slc90e66.c   |6 +-
 drivers/ide/pci/tc86c001.c   |   28 +++---
 drivers/ide/setup-pci.c  |   45 -
 10 files changed, 274 insertions(+), 288 deletions(-)

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


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org

[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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 09/10] IDE: Coding Style fixes to drivers/ide/pci/jmicron.c

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


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

diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 440266f..673f7dc 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -63,8 +63,7 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif)
 *  actually do our cable checking etc. Thankfully we don't need
 *  to do the plumbing for other cases.
 */
-   switch (port_map[port])
-   {
+   switch (port_map[port]) {
case PORT_PATA0:
if (control  (1  3)) /* 40/80 pin primary */
return ATA_CBL_PATA40;
-- 
1.5.4.2.316.gf7a7

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


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[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

[PATCH 17/20] x86: Coding Style fixes to arch/x86/oprofile/nmi_timer_int.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/oprofile/nmi_timer_int.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/oprofile/nmi_timer_int.c 
b/arch/x86/oprofile/nmi_timer_int.c
index 1418e36..e3ecb71 100644
--- a/arch/x86/oprofile/nmi_timer_int.c
+++ b/arch/x86/oprofile/nmi_timer_int.c
@@ -17,14 +17,14 @@
 #include 
 #include 
 #include 
- 
+
 static int profile_timer_exceptions_notify(struct notifier_block *self,
   unsigned long val, void *data)
 {
struct die_args *args = (struct die_args *)data;
int ret = NOTIFY_DONE;
 
-   switch(val) {
+   switch (val) {
case DIE_NMI:
oprofile_add_sample(args->regs, 0);
ret = NOTIFY_STOP;
@@ -56,7 +56,7 @@ static void timer_stop(void)
 }
 
 
-int __init op_nmi_timer_init(struct oprofile_operations * ops)
+int __init op_nmi_timer_init(struct oprofile_operations *ops)
 {
if ((nmi_watchdog != NMI_IO_APIC) || (atomic_read(_active) <= 0))
return -ENODEV;
-- 
1.5.4.GIT

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


[PATCH 20/20] x86: Coding Style fixes to arch/x86/xen/multicalls.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/xen/multicalls.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c
index 5e6f36f..5791eb2 100644
--- a/arch/x86/xen/multicalls.c
+++ b/arch/x86/xen/multicalls.c
@@ -76,7 +76,7 @@ void xen_mc_flush(void)
if (ret) {
printk(KERN_ERR "%d multicall(s) failed: cpu %d\n",
   ret, smp_processor_id());
-   for(i = 0; i < b->mcidx; i++) {
+   for (i = 0; i < b->mcidx; i++) {
printk("  call %2d/%d: op=%lu arg=[%lx] 
result=%ld\n",
   i+1, b->mcidx,
   b->debug[i].op,
@@ -93,7 +93,7 @@ void xen_mc_flush(void)
 
local_irq_restore(flags);
 
-   for(i = 0; i < b->cbidx; i++) {
+   for (i = 0; i < b->cbidx; i++) {
struct callback *cb = >callbacks[i];
 
(*cb->fn)(cb->data);
-- 
1.5.4.GIT

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


[PATCH 19/20] x86: Coding Style fixes to arch/x86/kernel/msr.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/msr.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index af51ea8..4dfb405 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -65,8 +65,8 @@ static loff_t msr_seek(struct file *file, loff_t offset, int 
orig)
return ret;
 }
 
-static ssize_t msr_read(struct file *file, char __user * buf,
-   size_t count, loff_t * ppos)
+static ssize_t msr_read(struct file *file, char __user *buf,
+   size_t count, loff_t *ppos)
 {
u32 __user *tmp = (u32 __user *) buf;
u32 data[2];
-- 
1.5.4.GIT

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


[PATCH 18/20] x86: Coding Style fixes to arch/x86/kernel/acpi/sleep.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/acpi/sleep.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 6bc815c..dd78326 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -13,7 +13,7 @@
 #include 
 
 /* address in low memory of the wakeup routine. */
-unsigned long acpi_wakeup_address = 0;
+unsigned long acpi_wakeup_address;
 unsigned long acpi_realmode_flags;
 extern char wakeup_start, wakeup_end;
 
-- 
1.5.4.GIT

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


[PATCH 16/20] x86: Coding Style fixes to arch/x86/kernel/cpu/cyrix.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/cyrix.c |  115 +--
 1 files changed, 57 insertions(+), 58 deletions(-)

diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index 9c4ee98..a8b241b 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -19,7 +19,7 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, 
unsigned char *dir1)
 {
unsigned char ccr2, ccr3;
unsigned long flags;
-   
+
/* we test for DEVID by checking whether CCR3 is writable */
local_irq_save(flags);
ccr3 = getCx86(CX86_CCR3);
@@ -37,8 +37,7 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, 
unsigned char *dir1)
setCx86(CX86_CCR2, ccr2);
*dir0 = 0xfe;
}
-   }
-   else {
+   } else {
setCx86(CX86_CCR3, ccr3);  /* restore CCR3 */
 
/* read DIR0 and DIR1 CPU registers */
@@ -55,7 +54,7 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, 
unsigned char *dir1)
  * Actually since bugs.h doesn't even reference this perhaps someone should
  * fix the documentation ???
  */
-static unsigned char Cx86_dir0_msb __cpuinitdata = 0;
+static unsigned char Cx86_dir0_msb __cpuinitdata;
 
 static char Cx86_model[][9] __cpuinitdata = {
"Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ",
@@ -86,7 +85,7 @@ static char cyrix_model_mult2[] __cpuinitdata = "12233445";
 static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c)
 {
unsigned long flags;
-   
+
if (Cx86_dir0_msb == 3) {
unsigned char ccr3, ccr5;
 
@@ -132,7 +131,7 @@ static void __cpuinit set_cx86_memwb(void)
/* set 'Not Write-through' */
write_cr0(read_cr0() | X86_CR0_NW);
/* CCR2 bit 2: lock NW bit and set WT1 */
-   setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 );
+   setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
 }
 
 static void __cpuinit set_cx86_inc(void)
@@ -148,7 +147,7 @@ static void __cpuinit set_cx86_inc(void)
setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02);
/* PCR0 -- Performance Control */
/* Incrementor Margin 10 */
-   setCx86(CX86_PCR0, getCx86(CX86_PCR0) | 0x04); 
+   setCx86(CX86_PCR0, getCx86(CX86_PCR0) | 0x04);
setCx86(CX86_CCR3, ccr3);   /* disable MAPEN */
 }
 
@@ -167,16 +166,16 @@ static void __cpuinit geode_configure(void)
 
ccr3 = getCx86(CX86_CCR3);
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);   /* enable MAPEN */
-   
+
 
/* FPU fast, DTE cache, Mem bypass */
setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
setCx86(CX86_CCR3, ccr3);   /* disable MAPEN */
-   
+
set_cx86_memwb();
-   set_cx86_reorder(); 
+   set_cx86_reorder();
set_cx86_inc();
-   
+
local_irq_restore(flags);
 }
 
@@ -187,12 +186,14 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
char *buf = c->x86_model_id;
const char *p = NULL;
 
-   /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
-  3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
+   /*
+* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
+* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
+*/
clear_bit(0*32+31, c->x86_capability);
 
/* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
-   if ( test_bit(1*32+24, c->x86_capability) ) {
+   if (test_bit(1*32+24, c->x86_capability)) {
clear_bit(1*32+24, c->x86_capability);
set_bit(X86_FEATURE_CXMMX, c->x86_capability);
}
@@ -213,7 +214,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
 * the model, multiplier and stepping.  Black magic included,
 * to make the silicon step/rev numbers match the printed ones.
 */
-
+
switch (dir0_msn) {
unsigned char tmp;
 
@@ -250,17 +251,18 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
 #ifdef CONFIG_PCI
{
u32 vendor, device;
-   /* It isn't really a PCI quirk directly, but the cure is the
-  same. The MediaGX has deep magic SMM stuff that handles the
-  SB emulation. It throws away the fifo on disable_dma() which
-  is wrong and ruins the audio. 
-
-  Bug2: VSA1 has a wrap bug so that using maximum sized DMA 
-  causes bad things. According to NatSemi VSA2 has another
-  bug to do with 'hlt'. I've not seen any boards using VSA2
-  and X doesn't seem to support it either so who cares 8).
-  

[PATCH 14/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/mce_32.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mcheck/mce_32.c |   50 +-
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_32.c 
b/arch/x86/kernel/cpu/mcheck/mce_32.c
index a5182dc..774d87c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_32.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_32.c
@@ -10,20 +10,20 @@
 #include 
 #include 
 
-#include  
+#include 
 #include 
 #include 
 
 #include "mce.h"
 
-int mce_disabled = 0;
+int mce_disabled;
 int nr_mce_banks;
 
 EXPORT_SYMBOL_GPL(nr_mce_banks);   /* non-fatal.o */
 
 /* Handle unconfigured int18 (should never happen) */
-static void unexpected_machine_check(struct pt_regs * regs, long error_code)
-{  
+static void unexpected_machine_check(struct pt_regs *regs, long error_code)
+{
printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n", 
smp_processor_id());
 }
 
@@ -33,30 +33,30 @@ void (*machine_check_vector)(struct pt_regs *, long 
error_code) = unexpected_mac
 /* This has to be run for each processor */
 void mcheck_init(struct cpuinfo_x86 *c)
 {
-   if (mce_disabled==1)
+   if (mce_disabled == 1)
return;
 
switch (c->x86_vendor) {
-   case X86_VENDOR_AMD:
-   amd_mcheck_init(c);
-   break;
-
-   case X86_VENDOR_INTEL:
-   if (c->x86==5)
-   intel_p5_mcheck_init(c);
-   if (c->x86==6)
-   intel_p6_mcheck_init(c);
-   if (c->x86==15)
-   intel_p4_mcheck_init(c);
-   break;
-
-   case X86_VENDOR_CENTAUR:
-   if (c->x86==5)
-   winchip_mcheck_init(c);
-   break;
-
-   default:
-   break;
+   case X86_VENDOR_AMD:
+   amd_mcheck_init(c);
+   break;
+
+   case X86_VENDOR_INTEL:
+   if (c->x86 == 5)
+   intel_p5_mcheck_init(c);
+   if (c->x86 == 6)
+   intel_p6_mcheck_init(c);
+   if (c->x86 == 15)
+   intel_p4_mcheck_init(c);
+   break;
+
+   case X86_VENDOR_CENTAUR:
+   if (c->x86 == 5)
+   winchip_mcheck_init(c);
+   break;
+
+   default:
+   break;
}
 }
 
-- 
1.5.4.GIT

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


[PATCH 15/20] x86: Coding Style fixes to arch/x86/boot/cpucheck.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/boot/cpucheck.c |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
index 769065b..2462c88 100644
--- a/arch/x86/boot/cpucheck.c
+++ b/arch/x86/boot/cpucheck.c
@@ -56,27 +56,27 @@ static const u32 req_flags[NCAPINTS] =
REQUIRED_MASK7,
 };
 
-#define A32(a,b,c,d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
+#define A32(a, b, c, d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
 
 static int is_amd(void)
 {
-   return cpu_vendor[0] == A32('A','u','t','h') &&
-  cpu_vendor[1] == A32('e','n','t','i') &&
-  cpu_vendor[2] == A32('c','A','M','D');
+   return cpu_vendor[0] == A32('A', 'u', 't', 'h') &&
+  cpu_vendor[1] == A32('e', 'n', 't', 'i') &&
+  cpu_vendor[2] == A32('c', 'A', 'M', 'D');
 }
 
 static int is_centaur(void)
 {
-   return cpu_vendor[0] == A32('C','e','n','t') &&
-  cpu_vendor[1] == A32('a','u','r','H') &&
-  cpu_vendor[2] == A32('a','u','l','s');
+   return cpu_vendor[0] == A32('C', 'e', 'n', 't') &&
+  cpu_vendor[1] == A32('a', 'u', 'r', 'H') &&
+  cpu_vendor[2] == A32('a', 'u', 'l', 's');
 }
 
 static int is_transmeta(void)
 {
-   return cpu_vendor[0] == A32('G','e','n','u') &&
-  cpu_vendor[1] == A32('i','n','e','T') &&
-  cpu_vendor[2] == A32('M','x','8','6');
+   return cpu_vendor[0] == A32('G', 'e', 'n', 'u') &&
+  cpu_vendor[1] == A32('i', 'n', 'e', 'T') &&
+  cpu_vendor[2] == A32('M', 'x', '8', '6');
 }
 
 static int has_fpu(void)
-- 
1.5.4.GIT

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


[PATCH 13/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/winchip.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mcheck/winchip.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/winchip.c 
b/arch/x86/kernel/cpu/mcheck/winchip.c
index 3d428d5..f2be3e1 100644
--- a/arch/x86/kernel/cpu/mcheck/winchip.c
+++ b/arch/x86/kernel/cpu/mcheck/winchip.c
@@ -8,14 +8,14 @@
 #include 
 #include 
 
-#include  
+#include 
 #include 
 #include 
 
 #include "mce.h"
 
 /* Machine check handler for WinChip C6 */
-static void winchip_machine_check(struct pt_regs * regs, long error_code)
+static void winchip_machine_check(struct pt_regs *regs, long error_code)
 {
printk(KERN_EMERG "CPU0: Machine Check Exception.\n");
add_taint(TAINT_MACHINE_CHECK);
@@ -28,8 +28,8 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c)
machine_check_vector = winchip_machine_check;
wmb();
rdmsr(MSR_IDT_FCR1, lo, hi);
-   lo|= (1<<2);/* Enable EIERRINT (int 18 MCE) */
-   lo&= ~(1<<4);   /* Enable MCE */
+   lo |= (1<<2);   /* Enable EIERRINT (int 18 MCE) */
+   lo &= ~(1<<4);  /* Enable MCE */
wrmsr(MSR_IDT_FCR1, lo, hi);
set_in_cr4(X86_CR4_MCE);
printk(KERN_INFO "Winchip machine check reporting enabled on CPU#0.\n");
-- 
1.5.4.GIT

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


[PATCH 11/20] x86: Coding Style fixes to arch/x86/kernel/vm86_32.c

2008-02-22 Thread Paolo Ciarrocchi
Fix plenty of errors and warnings.
Compile tested.


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/vm86_32.c |  174 +++--
 1 files changed, 89 insertions(+), 85 deletions(-)

diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 738c210..f5ce9c9 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -64,7 +64,7 @@
 
 
 #define KVM86  ((struct kernel_vm86_struct *)regs)
-#define VMPI   KVM86->vm86plus
+#define VMPI   KVM86->vm86plus
 
 
 /*
@@ -81,7 +81,7 @@
 #define VFLAGS (*(unsigned short *)&(current->thread.v86flags))
 #define VEFLAGS(current->thread.v86flags)
 
-#define set_flags(X,new,mask) \
+#define set_flags(X, new, mask) \
 ((X) = ((X) & ~(mask)) | ((new) & (mask)))
 
 #define SAFE_MASK  (0xDD5)
@@ -93,8 +93,10 @@ static int copy_vm86_regs_to_user(struct vm86_regs __user 
*user,
 {
int ret = 0;
 
-   /* kernel_vm86_regs is missing gs, so copy everything up to
-  (but not including) orig_eax, and then rest including orig_eax. */
+   /*
+* kernel_vm86_regs is missing gs, so copy everything up to
+* (but not including) orig_eax, and then rest including orig_eax.
+*/
ret += copy_to_user(user, regs, offsetof(struct kernel_vm86_regs, 
pt.orig_ax));
ret += copy_to_user(>orig_eax, >pt.orig_ax,
sizeof(struct kernel_vm86_regs) -
@@ -120,7 +122,7 @@ static int copy_vm86_regs_from_user(struct kernel_vm86_regs 
*regs,
return ret;
 }
 
-struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
+struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
 {
struct tss_struct *tss;
struct pt_regs *ret;
@@ -138,8 +140,8 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * 
regs)
do_exit(SIGSEGV);
}
set_flags(regs->pt.flags, VEFLAGS, VIF_MASK | current->thread.v86mask);
-   tmp = copy_vm86_regs_to_user(>thread.vm86_info->regs,regs);
-   tmp += 
put_user(current->thread.screen_bitmap,>thread.vm86_info->screen_bitmap);
+   tmp = copy_vm86_regs_to_user(>thread.vm86_info->regs, regs);
+   tmp += put_user(current->thread.screen_bitmap, 
>thread.vm86_info->screen_bitmap);
if (tmp) {
printk("vm86: could not access userspace vm86_info\n");
do_exit(SIGSEGV);
@@ -237,20 +239,21 @@ asmlinkage int sys_vm86(struct pt_regs regs)
 
tsk = current;
switch (regs.bx) {
-   case VM86_REQUEST_IRQ:
-   case VM86_FREE_IRQ:
-   case VM86_GET_IRQ_BITS:
-   case VM86_GET_AND_RESET_IRQ:
-   ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
-   goto out;
-   case VM86_PLUS_INSTALL_CHECK:
-   /* NOTE: on old vm86 stuff this will return the error
-  from access_ok(), because the subfunction is
-  interpreted as (invalid) address to vm86_struct.
-  So the installation check works.
-*/
-   ret = 0;
-   goto out;
+   case VM86_REQUEST_IRQ:
+   case VM86_FREE_IRQ:
+   case VM86_GET_IRQ_BITS:
+   case VM86_GET_AND_RESET_IRQ:
+   ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
+   goto out;
+   case VM86_PLUS_INSTALL_CHECK:
+   /*
+* NOTE: on old vm86 stuff this will return the error
+*  from access_ok(), because the subfunction is
+*  interpreted as (invalid) address to vm86_struct.
+*  So the installation check works.
+*/
+   ret = 0;
+   goto out;
}
 
/* we come here only for functions VM86_ENTER, VM86_ENTER_NO_BYPASS */
@@ -299,18 +302,18 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, 
struct task_struct *tsk
info->regs.pt.flags |= VM_MASK;
 
switch (info->cpu_type) {
-   case CPU_286:
-   tsk->thread.v86mask = 0;
-   break;
-   case CPU_386:
-   tsk->thread.v86mask = NT_MASK | IOPL_MASK;
-   break;
-   case CPU_486:
-   tsk->thread.v86mask = AC_MASK | NT_MASK | IOPL_MASK;
-   break;
-   default:
-   tsk->thread.v86mask = ID_MASK | AC_MASK | NT_MASK | 
IOPL_MASK;
-   break;
+   case CPU_286:
+   tsk->thread.v86mask = 0;
+   break;
+   case CPU_386:
+   tsk->thread.v86mask = NT_MASK | IOPL_MASK;
+   break;
+   case CPU_486:
+   tsk->thread.v86mask = AC_MASK

[PATCH 12/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mcheck/non-fatal.c |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/non-fatal.c 
b/arch/x86/kernel/cpu/mcheck/non-fatal.c
index bf39409..00ccb6c 100644
--- a/arch/x86/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/x86/kernel/cpu/mcheck/non-fatal.c
@@ -16,7 +16,7 @@
 #include 
 #include 
 
-#include  
+#include 
 #include 
 #include 
 
@@ -26,23 +26,26 @@ static int firstbank;
 
 #define MCE_RATE   15*HZ   /* timer rate is 15s */
 
-static void mce_checkregs (void *info)
+static void mce_checkregs(void *info)
 {
u32 low, high;
int i;
 
-   for (i=firstbank; ihttp://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/20] x86: Coding Style fixes to arch/x86/kernel/cpu/transmeta.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/transmeta.c |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c
index c2d168e..daee21d 100644
--- a/arch/x86/kernel/cpu/transmeta.c
+++ b/arch/x86/kernel/cpu/transmeta.c
@@ -18,8 +18,8 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
/* Print CMS and CPU revision */
max = cpuid_eax(0x8086);
cpu_rev = 0;
-   if ( max >= 0x80860001 ) {
-   cpuid(0x80860001, , _rev, _freq, _flags); 
+   if (max >= 0x80860001) {
+   cpuid(0x80860001, , _rev, _freq, _flags);
if (cpu_rev != 0x0200) {
printk(KERN_INFO "CPU: Processor revision %u.%u.%u.%u, 
%u MHz\n",
(cpu_rev >> 24) & 0xff,
@@ -29,7 +29,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
cpu_freq);
}
}
-   if ( max >= 0x80860002 ) {
+   if (max >= 0x80860002) {
cpuid(0x80860002, _cpu_rev, _rev1, _rev2, );
if (cpu_rev == 0x0200) {
printk(KERN_INFO "CPU: Processor revision %08X, %u 
MHz\n",
@@ -42,7 +42,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
   cms_rev1 & 0xff,
   cms_rev2);
}
-   if ( max >= 0x80860006 ) {
+   if (max >= 0x80860006) {
cpuid(0x80860003,
  (void *)_info[0],
  (void *)_info[4],
@@ -75,22 +75,24 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
 
/* All Transmeta CPUs have a constant TSC */
set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
-   
+
 #ifdef CONFIG_SYSCTL
-   /* randomize_va_space slows us down enormously;
-  it probably triggers retranslation of x86->native bytecode */
+   /*
+* randomize_va_space slows us down enormously;
+* it probably triggers retranslation of x86->native bytecode
+*/
randomize_va_space = 0;
 #endif
 }
 
-static void __cpuinit transmeta_identify(struct cpuinfo_x86 * c)
+static void __cpuinit transmeta_identify(struct cpuinfo_x86 *c)
 {
u32 xlvl;
 
/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x8086);
-   if ( (xlvl & 0x) == 0x8086 ) {
-   if (  xlvl >= 0x80860001 )
+   if ((xlvl & 0x) == 0x8086) {
+   if (xlvl >= 0x80860001)
c->x86_capability[2] = cpuid_edx(0x80860001);
}
 }
-- 
1.5.4.GIT

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


[PATCH 10/20] x86: Coding Style fixes to arch/x86/kernel/cpu/amd.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/amd.c |   94 +++--
 1 files changed, 48 insertions(+), 46 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index cab4e56..1a3e1bb 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -20,7 +20,7 @@
  * the chip setting when fixing the bug but they also tweaked some
  * performance at the same time..
  */
- 
+
 extern void vide(void);
 __asm__(".align 4\nvide: ret");
 
@@ -81,7 +81,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 #ifdef CONFIG_SMP
unsigned long long value;
 
-   /* Disable TLB flush filter by setting HWCR.FFDIS on K8
+   /*
+* Disable TLB flush filter by setting HWCR.FFDIS on K8
 * bit 6 of msr C001_0015
 *
 * Errata 63 for SH-B3 steppings
@@ -102,15 +103,16 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 *  no bus pipeline)
 */
 
-   /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
-  3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
+   /*
+* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
+* DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
+*/
clear_bit(0*32+31, c->x86_capability);
-   
+
r = get_model_name(c);
 
-   switch(c->x86)
-   {
-   case 4:
+   switch (c->x86) {
+   case 4:
/*
 * General Systems BIOSen alias the cpu frequency registers
 * of the Elan at 0x000df000. Unfortuantly, one of the Linux
@@ -120,61 +122,60 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 #define CBAR   (0xfffc) /* Configuration Base Address  (32-bit) */
 #define CBAR_ENB   (0x8000)
 #define CBAR_KEY   (0X00CB)
-   if (c->x86_model==9 || c->x86_model == 10) {
+   if (c->x86_model == 9 || c->x86_model == 10) {
if (inl (CBAR) & CBAR_ENB)
outl (0 | CBAR_KEY, CBAR);
}
break;
-   case 5:
-   if( c->x86_model < 6 )
-   {
+   case 5:
+   if (c->x86_model < 6) {
/* Based on AMD doc 20734R - June 2000 */
-   if ( c->x86_model == 0 ) {
+   if (c->x86_model == 0) {
clear_bit(X86_FEATURE_APIC, 
c->x86_capability);
set_bit(X86_FEATURE_PGE, 
c->x86_capability);
}
break;
}
-   
-   if ( c->x86_model == 6 && c->x86_mask == 1 ) {
+
+   if (c->x86_model == 6 && c->x86_mask == 1) {
const int K6_BUG_LOOP = 100;
int n;
void (*f_vide)(void);
unsigned long d, d2;
-   
+
printk(KERN_INFO "AMD K6 stepping B detected - 
");
-   
+
/*
-* It looks like AMD fixed the 2.6.2 bug and 
improved indirect 
+* It looks like AMD fixed the 2.6.2 bug and 
improved indirect
 * calls at the same time.
 */
 
n = K6_BUG_LOOP;
f_vide = vide;
rdtscl(d);
-   while (n--) 
+   while (n--)
f_vide();
rdtscl(d2);
d = d2-d;
 
-   if (d > 20*K6_BUG_LOOP) 
+   if (d > 20*K6_BUG_LOOP)
printk("system stability may be 
impaired when more than 32 MB are used.\n");
-   else 
+   else
printk("probably OK (after 
B9730).\n");
printk(KERN_INFO "Please see 
http://membres.lycos.fr/poulot/k6bug.html\n;);
}
 
/* K6 with old style WHCR */
if (c->x86_model < 8 ||
-  (c->x86_model== 8 && c->x86_mask &

[PATCH 08/20] x86: Coding Style fixes to arch/x86/lib/memcpy_32.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/lib/memcpy_32.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
index 37756b6..5415a9d 100644
--- a/arch/x86/lib/memcpy_32.c
+++ b/arch/x86/lib/memcpy_32.c
@@ -25,7 +25,7 @@ void *memmove(void *dest, const void *src, size_t n)
int d0, d1, d2;
 
if (dest < src) {
-   memcpy(dest,src,n);
+   memcpy(dest, src, n);
} else {
__asm__ __volatile__(
"std\n\t"
-- 
1.5.4.GIT

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


[PATCH 07/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mtrr/state.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mtrr/state.c |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/state.c b/arch/x86/kernel/cpu/mtrr/state.c
index 9f8ba92..7f7e275 100644
--- a/arch/x86/kernel/cpu/mtrr/state.c
+++ b/arch/x86/kernel/cpu/mtrr/state.c
@@ -19,13 +19,15 @@ void set_mtrr_prepare_save(struct set_mtrr_context *ctxt)
if (use_intel() || is_cpu(CYRIX)) {
 
/*  Save value of CR4 and clear Page Global Enable (bit 7)  */
-   if ( cpu_has_pge ) {
+   if (cpu_has_pge) {
ctxt->cr4val = read_cr4();
write_cr4(ctxt->cr4val & ~X86_CR4_PGE);
}
 
-   /*  Disable and flush caches. Note that wbinvd flushes the TLBs 
as
-   a side-effect  */
+   /*
+* Disable and flush caches. Note that wbinvd flushes the TLBs
+* as a side-effect
+*/
cr0 = read_cr0() | X86_CR0_CD;
wbinvd();
write_cr0(cr0);
@@ -42,7 +44,7 @@ void set_mtrr_prepare_save(struct set_mtrr_context *ctxt)
 
 void set_mtrr_cache_disable(struct set_mtrr_context *ctxt)
 {
-   if (use_intel()) 
+   if (use_intel())
/*  Disable MTRRs, and set the default type to uncached  */
mtrr_wrmsr(MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL,
  ctxt->deftype_hi);
@@ -66,12 +68,12 @@ void set_mtrr_done(struct set_mtrr_context *ctxt)
else
/* Cyrix ARRs - everything else was excluded at the top 
*/
setCx86(CX86_CCR3, ctxt->ccr3);
-   
+
/*  Enable caches  */
write_cr0(read_cr0() & 0xbfff);
 
/*  Restore value of CR4  */
-   if ( cpu_has_pge )
+   if (cpu_has_pge)
write_cr4(ctxt->cr4val);
}
/*  Re-enable interrupts locally (if enabled previously)  */
-- 
1.5.4.GIT

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


[PATCH 06/20] x86: Coding Style fixes to arch/x86/kernel/mca_32.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/mca_32.c |   96 +
 1 files changed, 53 insertions(+), 43 deletions(-)

diff --git a/arch/x86/kernel/mca_32.c b/arch/x86/kernel/mca_32.c
index 9482033..2dc1837 100644
--- a/arch/x86/kernel/mca_32.c
+++ b/arch/x86/kernel/mca_32.c
@@ -53,9 +53,9 @@
 #include 
 #include 
 
-static unsigned char which_scsi = 0;
+static unsigned char which_scsi;
 
-int MCA_bus = 0;
+int MCA_bus;
 EXPORT_SYMBOL(MCA_bus);
 
 /*
@@ -68,15 +68,17 @@ static DEFINE_SPINLOCK(mca_lock);
 
 /* Build the status info for the adapter */
 
-static void mca_configure_adapter_status(struct mca_device *mca_dev) {
+static void mca_configure_adapter_status(struct mca_device *mca_dev)
+{
mca_dev->status = MCA_ADAPTER_NONE;
 
mca_dev->pos_id = mca_dev->pos[0]
+ (mca_dev->pos[1] << 8);
 
-   if(!mca_dev->pos_id && mca_dev->slot < MCA_MAX_SLOT_NR) {
+   if (!mca_dev->pos_id && mca_dev->slot < MCA_MAX_SLOT_NR) {
 
-   /* id = 0x usually indicates hardware failure,
+   /*
+* id = 0x usually indicates hardware failure,
 * however, ZP Gu ([EMAIL PROTECTED]> reports that his 9556
 * has 0x as id and everything still works. There
 * also seem to be an adapter with id = 0x; the
@@ -87,9 +89,10 @@ static void mca_configure_adapter_status(struct mca_device 
*mca_dev) {
mca_dev->status = MCA_ADAPTER_ERROR;
 
return;
-   } else if(mca_dev->pos_id != 0x) {
+   } else if (mca_dev->pos_id != 0x) {
 
-   /* 0x usually indicates that there's no adapter,
+   /*
+* 0x usually indicates that there's no adapter,
 * however, some integrated adapters may have 0x as
 * their id and still be valid. Examples are on-board
 * VGA of the 55sx, the integrated SCSI of the 56 & 57,
@@ -99,19 +102,19 @@ static void mca_configure_adapter_status(struct mca_device 
*mca_dev) {
mca_dev->status = MCA_ADAPTER_NORMAL;
}
 
-   if((mca_dev->pos_id == 0x ||
+   if ((mca_dev->pos_id == 0x ||
mca_dev->pos_id == 0x) && mca_dev->slot >= MCA_MAX_SLOT_NR) {
int j;
 
-   for(j = 2; j < 8; j++) {
-   if(mca_dev->pos[j] != 0xff) {
+   for (j = 2; j < 8; j++) {
+   if (mca_dev->pos[j] != 0xff) {
mca_dev->status = MCA_ADAPTER_NORMAL;
break;
}
}
}
 
-   if(!(mca_dev->pos[2] & MCA_ENABLED)) {
+   if (!(mca_dev->pos[2] & MCA_ENABLED)) {
 
/* enabled bit is in POS 2 */
 
@@ -133,7 +136,7 @@ static struct resource mca_standard_resources[] = {
 
 #define MCA_STANDARD_RESOURCES ARRAY_SIZE(mca_standard_resources)
 
-/**
+/*
  * mca_read_and_store_pos - read the POS registers into a memory buffer
  *  @pos: a char pointer to 8 bytes, contains the POS register value on
  *successful return
@@ -141,12 +144,14 @@ static struct resource mca_standard_resources[] = {
  * Returns 1 if a card actually exists (i.e. the pos isn't
  * all 0xff) or 0 otherwise
  */
-static int mca_read_and_store_pos(unsigned char *pos) {
+static int mca_read_and_store_pos(unsigned char *pos)
+{
int j;
int found = 0;
 
-   for(j=0; j<8; j++) {
-   if((pos[j] = inb_p(MCA_POS_REG(j))) != 0xff) {
+   for (j = 0; j < 8; j++) {
+   pos[j] = inb_p(MCA_POS_REG(j));
+   if (pos[j] != 0xff) {
/* 0xff all across means no device. 0x00 means
 * something's broken, but a device is
 * probably there.  However, if you get 0x00
@@ -167,11 +172,11 @@ static unsigned char mca_pc_read_pos(struct mca_device 
*mca_dev, int reg)
unsigned char byte;
unsigned long flags;
 
-   if(reg < 0 || reg >= 8)
+   if (reg < 0 || reg >= 8)
return 0;
 
spin_lock_irqsave(_lock, flags);
-   if(mca_dev->pos_register) {
+   if (mca_dev->pos_register) {
/* Disable adapter setup, enable motherboard setup */
 
outb_p(0, MCA_ADAPTER_SETUP_REG);
@@ -203,7 +208,7 @@ static void mca_pc_write_pos(struct mca_device *mca_dev, 
int reg,
 {
unsigned long flags;
 
-   if(reg < 0 || reg >= 8)
+   if (reg < 0 || reg >= 8)
return;
 
spin_lock_irqsave(_lock, flags);
@@ -227,17 +232,17 @@ static void mca_pc_write_pos(struct mca_device *mca_

[PATCH 04/20] x86: Coding Style fixes to arch/x86/oprofile/init.c

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/oprofile/init.c |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/x86/oprofile/init.c b/arch/x86/oprofile/init.c
index 5341d48..cdfe4c5 100644
--- a/arch/x86/oprofile/init.c
+++ b/arch/x86/oprofile/init.c
@@ -10,18 +10,19 @@
 #include 
 #include 
 #include 
- 
-/* We support CPUs that have performance counters like the Pentium Pro
+
+/*
+ * We support CPUs that have performance counters like the Pentium Pro
  * with the NMI mode driver.
  */
- 
-extern int op_nmi_init(struct oprofile_operations * ops);
-extern int op_nmi_timer_init(struct oprofile_operations * ops);
+
+extern int op_nmi_init(struct oprofile_operations *ops);
+extern int op_nmi_timer_init(struct oprofile_operations *ops);
 extern void op_nmi_exit(void);
 extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
 
 
-int __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
int ret;
 
-- 
1.5.4.GIT

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


[PATCH 05/20] x86: Coding Style fixes to arch/x86/lib/strstr_3

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


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/lib/strstr_32.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/lib/strstr_32.c b/arch/x86/lib/strstr_32.c
index a3dafbf..42e8a50 100644
--- a/arch/x86/lib/strstr_32.c
+++ b/arch/x86/lib/strstr_32.c
@@ -1,9 +1,9 @@
 #include 
 
-char * strstr(const char * cs,const char * ct)
+char *strstr(const char *cs, const char *ct)
 {
 intd0, d1;
-register char * __res;
+register char *__res;
 __asm__ __volatile__(
"movl %6,%%edi\n\t"
"repne\n\t"
-- 
1.5.4.GIT

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


[PATCH 03/20] x86: Coding Style fixes to arch/x86/kernel/cpu/intel.c

2008-02-22 Thread Paolo Ciarrocchi
File is now error free.

Compile tested

Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/intel.c |   83 ++
 1 files changed, 43 insertions(+), 40 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index b5562a3..4bbf0ab 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -45,7 +45,7 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
  *
  * This is called before we do cpu ident work
  */
- 
+
 int __cpuinit ppro_with_ram_bug(void)
 {
/* Uses data from early_cpu_detect now */
@@ -58,7 +58,7 @@ int __cpuinit ppro_with_ram_bug(void)
}
return 0;
 }
-   
+
 
 /*
  * P4 Xeon errata 037 workaround.
@@ -69,7 +69,7 @@ static void __cpuinit Intel_errata_workarounds(struct 
cpuinfo_x86 *c)
unsigned long lo, hi;
 
if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) {
-   rdmsr (MSR_IA32_MISC_ENABLE, lo, hi);
+   rdmsr(MSR_IA32_MISC_ENABLE, lo, hi);
if ((lo & (1<<9)) == 0) {
printk (KERN_INFO "CPU: C0 stepping P4 Xeon 
detected.\n");
printk (KERN_INFO "CPU: Disabling hardware prefetching 
(Errata 037)\n");
@@ -127,10 +127,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 */
c->f00f_bug = 0;
if (!paravirt_enabled() && c->x86 == 5) {
-   static int f00f_workaround_enabled = 0;
+   static int f00f_workaround_enabled;
 
c->f00f_bug = 1;
-   if ( !f00f_workaround_enabled ) {
+   if (!f00f_workaround_enabled) {
trap_init_f00f_bug();
printk(KERN_NOTICE "Intel Pentium with F0 0F bug - 
workaround enabled.\n");
f00f_workaround_enabled = 1;
@@ -139,7 +139,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 #endif
 
l2 = init_intel_cacheinfo(c);
-   if (c->cpuid_level > 9 ) {
+   if (c->cpuid_level > 9) {
unsigned eax = cpuid_eax(10);
/* Check for version and the number of counters */
if ((eax & 0xff) && (((eax>>8) & 0xff) > 1))
@@ -150,9 +150,11 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633)
clear_bit(X86_FEATURE_SEP, c->x86_capability);
 
-   /* Names for the Pentium II/Celeron processors 
-  detectable only by also checking the cache size.
-  Dixon is NOT a Celeron. */
+   /*
+* Names for the Pentium II/Celeron processors
+* detectable only by also checking the cache size.
+* Dixon is NOT a Celeron.
+*/
if (c->x86 == 6) {
switch (c->x86_model) {
case 5:
@@ -163,14 +165,14 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
p = "Mobile Pentium II (Dixon)";
}
break;
-   
+
case 6:
if (l2 == 128)
p = "Celeron (Mendocino)";
else if (c->x86_mask == 0 || c->x86_mask == 5)
p = "Celeron-A";
break;
-   
+
case 8:
if (l2 == 128)
p = "Celeron (Coppermine)";
@@ -178,9 +180,9 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
}
}
 
-   if ( p )
+   if (p)
strcpy(c->x86_model_id, p);
-   
+
c->x86_max_cores = num_cpu_cores(c);
 
detect_ht(c);
@@ -211,7 +213,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if (c->x86 == 15) {
set_bit(X86_FEATURE_P4, c->x86_capability);
}
-   if (c->x86 == 6) 
+   if (c->x86 == 6)
set_bit(X86_FEATURE_P3, c->x86_capability);
if (cpu_has_ds) {
unsigned int l1;
@@ -227,9 +229,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
ptrace_bts_init_intel(c);
 }
 
-static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 * c, 
unsigned int size)
+static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned 
int size)
 {
-   /* Intel PIII Tualatin. This comes in two flavours.
+   /*
+* Intel PIII Tualatin. This comes in two flavours.
 * One has 256kb of cache, the other 512. We have no way
 * to determine which, so we use a boottime override
 * for the 512kb 

[PATCH 01/20] x86: Coding Style fix to arch/x86/boot/pm.c

2008-02-22 Thread Paolo Ciarrocchi
Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/boot/pm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index 1a0f936..a93cb8b 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -100,7 +100,7 @@ static void reset_coprocessor(void)
 /*
  * Set up the GDT
  */
-#define GDT_ENTRY(flags,base,limit)\
+#define GDT_ENTRY(flags, base, limit)  \
(((u64)(base & 0xff00) << 32) | \
 ((u64)flags << 40) |   \
 ((u64)(limit & 0x00ff) << 32) |\
-- 
1.5.4.GIT

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


[PATCH 02/20] x86: Coding Style fixes to arch/x86/kernel/summit_32.c

2008-02-22 Thread Paolo Ciarrocchi
File is now error free.


Signed-off-by: Paolo Ciarrocchi <[EMAIL PROTECTED]>
---
 arch/x86/kernel/summit_32.c |   43 +++
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 72f4634..c7b579d 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -40,38 +40,40 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
int twister = 0, node = 0;
int i, bus, num_buses;
 
-   for(i = 0; i < rio_table_hdr->num_rio_dev; i++){
-   if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id){
+   for (i = 0; i < rio_table_hdr->num_rio_dev; i++) {
+   if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id) {
twister = rio_devs[i]->owner_id;
break;
}
}
-   if (i == rio_table_hdr->num_rio_dev){
+   if (i == rio_table_hdr->num_rio_dev) {
printk(KERN_ERR "%s: Couldn't find owner Cyclone for 
Winnipeg!\n", __FUNCTION__);
return last_bus;
}
 
-   for(i = 0; i < rio_table_hdr->num_scal_dev; i++){
-   if (scal_devs[i]->node_id == twister){
+   for (i = 0; i < rio_table_hdr->num_scal_dev; i++) {
+   if (scal_devs[i]->node_id == twister) {
node = scal_devs[i]->node_id;
break;
}
}
-   if (i == rio_table_hdr->num_scal_dev){
+   if (i == rio_table_hdr->num_scal_dev) {
printk(KERN_ERR "%s: Couldn't find owner Twister for 
Cyclone!\n", __FUNCTION__);
return last_bus;
}
 
-   switch (rio_devs[wpeg_num]->type){
+   switch (rio_devs[wpeg_num]->type) {
case CompatWPEG:
-   /* The Compatibility Winnipeg controls the 2 legacy buses,
+   /*
+* The Compatibility Winnipeg controls the 2 legacy buses,
 * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case
 * a PCI-PCI bridge card is used in either slot: total 5 buses.
 */
num_buses = 5;
break;
case AltWPEG:
-   /* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
+   /*
+* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
 * each], their 2 "extra" buses, the 100MHz bus [2 slots] and
 * the "extra" buses for each of those slots: total 7 buses.
 */
@@ -79,7 +81,8 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
break;
case LookOutAWPEG:
case LookOutBWPEG:
-   /* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
+   /*
+* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
 * & the "extra" buses for each of those slots: total 9 buses.
 */
num_buses = 9;
@@ -89,7 +92,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
return last_bus;
}
 
-   for(bus = last_bus; bus < last_bus + num_buses; bus++)
+   for (bus = last_bus; bus < last_bus + num_buses; bus++)
mp_bus_id_to_node[bus] = node;
return bus;
 }
@@ -99,12 +102,12 @@ static int __init build_detail_arrays(void)
unsigned long ptr;
int i, scal_detail_size, rio_detail_size;
 
-   if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){
+   if (rio_table_hdr->num_scal_dev > MAX_NUMNODES) {
printk(KERN_WARNING "%s: MAX_NUMNODES too low!  Defined as %d, 
but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, 
rio_table_hdr->num_scal_dev);
return 0;
}
 
-   switch (rio_table_hdr->version){
+   switch (rio_table_hdr->version) {
default:
printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: 
%d\n", __FUNCTION__, rio_table_hdr->version);
return 0;
@@ -119,10 +122,10 @@ static int __init build_detail_arrays(void)
}
 
ptr = (unsigned long)rio_table_hdr + 3;
-   for(i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += 
scal_detail_size)
+   for (i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += 
scal_detail_size)
scal_devs[i] = (struct scal_detail *)ptr;
 
-   for(i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
+   for (i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
rio_devs[i] = (struct rio_detail *)ptr;
 
return 1;
@@ -140,9 +143,9 @@ void __init setup_summit

[PATCH 00/20] Various Coding Style fixes

2008-02-22 Thread Paolo Ciarrocchi
Various coding style fixes.

Paolo Ciarrocchi (20):
  x86: Coding Style fix to arch/x86/boot/pm.c
  x86: Coding Style fixes to arch/x86/kernel/summit_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/intel.c
  x86: Coding Style fixes to arch/x86/oprofile/init.c
  x86: Coding Style fixes to arch/x86/lib/strstr_32.c
  x86: Coding Style fixes to arch/x86/kernel/mca_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mtrr/state.c
  x86: Coding Style fixes to arch/x86/lib/memcpy_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/transmeta.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/amd.c
  x86: Coding Style fixes to arch/x86/kernel/vm86_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/winchip.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/mce_32.c
  x86: Coding Style fixes to arch/x86/boot/cpucheck.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/cyrix.c
  x86: Coding Style fixes to arch/x86/oprofile/nmi_timer_int.c
  x86: Coding Style fixes to arch/x86/kernel/acpi/sleep.c
  x86: Coding Style fixes to arch/x86/kernel/msr.c
  x86: Coding Style fixes to arch/x86/xen/multicalls.c

 arch/x86/boot/cpucheck.c   |   20 ++--
 arch/x86/boot/pm.c |2 +-
 arch/x86/kernel/acpi/sleep.c   |2 +-
 arch/x86/kernel/cpu/amd.c  |   94 +-
 arch/x86/kernel/cpu/cyrix.c|  115 +++---
 arch/x86/kernel/cpu/intel.c|   83 ---
 arch/x86/kernel/cpu/mcheck/mce_32.c|   50 +-
 arch/x86/kernel/cpu/mcheck/non-fatal.c |   21 ++--
 arch/x86/kernel/cpu/mcheck/winchip.c   |8 +-
 arch/x86/kernel/cpu/mtrr/state.c   |   14 ++-
 arch/x86/kernel/cpu/transmeta.c|   22 ++--
 arch/x86/kernel/mca_32.c   |   96 ++
 arch/x86/kernel/msr.c  |4 +-
 arch/x86/kernel/summit_32.c|   43 
 arch/x86/kernel/vm86_32.c  |  174 
 arch/x86/lib/memcpy_32.c   |2 +-
 arch/x86/lib/strstr_32.c   |4 +-
 arch/x86/oprofile/init.c   |   13 ++-
 arch/x86/oprofile/nmi_timer_int.c  |6 +-
 arch/x86/xen/multicalls.c  |4 +-
 20 files changed, 403 insertions(+), 374 deletions(-)

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


[PATCH 00/20] Various Coding Style fixes

2008-02-22 Thread Paolo Ciarrocchi
Various coding style fixes.

Paolo Ciarrocchi (20):
  x86: Coding Style fix to arch/x86/boot/pm.c
  x86: Coding Style fixes to arch/x86/kernel/summit_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/intel.c
  x86: Coding Style fixes to arch/x86/oprofile/init.c
  x86: Coding Style fixes to arch/x86/lib/strstr_32.c
  x86: Coding Style fixes to arch/x86/kernel/mca_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mtrr/state.c
  x86: Coding Style fixes to arch/x86/lib/memcpy_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/transmeta.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/amd.c
  x86: Coding Style fixes to arch/x86/kernel/vm86_32.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/winchip.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/mce_32.c
  x86: Coding Style fixes to arch/x86/boot/cpucheck.c
  x86: Coding Style fixes to arch/x86/kernel/cpu/cyrix.c
  x86: Coding Style fixes to arch/x86/oprofile/nmi_timer_int.c
  x86: Coding Style fixes to arch/x86/kernel/acpi/sleep.c
  x86: Coding Style fixes to arch/x86/kernel/msr.c
  x86: Coding Style fixes to arch/x86/xen/multicalls.c

 arch/x86/boot/cpucheck.c   |   20 ++--
 arch/x86/boot/pm.c |2 +-
 arch/x86/kernel/acpi/sleep.c   |2 +-
 arch/x86/kernel/cpu/amd.c  |   94 +-
 arch/x86/kernel/cpu/cyrix.c|  115 +++---
 arch/x86/kernel/cpu/intel.c|   83 ---
 arch/x86/kernel/cpu/mcheck/mce_32.c|   50 +-
 arch/x86/kernel/cpu/mcheck/non-fatal.c |   21 ++--
 arch/x86/kernel/cpu/mcheck/winchip.c   |8 +-
 arch/x86/kernel/cpu/mtrr/state.c   |   14 ++-
 arch/x86/kernel/cpu/transmeta.c|   22 ++--
 arch/x86/kernel/mca_32.c   |   96 ++
 arch/x86/kernel/msr.c  |4 +-
 arch/x86/kernel/summit_32.c|   43 
 arch/x86/kernel/vm86_32.c  |  174 
 arch/x86/lib/memcpy_32.c   |2 +-
 arch/x86/lib/strstr_32.c   |4 +-
 arch/x86/oprofile/init.c   |   13 ++-
 arch/x86/oprofile/nmi_timer_int.c  |6 +-
 arch/x86/xen/multicalls.c  |4 +-
 20 files changed, 403 insertions(+), 374 deletions(-)

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


[PATCH 01/20] x86: Coding Style fix to arch/x86/boot/pm.c

2008-02-22 Thread Paolo Ciarrocchi
Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/boot/pm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index 1a0f936..a93cb8b 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -100,7 +100,7 @@ static void reset_coprocessor(void)
 /*
  * Set up the GDT
  */
-#define GDT_ENTRY(flags,base,limit)\
+#define GDT_ENTRY(flags, base, limit)  \
(((u64)(base  0xff00)  32) | \
 ((u64)flags  40) |   \
 ((u64)(limit  0x00ff)  32) |\
-- 
1.5.4.GIT

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


[PATCH 02/20] x86: Coding Style fixes to arch/x86/kernel/summit_32.c

2008-02-22 Thread Paolo Ciarrocchi
File is now error free.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/summit_32.c |   43 +++
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 72f4634..c7b579d 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -40,38 +40,40 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
int twister = 0, node = 0;
int i, bus, num_buses;
 
-   for(i = 0; i  rio_table_hdr-num_rio_dev; i++){
-   if (rio_devs[i]-node_id == rio_devs[wpeg_num]-owner_id){
+   for (i = 0; i  rio_table_hdr-num_rio_dev; i++) {
+   if (rio_devs[i]-node_id == rio_devs[wpeg_num]-owner_id) {
twister = rio_devs[i]-owner_id;
break;
}
}
-   if (i == rio_table_hdr-num_rio_dev){
+   if (i == rio_table_hdr-num_rio_dev) {
printk(KERN_ERR %s: Couldn't find owner Cyclone for 
Winnipeg!\n, __FUNCTION__);
return last_bus;
}
 
-   for(i = 0; i  rio_table_hdr-num_scal_dev; i++){
-   if (scal_devs[i]-node_id == twister){
+   for (i = 0; i  rio_table_hdr-num_scal_dev; i++) {
+   if (scal_devs[i]-node_id == twister) {
node = scal_devs[i]-node_id;
break;
}
}
-   if (i == rio_table_hdr-num_scal_dev){
+   if (i == rio_table_hdr-num_scal_dev) {
printk(KERN_ERR %s: Couldn't find owner Twister for 
Cyclone!\n, __FUNCTION__);
return last_bus;
}
 
-   switch (rio_devs[wpeg_num]-type){
+   switch (rio_devs[wpeg_num]-type) {
case CompatWPEG:
-   /* The Compatibility Winnipeg controls the 2 legacy buses,
+   /*
+* The Compatibility Winnipeg controls the 2 legacy buses,
 * the 66MHz PCI bus [2 slots] and the 2 extra buses in case
 * a PCI-PCI bridge card is used in either slot: total 5 buses.
 */
num_buses = 5;
break;
case AltWPEG:
-   /* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
+   /*
+* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
 * each], their 2 extra buses, the 100MHz bus [2 slots] and
 * the extra buses for each of those slots: total 7 buses.
 */
@@ -79,7 +81,8 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
break;
case LookOutAWPEG:
case LookOutBWPEG:
-   /* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
+   /*
+* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
 *  the extra buses for each of those slots: total 9 buses.
 */
num_buses = 9;
@@ -89,7 +92,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, 
int last_bus)
return last_bus;
}
 
-   for(bus = last_bus; bus  last_bus + num_buses; bus++)
+   for (bus = last_bus; bus  last_bus + num_buses; bus++)
mp_bus_id_to_node[bus] = node;
return bus;
 }
@@ -99,12 +102,12 @@ static int __init build_detail_arrays(void)
unsigned long ptr;
int i, scal_detail_size, rio_detail_size;
 
-   if (rio_table_hdr-num_scal_dev  MAX_NUMNODES){
+   if (rio_table_hdr-num_scal_dev  MAX_NUMNODES) {
printk(KERN_WARNING %s: MAX_NUMNODES too low!  Defined as %d, 
but system has %d nodes.\n, __FUNCTION__, MAX_NUMNODES, 
rio_table_hdr-num_scal_dev);
return 0;
}
 
-   switch (rio_table_hdr-version){
+   switch (rio_table_hdr-version) {
default:
printk(KERN_WARNING %s: Invalid Rio Grande Table Version: 
%d\n, __FUNCTION__, rio_table_hdr-version);
return 0;
@@ -119,10 +122,10 @@ static int __init build_detail_arrays(void)
}
 
ptr = (unsigned long)rio_table_hdr + 3;
-   for(i = 0; i  rio_table_hdr-num_scal_dev; i++, ptr += 
scal_detail_size)
+   for (i = 0; i  rio_table_hdr-num_scal_dev; i++, ptr += 
scal_detail_size)
scal_devs[i] = (struct scal_detail *)ptr;
 
-   for(i = 0; i  rio_table_hdr-num_rio_dev; i++, ptr += rio_detail_size)
+   for (i = 0; i  rio_table_hdr-num_rio_dev; i++, ptr += rio_detail_size)
rio_devs[i] = (struct rio_detail *)ptr;
 
return 1;
@@ -140,9 +143,9 @@ void __init setup_summit(void)
 
rio_table_hdr = NULL;
offset = 0x180;
-   while (offset){
+   while (offset) {
/* The block id is stored in the 2nd word */
-   if (*((unsigned short *)(ptr + offset + 2)) == 0x4752

[PATCH 03/20] x86: Coding Style fixes to arch/x86/kernel/cpu/intel.c

2008-02-22 Thread Paolo Ciarrocchi
File is now error free.

Compile tested

Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/intel.c |   83 ++
 1 files changed, 43 insertions(+), 40 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index b5562a3..4bbf0ab 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -45,7 +45,7 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
  *
  * This is called before we do cpu ident work
  */
- 
+
 int __cpuinit ppro_with_ram_bug(void)
 {
/* Uses data from early_cpu_detect now */
@@ -58,7 +58,7 @@ int __cpuinit ppro_with_ram_bug(void)
}
return 0;
 }
-   
+
 
 /*
  * P4 Xeon errata 037 workaround.
@@ -69,7 +69,7 @@ static void __cpuinit Intel_errata_workarounds(struct 
cpuinfo_x86 *c)
unsigned long lo, hi;
 
if ((c-x86 == 15)  (c-x86_model == 1)  (c-x86_mask == 1)) {
-   rdmsr (MSR_IA32_MISC_ENABLE, lo, hi);
+   rdmsr(MSR_IA32_MISC_ENABLE, lo, hi);
if ((lo  (19)) == 0) {
printk (KERN_INFO CPU: C0 stepping P4 Xeon 
detected.\n);
printk (KERN_INFO CPU: Disabling hardware prefetching 
(Errata 037)\n);
@@ -127,10 +127,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 */
c-f00f_bug = 0;
if (!paravirt_enabled()  c-x86 == 5) {
-   static int f00f_workaround_enabled = 0;
+   static int f00f_workaround_enabled;
 
c-f00f_bug = 1;
-   if ( !f00f_workaround_enabled ) {
+   if (!f00f_workaround_enabled) {
trap_init_f00f_bug();
printk(KERN_NOTICE Intel Pentium with F0 0F bug - 
workaround enabled.\n);
f00f_workaround_enabled = 1;
@@ -139,7 +139,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 #endif
 
l2 = init_intel_cacheinfo(c);
-   if (c-cpuid_level  9 ) {
+   if (c-cpuid_level  9) {
unsigned eax = cpuid_eax(10);
/* Check for version and the number of counters */
if ((eax  0xff)  (((eax8)  0xff)  1))
@@ -150,9 +150,11 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if ((c-x868 | c-x86_model4 | c-x86_mask)  0x633)
clear_bit(X86_FEATURE_SEP, c-x86_capability);
 
-   /* Names for the Pentium II/Celeron processors 
-  detectable only by also checking the cache size.
-  Dixon is NOT a Celeron. */
+   /*
+* Names for the Pentium II/Celeron processors
+* detectable only by also checking the cache size.
+* Dixon is NOT a Celeron.
+*/
if (c-x86 == 6) {
switch (c-x86_model) {
case 5:
@@ -163,14 +165,14 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
p = Mobile Pentium II (Dixon);
}
break;
-   
+
case 6:
if (l2 == 128)
p = Celeron (Mendocino);
else if (c-x86_mask == 0 || c-x86_mask == 5)
p = Celeron-A;
break;
-   
+
case 8:
if (l2 == 128)
p = Celeron (Coppermine);
@@ -178,9 +180,9 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
}
}
 
-   if ( p )
+   if (p)
strcpy(c-x86_model_id, p);
-   
+
c-x86_max_cores = num_cpu_cores(c);
 
detect_ht(c);
@@ -211,7 +213,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if (c-x86 == 15) {
set_bit(X86_FEATURE_P4, c-x86_capability);
}
-   if (c-x86 == 6) 
+   if (c-x86 == 6)
set_bit(X86_FEATURE_P3, c-x86_capability);
if (cpu_has_ds) {
unsigned int l1;
@@ -227,9 +229,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
ptrace_bts_init_intel(c);
 }
 
-static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 * c, 
unsigned int size)
+static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned 
int size)
 {
-   /* Intel PIII Tualatin. This comes in two flavours.
+   /*
+* Intel PIII Tualatin. This comes in two flavours.
 * One has 256kb of cache, the other 512. We have no way
 * to determine which, so we use a boottime override
 * for the 512kb model, and assume 256 otherwise.
@@ -241,42 +244,42 @@ static unsigned int __cpuinit intel_size_cache(struct 
cpuinfo_x86 * c, unsigned
 
 static struct cpu_dev intel_cpu_dev __cpuinitdata = {
.c_vendor   = Intel,
-   .c_ident= { GenuineIntel },
+   .c_ident

[PATCH 04/20] x86: Coding Style fixes to arch/x86/oprofile/init.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/oprofile/init.c |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/x86/oprofile/init.c b/arch/x86/oprofile/init.c
index 5341d48..cdfe4c5 100644
--- a/arch/x86/oprofile/init.c
+++ b/arch/x86/oprofile/init.c
@@ -10,18 +10,19 @@
 #include linux/oprofile.h
 #include linux/init.h
 #include linux/errno.h
- 
-/* We support CPUs that have performance counters like the Pentium Pro
+
+/*
+ * We support CPUs that have performance counters like the Pentium Pro
  * with the NMI mode driver.
  */
- 
-extern int op_nmi_init(struct oprofile_operations * ops);
-extern int op_nmi_timer_init(struct oprofile_operations * ops);
+
+extern int op_nmi_init(struct oprofile_operations *ops);
+extern int op_nmi_timer_init(struct oprofile_operations *ops);
 extern void op_nmi_exit(void);
 extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
 
 
-int __init oprofile_arch_init(struct oprofile_operations * ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
int ret;
 
-- 
1.5.4.GIT

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


[PATCH 05/20] x86: Coding Style fixes to arch/x86/lib/strstr_3

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/lib/strstr_32.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/lib/strstr_32.c b/arch/x86/lib/strstr_32.c
index a3dafbf..42e8a50 100644
--- a/arch/x86/lib/strstr_32.c
+++ b/arch/x86/lib/strstr_32.c
@@ -1,9 +1,9 @@
 #include linux/string.h
 
-char * strstr(const char * cs,const char * ct)
+char *strstr(const char *cs, const char *ct)
 {
 intd0, d1;
-register char * __res;
+register char *__res;
 __asm__ __volatile__(
movl %6,%%edi\n\t
repne\n\t
-- 
1.5.4.GIT

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


[PATCH 06/20] x86: Coding Style fixes to arch/x86/kernel/mca_32.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/mca_32.c |   96 +
 1 files changed, 53 insertions(+), 43 deletions(-)

diff --git a/arch/x86/kernel/mca_32.c b/arch/x86/kernel/mca_32.c
index 9482033..2dc1837 100644
--- a/arch/x86/kernel/mca_32.c
+++ b/arch/x86/kernel/mca_32.c
@@ -53,9 +53,9 @@
 #include linux/init.h
 #include asm/arch_hooks.h
 
-static unsigned char which_scsi = 0;
+static unsigned char which_scsi;
 
-int MCA_bus = 0;
+int MCA_bus;
 EXPORT_SYMBOL(MCA_bus);
 
 /*
@@ -68,15 +68,17 @@ static DEFINE_SPINLOCK(mca_lock);
 
 /* Build the status info for the adapter */
 
-static void mca_configure_adapter_status(struct mca_device *mca_dev) {
+static void mca_configure_adapter_status(struct mca_device *mca_dev)
+{
mca_dev-status = MCA_ADAPTER_NONE;
 
mca_dev-pos_id = mca_dev-pos[0]
+ (mca_dev-pos[1]  8);
 
-   if(!mca_dev-pos_id  mca_dev-slot  MCA_MAX_SLOT_NR) {
+   if (!mca_dev-pos_id  mca_dev-slot  MCA_MAX_SLOT_NR) {
 
-   /* id = 0x usually indicates hardware failure,
+   /*
+* id = 0x usually indicates hardware failure,
 * however, ZP Gu ([EMAIL PROTECTED] reports that his 9556
 * has 0x as id and everything still works. There
 * also seem to be an adapter with id = 0x; the
@@ -87,9 +89,10 @@ static void mca_configure_adapter_status(struct mca_device 
*mca_dev) {
mca_dev-status = MCA_ADAPTER_ERROR;
 
return;
-   } else if(mca_dev-pos_id != 0x) {
+   } else if (mca_dev-pos_id != 0x) {
 
-   /* 0x usually indicates that there's no adapter,
+   /*
+* 0x usually indicates that there's no adapter,
 * however, some integrated adapters may have 0x as
 * their id and still be valid. Examples are on-board
 * VGA of the 55sx, the integrated SCSI of the 56  57,
@@ -99,19 +102,19 @@ static void mca_configure_adapter_status(struct mca_device 
*mca_dev) {
mca_dev-status = MCA_ADAPTER_NORMAL;
}
 
-   if((mca_dev-pos_id == 0x ||
+   if ((mca_dev-pos_id == 0x ||
mca_dev-pos_id == 0x)  mca_dev-slot = MCA_MAX_SLOT_NR) {
int j;
 
-   for(j = 2; j  8; j++) {
-   if(mca_dev-pos[j] != 0xff) {
+   for (j = 2; j  8; j++) {
+   if (mca_dev-pos[j] != 0xff) {
mca_dev-status = MCA_ADAPTER_NORMAL;
break;
}
}
}
 
-   if(!(mca_dev-pos[2]  MCA_ENABLED)) {
+   if (!(mca_dev-pos[2]  MCA_ENABLED)) {
 
/* enabled bit is in POS 2 */
 
@@ -133,7 +136,7 @@ static struct resource mca_standard_resources[] = {
 
 #define MCA_STANDARD_RESOURCES ARRAY_SIZE(mca_standard_resources)
 
-/**
+/*
  * mca_read_and_store_pos - read the POS registers into a memory buffer
  *  @pos: a char pointer to 8 bytes, contains the POS register value on
  *successful return
@@ -141,12 +144,14 @@ static struct resource mca_standard_resources[] = {
  * Returns 1 if a card actually exists (i.e. the pos isn't
  * all 0xff) or 0 otherwise
  */
-static int mca_read_and_store_pos(unsigned char *pos) {
+static int mca_read_and_store_pos(unsigned char *pos)
+{
int j;
int found = 0;
 
-   for(j=0; j8; j++) {
-   if((pos[j] = inb_p(MCA_POS_REG(j))) != 0xff) {
+   for (j = 0; j  8; j++) {
+   pos[j] = inb_p(MCA_POS_REG(j));
+   if (pos[j] != 0xff) {
/* 0xff all across means no device. 0x00 means
 * something's broken, but a device is
 * probably there.  However, if you get 0x00
@@ -167,11 +172,11 @@ static unsigned char mca_pc_read_pos(struct mca_device 
*mca_dev, int reg)
unsigned char byte;
unsigned long flags;
 
-   if(reg  0 || reg = 8)
+   if (reg  0 || reg = 8)
return 0;
 
spin_lock_irqsave(mca_lock, flags);
-   if(mca_dev-pos_register) {
+   if (mca_dev-pos_register) {
/* Disable adapter setup, enable motherboard setup */
 
outb_p(0, MCA_ADAPTER_SETUP_REG);
@@ -203,7 +208,7 @@ static void mca_pc_write_pos(struct mca_device *mca_dev, 
int reg,
 {
unsigned long flags;
 
-   if(reg  0 || reg = 8)
+   if (reg  0 || reg = 8)
return;
 
spin_lock_irqsave(mca_lock, flags);
@@ -227,17 +232,17 @@ static void mca_pc_write_pos(struct mca_device *mca_dev, 
int reg,
 }
 
 /* for the primary MCA bus, we have identity transforms */
-static int mca_dummy_transform_irq(struct mca_device * mca_dev, int irq)
+static int

[PATCH 07/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mtrr/state.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/mtrr/state.c |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/state.c b/arch/x86/kernel/cpu/mtrr/state.c
index 9f8ba92..7f7e275 100644
--- a/arch/x86/kernel/cpu/mtrr/state.c
+++ b/arch/x86/kernel/cpu/mtrr/state.c
@@ -19,13 +19,15 @@ void set_mtrr_prepare_save(struct set_mtrr_context *ctxt)
if (use_intel() || is_cpu(CYRIX)) {
 
/*  Save value of CR4 and clear Page Global Enable (bit 7)  */
-   if ( cpu_has_pge ) {
+   if (cpu_has_pge) {
ctxt-cr4val = read_cr4();
write_cr4(ctxt-cr4val  ~X86_CR4_PGE);
}
 
-   /*  Disable and flush caches. Note that wbinvd flushes the TLBs 
as
-   a side-effect  */
+   /*
+* Disable and flush caches. Note that wbinvd flushes the TLBs
+* as a side-effect
+*/
cr0 = read_cr0() | X86_CR0_CD;
wbinvd();
write_cr0(cr0);
@@ -42,7 +44,7 @@ void set_mtrr_prepare_save(struct set_mtrr_context *ctxt)
 
 void set_mtrr_cache_disable(struct set_mtrr_context *ctxt)
 {
-   if (use_intel()) 
+   if (use_intel())
/*  Disable MTRRs, and set the default type to uncached  */
mtrr_wrmsr(MTRRdefType_MSR, ctxt-deftype_lo  0xf300UL,
  ctxt-deftype_hi);
@@ -66,12 +68,12 @@ void set_mtrr_done(struct set_mtrr_context *ctxt)
else
/* Cyrix ARRs - everything else was excluded at the top 
*/
setCx86(CX86_CCR3, ctxt-ccr3);
-   
+
/*  Enable caches  */
write_cr0(read_cr0()  0xbfff);
 
/*  Restore value of CR4  */
-   if ( cpu_has_pge )
+   if (cpu_has_pge)
write_cr4(ctxt-cr4val);
}
/*  Re-enable interrupts locally (if enabled previously)  */
-- 
1.5.4.GIT

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


[PATCH 08/20] x86: Coding Style fixes to arch/x86/lib/memcpy_32.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/lib/memcpy_32.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
index 37756b6..5415a9d 100644
--- a/arch/x86/lib/memcpy_32.c
+++ b/arch/x86/lib/memcpy_32.c
@@ -25,7 +25,7 @@ void *memmove(void *dest, const void *src, size_t n)
int d0, d1, d2;
 
if (dest  src) {
-   memcpy(dest,src,n);
+   memcpy(dest, src, n);
} else {
__asm__ __volatile__(
std\n\t
-- 
1.5.4.GIT

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


[PATCH 09/20] x86: Coding Style fixes to arch/x86/kernel/cpu/transmeta.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/transmeta.c |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c
index c2d168e..daee21d 100644
--- a/arch/x86/kernel/cpu/transmeta.c
+++ b/arch/x86/kernel/cpu/transmeta.c
@@ -18,8 +18,8 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
/* Print CMS and CPU revision */
max = cpuid_eax(0x8086);
cpu_rev = 0;
-   if ( max = 0x80860001 ) {
-   cpuid(0x80860001, dummy, cpu_rev, cpu_freq, cpu_flags); 
+   if (max = 0x80860001) {
+   cpuid(0x80860001, dummy, cpu_rev, cpu_freq, cpu_flags);
if (cpu_rev != 0x0200) {
printk(KERN_INFO CPU: Processor revision %u.%u.%u.%u, 
%u MHz\n,
(cpu_rev  24)  0xff,
@@ -29,7 +29,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
cpu_freq);
}
}
-   if ( max = 0x80860002 ) {
+   if (max = 0x80860002) {
cpuid(0x80860002, new_cpu_rev, cms_rev1, cms_rev2, dummy);
if (cpu_rev == 0x0200) {
printk(KERN_INFO CPU: Processor revision %08X, %u 
MHz\n,
@@ -42,7 +42,7 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
   cms_rev1  0xff,
   cms_rev2);
}
-   if ( max = 0x80860006 ) {
+   if (max = 0x80860006) {
cpuid(0x80860003,
  (void *)cpu_info[0],
  (void *)cpu_info[4],
@@ -75,22 +75,24 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c)
 
/* All Transmeta CPUs have a constant TSC */
set_bit(X86_FEATURE_CONSTANT_TSC, c-x86_capability);
-   
+
 #ifdef CONFIG_SYSCTL
-   /* randomize_va_space slows us down enormously;
-  it probably triggers retranslation of x86-native bytecode */
+   /*
+* randomize_va_space slows us down enormously;
+* it probably triggers retranslation of x86-native bytecode
+*/
randomize_va_space = 0;
 #endif
 }
 
-static void __cpuinit transmeta_identify(struct cpuinfo_x86 * c)
+static void __cpuinit transmeta_identify(struct cpuinfo_x86 *c)
 {
u32 xlvl;
 
/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x8086);
-   if ( (xlvl  0x) == 0x8086 ) {
-   if (  xlvl = 0x80860001 )
+   if ((xlvl  0x) == 0x8086) {
+   if (xlvl = 0x80860001)
c-x86_capability[2] = cpuid_edx(0x80860001);
}
 }
-- 
1.5.4.GIT

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


[PATCH 10/20] x86: Coding Style fixes to arch/x86/kernel/cpu/amd.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/amd.c |   94 +++--
 1 files changed, 48 insertions(+), 46 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index cab4e56..1a3e1bb 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -20,7 +20,7 @@
  * the chip setting when fixing the bug but they also tweaked some
  * performance at the same time..
  */
- 
+
 extern void vide(void);
 __asm__(.align 4\nvide: ret);
 
@@ -81,7 +81,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 #ifdef CONFIG_SMP
unsigned long long value;
 
-   /* Disable TLB flush filter by setting HWCR.FFDIS on K8
+   /*
+* Disable TLB flush filter by setting HWCR.FFDIS on K8
 * bit 6 of msr C001_0015
 *
 * Errata 63 for SH-B3 steppings
@@ -102,15 +103,16 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 *  no bus pipeline)
 */
 
-   /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
-  3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
+   /*
+* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
+* DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
+*/
clear_bit(0*32+31, c-x86_capability);
-   
+
r = get_model_name(c);
 
-   switch(c-x86)
-   {
-   case 4:
+   switch (c-x86) {
+   case 4:
/*
 * General Systems BIOSen alias the cpu frequency registers
 * of the Elan at 0x000df000. Unfortuantly, one of the Linux
@@ -120,61 +122,60 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 #define CBAR   (0xfffc) /* Configuration Base Address  (32-bit) */
 #define CBAR_ENB   (0x8000)
 #define CBAR_KEY   (0X00CB)
-   if (c-x86_model==9 || c-x86_model == 10) {
+   if (c-x86_model == 9 || c-x86_model == 10) {
if (inl (CBAR)  CBAR_ENB)
outl (0 | CBAR_KEY, CBAR);
}
break;
-   case 5:
-   if( c-x86_model  6 )
-   {
+   case 5:
+   if (c-x86_model  6) {
/* Based on AMD doc 20734R - June 2000 */
-   if ( c-x86_model == 0 ) {
+   if (c-x86_model == 0) {
clear_bit(X86_FEATURE_APIC, 
c-x86_capability);
set_bit(X86_FEATURE_PGE, 
c-x86_capability);
}
break;
}
-   
-   if ( c-x86_model == 6  c-x86_mask == 1 ) {
+
+   if (c-x86_model == 6  c-x86_mask == 1) {
const int K6_BUG_LOOP = 100;
int n;
void (*f_vide)(void);
unsigned long d, d2;
-   
+
printk(KERN_INFO AMD K6 stepping B detected - 
);
-   
+
/*
-* It looks like AMD fixed the 2.6.2 bug and 
improved indirect 
+* It looks like AMD fixed the 2.6.2 bug and 
improved indirect
 * calls at the same time.
 */
 
n = K6_BUG_LOOP;
f_vide = vide;
rdtscl(d);
-   while (n--) 
+   while (n--)
f_vide();
rdtscl(d2);
d = d2-d;
 
-   if (d  20*K6_BUG_LOOP) 
+   if (d  20*K6_BUG_LOOP)
printk(system stability may be 
impaired when more than 32 MB are used.\n);
-   else 
+   else
printk(probably OK (after 
B9730).\n);
printk(KERN_INFO Please see 
http://membres.lycos.fr/poulot/k6bug.html\n;);
}
 
/* K6 with old style WHCR */
if (c-x86_model  8 ||
-  (c-x86_model== 8  c-x86_mask  8)) {
+  (c-x86_model == 8  c-x86_mask  8)) {
/* We can only write allocate on the low 508Mb 
*/
-   if(mbytes508

[PATCH 11/20] x86: Coding Style fixes to arch/x86/kernel/vm86_32.c

2008-02-22 Thread Paolo Ciarrocchi
Fix plenty of errors and warnings.
Compile tested.


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/vm86_32.c |  174 +++--
 1 files changed, 89 insertions(+), 85 deletions(-)

diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 738c210..f5ce9c9 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -64,7 +64,7 @@
 
 
 #define KVM86  ((struct kernel_vm86_struct *)regs)
-#define VMPI   KVM86-vm86plus
+#define VMPI   KVM86-vm86plus
 
 
 /*
@@ -81,7 +81,7 @@
 #define VFLAGS (*(unsigned short *)(current-thread.v86flags))
 #define VEFLAGS(current-thread.v86flags)
 
-#define set_flags(X,new,mask) \
+#define set_flags(X, new, mask) \
 ((X) = ((X)  ~(mask)) | ((new)  (mask)))
 
 #define SAFE_MASK  (0xDD5)
@@ -93,8 +93,10 @@ static int copy_vm86_regs_to_user(struct vm86_regs __user 
*user,
 {
int ret = 0;
 
-   /* kernel_vm86_regs is missing gs, so copy everything up to
-  (but not including) orig_eax, and then rest including orig_eax. */
+   /*
+* kernel_vm86_regs is missing gs, so copy everything up to
+* (but not including) orig_eax, and then rest including orig_eax.
+*/
ret += copy_to_user(user, regs, offsetof(struct kernel_vm86_regs, 
pt.orig_ax));
ret += copy_to_user(user-orig_eax, regs-pt.orig_ax,
sizeof(struct kernel_vm86_regs) -
@@ -120,7 +122,7 @@ static int copy_vm86_regs_from_user(struct kernel_vm86_regs 
*regs,
return ret;
 }
 
-struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
+struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
 {
struct tss_struct *tss;
struct pt_regs *ret;
@@ -138,8 +140,8 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * 
regs)
do_exit(SIGSEGV);
}
set_flags(regs-pt.flags, VEFLAGS, VIF_MASK | current-thread.v86mask);
-   tmp = copy_vm86_regs_to_user(current-thread.vm86_info-regs,regs);
-   tmp += 
put_user(current-thread.screen_bitmap,current-thread.vm86_info-screen_bitmap);
+   tmp = copy_vm86_regs_to_user(current-thread.vm86_info-regs, regs);
+   tmp += put_user(current-thread.screen_bitmap, 
current-thread.vm86_info-screen_bitmap);
if (tmp) {
printk(vm86: could not access userspace vm86_info\n);
do_exit(SIGSEGV);
@@ -237,20 +239,21 @@ asmlinkage int sys_vm86(struct pt_regs regs)
 
tsk = current;
switch (regs.bx) {
-   case VM86_REQUEST_IRQ:
-   case VM86_FREE_IRQ:
-   case VM86_GET_IRQ_BITS:
-   case VM86_GET_AND_RESET_IRQ:
-   ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
-   goto out;
-   case VM86_PLUS_INSTALL_CHECK:
-   /* NOTE: on old vm86 stuff this will return the error
-  from access_ok(), because the subfunction is
-  interpreted as (invalid) address to vm86_struct.
-  So the installation check works.
-*/
-   ret = 0;
-   goto out;
+   case VM86_REQUEST_IRQ:
+   case VM86_FREE_IRQ:
+   case VM86_GET_IRQ_BITS:
+   case VM86_GET_AND_RESET_IRQ:
+   ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
+   goto out;
+   case VM86_PLUS_INSTALL_CHECK:
+   /*
+* NOTE: on old vm86 stuff this will return the error
+*  from access_ok(), because the subfunction is
+*  interpreted as (invalid) address to vm86_struct.
+*  So the installation check works.
+*/
+   ret = 0;
+   goto out;
}
 
/* we come here only for functions VM86_ENTER, VM86_ENTER_NO_BYPASS */
@@ -299,18 +302,18 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, 
struct task_struct *tsk
info-regs.pt.flags |= VM_MASK;
 
switch (info-cpu_type) {
-   case CPU_286:
-   tsk-thread.v86mask = 0;
-   break;
-   case CPU_386:
-   tsk-thread.v86mask = NT_MASK | IOPL_MASK;
-   break;
-   case CPU_486:
-   tsk-thread.v86mask = AC_MASK | NT_MASK | IOPL_MASK;
-   break;
-   default:
-   tsk-thread.v86mask = ID_MASK | AC_MASK | NT_MASK | 
IOPL_MASK;
-   break;
+   case CPU_286:
+   tsk-thread.v86mask = 0;
+   break;
+   case CPU_386:
+   tsk-thread.v86mask = NT_MASK | IOPL_MASK;
+   break;
+   case CPU_486:
+   tsk-thread.v86mask = AC_MASK | NT_MASK | IOPL_MASK;
+   break;
+   default:
+   tsk-thread.v86mask

[PATCH 12/20] x86: Coding Style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c

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


Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
---
 arch/x86/kernel/cpu/mcheck/non-fatal.c |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/non-fatal.c 
b/arch/x86/kernel/cpu/mcheck/non-fatal.c
index bf39409..00ccb6c 100644
--- a/arch/x86/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/x86/kernel/cpu/mcheck/non-fatal.c
@@ -16,7 +16,7 @@
 #include linux/smp.h
 #include linux/module.h
 
-#include asm/processor.h 
+#include asm/processor.h
 #include asm/system.h
 #include asm/msr.h
 
@@ -26,23 +26,26 @@ static int firstbank;
 
 #define MCE_RATE   15*HZ   /* timer rate is 15s */
 
-static void mce_checkregs (void *info)
+static void mce_checkregs(void *info)
 {
u32 low, high;
int i;
 
-   for (i=firstbank; inr_mce_banks; i++) {
-   rdmsr (MSR_IA32_MC0_STATUS+i*4, low, high);
+   for (i = firstbank; i  nr_mce_banks; i++) {
+   rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
 
if (high  (131)) {
printk(KERN_INFO MCE: The hardware reports a non 
fatal, correctable incident occurred on 
CPU %d.\n,
smp_processor_id());
-   printk (KERN_INFO Bank %d: %08x%08x\n, i, high, low);
+   printk(KERN_INFO Bank %d: %08x%08x\n, i, high, low);
 
-   /* Scrub the error so we don't pick it up in MCE_RATE 
seconds time. */
-   wrmsr (MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
+   /*
+* Scrub the error so we don't pick it up in MCE_RATE
+* seconds time.
+*/
+   wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
 
/* Serialize */
wmb();
@@ -55,10 +58,10 @@ static void mce_work_fn(struct work_struct *work);
 static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
 
 static void mce_work_fn(struct work_struct *work)
-{ 
+{
on_each_cpu(mce_checkregs, NULL, 1, 1);
schedule_delayed_work(mce_work, round_jiffies_relative(MCE_RATE));
-} 
+}
 
 static int __init init_nonfatal_mce_checker(void)
 {
-- 
1.5.4.GIT

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


  1   2   3   4   >