* [PATCH] cleanup FlashPoint_HardwareResetHostAdapter()
@ 2009-07-21 11:38 Roel Kluin
2009-07-24 0:19 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-07-21 11:38 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, Andrew Morton
cleanups for FlashPoint_HardwareResetHostAdapter()
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
This shouldn't cause semantics.
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index b898d38..b917975 100644
--- a/drivers/scsi/FlashPoint.c
+++ b/drivers/scsi/FlashPoint.c
@@ -1212,32 +1212,25 @@ static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info
ioport = pCardInfo->si_baseaddr;
- for (thisCard = 0; thisCard <= MAX_CARDS; thisCard++) {
-
- if (thisCard == MAX_CARDS) {
-
- return FAILURE;
- }
+ for (thisCard = 0; thisCard < MAX_CARDS; thisCard++) {
if (FPT_BL_Card[thisCard].ioPort == ioport) {
CurrCard = &FPT_BL_Card[thisCard];
FPT_SccbMgrTableInitCard(CurrCard, thisCard);
break;
- }
- else if (FPT_BL_Card[thisCard].ioPort == 0x00) {
+ } else if (FPT_BL_Card[thisCard].ioPort == 0x00) {
FPT_BL_Card[thisCard].ioPort = ioport;
CurrCard = &FPT_BL_Card[thisCard];
- if (FPT_mbCards)
- for (i = 0; i < FPT_mbCards; i++) {
- if (CurrCard->ioPort ==
- FPT_nvRamInfo[i].niBaseAddr)
- CurrCard->pNvRamInfo =
- &FPT_nvRamInfo[i];
- }
+ for (i = 0; i < FPT_mbCards; i++) {
+ if (CurrCard->ioPort ==
+ FPT_nvRamInfo[i].niBaseAddr)
+ CurrCard->pNvRamInfo =
+ &FPT_nvRamInfo[i];
+ }
FPT_SccbMgrTableInitCard(CurrCard, thisCard);
CurrCard->cardIndex = thisCard;
CurrCard->cardInfo = pCardInfo;
@@ -1245,23 +1238,23 @@ static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info
break;
}
}
+ if (thisCard == MAX_CARDS)
+ return FAILURE;
pCurrNvRam = CurrCard->pNvRamInfo;
- if (pCurrNvRam) {
+ if (pCurrNvRam)
ScamFlg = pCurrNvRam->niScamConf;
- } else {
+ else
ScamFlg =
(unsigned char)FPT_utilEERead(ioport, SCAM_CONFIG / 2);
- }
FPT_BusMasterInit(ioport);
FPT_XbowInit(ioport, ScamFlg);
FPT_autoLoadDefaultMap(ioport);
- for (i = 0, id = 0x01; i != pCardInfo->si_id; i++, id <<= 1) {
- }
+ id = 0x01 << pCardInfo->si_id;
WR_HARPOON(ioport + hp_selfid_0, id);
WR_HARPOON(ioport + hp_selfid_1, 0x00);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cleanup FlashPoint_HardwareResetHostAdapter()
2009-07-21 11:38 [PATCH] cleanup FlashPoint_HardwareResetHostAdapter() Roel Kluin
@ 2009-07-24 0:19 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2009-07-24 0:19 UTC (permalink / raw)
To: Roel Kluin; +Cc: James.Bottomley, linux-scsi
On Tue, 21 Jul 2009 13:38:12 +0200
Roel Kluin <roel.kluin@gmail.com> wrote:
> cleanups for FlashPoint_HardwareResetHostAdapter()
I don't think I'll merge this, sorry. It'll just sit in my tree
getting resent and ignored for ever.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-24 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 11:38 [PATCH] cleanup FlashPoint_HardwareResetHostAdapter() Roel Kluin
2009-07-24 0:19 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox