Re: [PATCH v4] Resurrect IT8172 IDE controller driver

From: Shane McDonald
Date: Wed Dec 31 2008 - 21:35:31 EST


Sergei,

On Wed, Dec 31, 2008 at 6:07 AM, Sergei Shtylyov
<sshtylyov@xxxxxxxxxxxxx> wrote:
> Shane McDonald wrote:
>> Signed-off-by: Shane McDonald <mcdonald.shane@xxxxxxxxx>
> Acked-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

Please forgive my ignorance -- this is my first non-trivial patch...
I have made a new patch incorporating your suggestions as described below.
Do I include your Acked-by line in my re-spun patch, or do I need you
to Ack it again?
I will post the new patch when I receive guidance on this.

>> diff -uprN a/drivers/ide/it8172.c b/drivers/ide/it8172.c
>> --- a/drivers/ide/it8172.c 1969-12-31 18:00:00.000000000 -0600
>> +++ b/drivers/ide/it8172.c 2008-12-30 20:55:29.000000000 -0600
>> + { 7, 4 },
>> + { 3, 3 },
>> + { 2, 2 },
>> + { 1, 2 }, };
>> + /*
>> + * The highest value of DIOR/DIOW pulse width and recovery time
>> + * that can be set in the IT8172 is 8 PCI clock cycles. As a
>> result,
>> + * it cannot be configured for PIO mode 0. This table sets these
>> + * parameters to the maximum supported by the IT8172.
>> + */
>
> This comment seems somewhat mispalced...

I will move the comment before the timings array, where it belongs.

>> + drive_timing &= drive->dn ? 0x00003f00 : 0x000fc000;
>> + drive_timing |= ((timings[pio][0] << 11) | (timings[pio][1] << 8))
>> + << (drive->dn * 6);
>
> This can be somewhat shortened:
>
> drive_timing |= ((timings[pio][0] << 3) | timings[pio][1]) <<
> (drive->dn * 6 + 8);
>
>
> Could've be shortened even more if timings[] was single-dimensional...

Good point! I have made the array one-dimensional and shortened the
statement accordingly.

> MBR, Sergei

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