cleanup FlashPoint_HardwareResetHostAdapter()
Subsystems (2)
PATCH 1/1 cleanup FlashPoint_HardwareResetHostAdapter()
cleanups for FlashPoint_HardwareResetHostAdapter()
Signed-off-by Roel Kluin <[email protected]>
---
This shouldn't cause semantics.
drivers/scsi/FlashPoint.c +13 -20
@@ -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_infobreak ; } } +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 );
Quoted 1 line · On Tue, 21 Jul 2009 13:38:12 +0200 Roel Kluin <[email protected]> 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.