[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200612060851.kB68p7Dp024603@harpo.it.uu.se>
Date: Wed, 6 Dec 2006 09:51:07 +0100 (MET)
From: Mikael Pettersson <mikpe@...uu.se>
To: htejun@...il.com, mikpe@...uu.se
Cc: jeff@...zik.org, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.19 3/3] sata_promise: cleanups
On Sun, 03 Dec 2006 22:05:51 +0900, Tejun Heo wrote:
>Mikael Pettersson wrote:
>> This patch performs two simple cleanups of sata_promise.
>>
>> * Remove board_20771 and map device id 0x3577 to board_2057x.
>> After the recent corrections for SATAII chips, board_20771 and
>> board_2057x were equivalent in the driver.
>
>Ack.
>
>> * Remove hp->hotplug_offset and use hp->flags & PDC_FLAG_GEN_II
>> to compute hotplug_offset in pdc_host_init().
>
>Please explain why.
hp->hotplug_offset was used to allow pdc_host_init() to work for both
1st and 2nd generation chips. However, more tests were needed to
properly handle other aspects of 2nd generation chips, so hp->flags
and PDC_FLAG_GEN_II were introduced. Now hp->hotplug_offset is redundant
since its value is derivable from hp->flags & PDC_FLAG_GEN_II.
>
>> @@ -704,7 +684,7 @@ static void pdc_host_init(unsigned int c
>> {
>> void __iomem *mmio = pe->mmio_base;
>> struct pdc_host_priv *hp = pe->private_data;
>> - int hotplug_offset = hp->hotplug_offset;
>> + int hotplug_offset = (hp->flags & PDC_FLAG_GEN_II) ? PDC2_SATA_PLUG_CSR : PDC_SATA_PLUG_CSR;
>
>People tend to prefer explicit if () over ?: and dislike lines much
>longer than 80 column, well, at least in libata.
OK, I'll replace the ?: with an if-statement.
/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists