diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-09-13 13:12:28 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-09-14 10:29:15 -0500 |
commit | 4b2a8bf042e96d8181929e92d9b241f65280a93c (patch) | |
tree | 84ad2a2a9f2d5c57c4bea2f257a5ff34ff97a50d | |
parent | f6760755b655a3601612a8d4f11de0c394e24d49 (diff) | |
download | talos-hostboot-4b2a8bf042e96d8181929e92d9b241f65280a93c.tar.gz talos-hostboot-4b2a8bf042e96d8181929e92d9b241f65280a93c.zip |
Removed extra ::TargetArgs:: from usage.
Change-Id: I11ec4d124d58641af8902799002ac1ed5104d030
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/340
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/include/usr/initservice/taskargs.H | 4 | ||||
-rw-r--r-- | src/usr/isteps/istep1.C | 12 | ||||
-rw-r--r-- | src/usr/pnor/pnorrp.C | 35 | ||||
-rw-r--r-- | src/usr/targeting/targetservice.C | 30 | ||||
-rw-r--r-- | src/usr/vfs/vfsrp.C | 3 |
5 files changed, 43 insertions, 41 deletions
diff --git a/src/include/usr/initservice/taskargs.H b/src/include/usr/initservice/taskargs.H index fdc24e291..39c7c86cc 100644 --- a/src/include/usr/initservice/taskargs.H +++ b/src/include/usr/initservice/taskargs.H @@ -48,8 +48,8 @@ extern "C" \ void _start( void *io_pArgs ) \ { \ - INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = \ - reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); \ + INITSERVICE::TaskArgs *pTaskArgs = \ + static_cast<INITSERVICE::TaskArgs *>(io_pArgs); \ \ MyInitFn( pTaskArgs ); \ \ diff --git a/src/usr/isteps/istep1.C b/src/usr/isteps/istep1.C index dd97750b5..73998a55b 100644 --- a/src/usr/isteps/istep1.C +++ b/src/usr/isteps/istep1.C @@ -71,8 +71,8 @@ TRAC_INIT(&g_trac_istep1, "ISTEP1", 4096); extern "C" void IStep0sub0( void * io_pArgs ) { - INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = - reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); + INITSERVICE::TaskArgs *pTaskArgs = + static_cast<INITSERVICE::TaskArgs *>(io_pArgs); errlHndl_t l_err = NULL; uint64_t command = pTaskArgs->getCommand(); uint64_t returncode = pTaskArgs->getReturnCode(); @@ -123,8 +123,8 @@ void IStep0sub0( void * io_pArgs ) extern "C" void IStep0sub1( void * io_pArgs ) { - INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = - reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); + INITSERVICE::TaskArgs *pTaskArgs = + static_cast<INITSERVICE::TaskArgs *>(io_pArgs); uint64_t command = pTaskArgs->getCommand(); uint64_t returncode = pTaskArgs->getReturnCode(); @@ -153,8 +153,8 @@ void IStep0sub1( void * io_pArgs ) extern "C" void IStep1sub0( void * io_pArgs ) { - INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = - reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); + INITSERVICE::TaskArgs *pTaskArgs = + static_cast<INITSERVICE::TaskArgs *>(io_pArgs); uint64_t command = pTaskArgs->getCommand(); uint64_t returncode = pTaskArgs->getReturnCode(); diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index 35f8c8edc..3d1dc3889 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -22,7 +22,7 @@ // IBM_PROLOG_END #include "pnorrp.H" #include <pnor/pnor_reasoncodes.H> -#include <initservice/taskargs.H> +#include <initservice/taskargs.H> #include <sys/msg.h> #include <trace/interface.H> #include <errl/errlmanager.H> @@ -40,7 +40,7 @@ TRAC_INIT(&g_trac_pnor, "PNOR", 4096); //4K // Easy macro replace for unit testing //#define TRACUCOMP(args...) TRACFCOMP(args) -#define TRACUCOMP(args...) +#define TRACUCOMP(args...) /** * Eyecatcher strings for PNOR TOC entries @@ -57,7 +57,7 @@ const char* cv_EYECATCHER[] = { //@todo - convert there to uint64_t "OPAL", /**< PNOR::PAYLOAD : HAL/OPAL */ "PFWL", /**< PNOR::PFW_LITE_CODE : PFW-lite */ "OCC", /**< PNOR::OCC_CODE : OCC Code Image */ - "PART", /**< PNOR::KVM_PART_INFO : KVM Partition Information */ + "PART", /**< PNOR::KVM_PART_INFO : KVM Partition Information */ "XXX", /**< PNOR::CODE_UPDATE : Code Update Overhead */ "XXX", /**< NUM_SECTIONS : Used as invalid entry */ }; @@ -91,7 +91,8 @@ errlHndl_t PNOR::getSectionInfo( PNOR::SectionId i_section, void PnorRP::init( void* i_taskArgs ) { TRACUCOMP(g_trac_pnor, "PnorRP::init> " ); - INITSERVICE::TaskArgs::TaskArgs* args = (INITSERVICE::TaskArgs::TaskArgs*)i_taskArgs; + INITSERVICE::TaskArgs* args = + static_cast<INITSERVICE::TaskArgs*>(i_taskArgs); uint64_t rc = 0; if( Singleton<PnorRP>::instance().didStartupFail(rc) ) { @@ -200,7 +201,7 @@ void PnorRP::initDaemon() if( l_errhdl ) { errlCommit(l_errhdl); - iv_startupRC = l_errhdl->reasonCode(); + iv_startupRC = l_errhdl->reasonCode(); } TRACUCOMP(g_trac_pnor, "< PnorRP::initDaemon" ); @@ -219,7 +220,7 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section, PNOR::SectionId id = i_section; do - { + { // Abort this operation if we had a startup failure uint64_t rc = 0; if( didStartupFail(rc) ) @@ -343,7 +344,7 @@ errlHndl_t PnorRP::readTOC() //@todo - load flash layout (how many chips) //@todo - read TOC on each chip/bank/whatever - + TRACUCOMP(g_trac_pnor, "< PnorRP::readTOC" ); return l_errhdl; } @@ -403,7 +404,7 @@ void PnorRP::waitForMessage() case( MSG_MM_RP_WRITE ): l_errhdl = writeToDevice( dev_offset, chip_select, needs_ecc, user_addr ); if( l_errhdl ) - { + { status_rc = -EIO; /* I/O error */ } break; @@ -425,7 +426,7 @@ void PnorRP::waitForMessage() status_rc = -EINVAL; /* Invalid argument */ } } - + if( !l_errhdl && msg_is_async(message) ) { TRACFCOMP( g_trac_pnor, "PnorRP::waitForMessage> Unsupported Asynchronous Message : user_addr=%p, eff_addr=%p, msgtype=%d", user_addr, eff_addr, message->type ); @@ -456,7 +457,7 @@ void PnorRP::waitForMessage() * data[1] = rc (0 or negative errno value) */ message->data[1] = status_rc; - rc = msg_respond( iv_msgQ, message ); + rc = msg_respond( iv_msgQ, message ); if( rc ) { TRACFCOMP(g_trac_pnor, "PnorRP::waitForMessage> Error from msg_respond, giving up : rc=%d", rc ); @@ -499,7 +500,7 @@ errlHndl_t PnorRP::readFromDevice( uint64_t i_offset, } // get the data from the PNOR DD - l_errhdl = DeviceFW::deviceRead(pnor_target, + l_errhdl = DeviceFW::deviceRead(pnor_target, data_to_read, read_size, DEVICE_PNOR_ADDRESS(i_chip,i_offset) ); @@ -559,7 +560,7 @@ errlHndl_t PnorRP::writeToDevice( uint64_t i_offset, } // write the data out to the PNOR DD - errlHndl_t l_errhdl = DeviceFW::deviceWrite(pnor_target, + errlHndl_t l_errhdl = DeviceFW::deviceWrite(pnor_target, data_to_write, write_size, DEVICE_PNOR_ADDRESS(i_chip,i_offset) ); @@ -602,7 +603,7 @@ errlHndl_t PnorRP::computeDeviceAddr( void* i_vaddr, * @errortype * @moduleid PNOR::MOD_PNORRP_WAITFORMESSAGE * @reasoncode PNOR::RC_INVALID_MESSAGE - * @userdata1 Virtual Address + * @userdata1 Virtual Address * @userdata2 Base PNOR Address * @devdesc PnorRP::computeDeviceAddr> Virtual Address outside * known PNOR range @@ -684,7 +685,7 @@ PnorRP& PnorRP::getInstance() */ errlHndl_t PnorRP::computeSection( uint64_t i_vaddr, PNOR::SideSelect& o_side, - PNOR::SectionId& o_id ) + PNOR::SectionId& o_id ) { errlHndl_t errhdl = NULL; @@ -715,7 +716,7 @@ errlHndl_t PnorRP::computeSection( uint64_t i_vaddr, * @reasoncode PNOR::RC_INVALID_ADDRESS * @userdata1 Requested Virtual Address * @userdata2 <unused> - * @devdesc PnorRP::computeSection> Invalid Address + * @devdesc PnorRP::computeSection> Invalid Address */ errhdl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, PNOR::MOD_PNORRP_COMPUTESECTION, @@ -727,7 +728,7 @@ errlHndl_t PnorRP::computeSection( uint64_t i_vaddr, // loop through all sections to find a matching id for( PNOR::SectionId id = PNOR::FIRST_SECTION; - id < PNOR::NUM_SECTIONS; + id < PNOR::NUM_SECTIONS; id = (PNOR::SectionId) (id + 1) ) { if( (i_vaddr >= iv_TOC[o_side][id].virtAddr) @@ -738,6 +739,6 @@ errlHndl_t PnorRP::computeSection( uint64_t i_vaddr, } } - return errhdl; + return errhdl; } diff --git a/src/usr/targeting/targetservice.C b/src/usr/targeting/targetservice.C index f9b32e962..701ea646c 100644 --- a/src/usr/targeting/targetservice.C +++ b/src/usr/targeting/targetservice.C @@ -76,8 +76,8 @@ namespace TARGETING extern "C" void _start(void* io_pArgs) { - INITSERVICE::TaskArgs::TaskArgs *pTaskArgs = - reinterpret_cast<INITSERVICE::TaskArgs::TaskArgs *>(io_pArgs); + INITSERVICE::TaskArgs *pTaskArgs = + static_cast<INITSERVICE::TaskArgs *>(io_pArgs); #define TARG_FN "_start(...)" @@ -195,7 +195,7 @@ TargetService::iterator TargetService::begin() assert(iv_initialized); Target* l_pFirstTarget = (iv_maxTargets == 0) ? NULL : &(*iv_targets)[0]; - + return iterator(l_pFirstTarget); #undef TARG_FN @@ -205,14 +205,14 @@ TargetService::iterator TargetService::begin() // TargetService::begin (const version) //****************************************************************************** -//TargetService::const_iterator +//TargetService::const_iterator _TargetIterator<const Target*> TargetService::begin() const { #define TARG_FN "begin() const" assert(iv_initialized); - - const Target* l_pFirstTarget = + + const Target* l_pFirstTarget = (iv_maxTargets == 0) ? NULL : &(*iv_targets)[0]; return const_iterator(l_pFirstTarget); @@ -230,7 +230,7 @@ TargetService::iterator TargetService::end() assert(iv_initialized); - return iterator(NULL); + return iterator(NULL); #undef TARG_FN } @@ -258,7 +258,7 @@ void TargetService::getTopLevelTarget( Target*& o_targetHandle) const { #define TARG_FN "getTopLevelTarget(...)" - + assert(iv_initialized, TARG_LOC "TargetService not initialized"); EntityPath l_topLevelPhysicalPath(EntityPath::PATH_PHYSICAL); @@ -318,7 +318,7 @@ Target* TargetService::toTarget( break; } } - + return l_pTarget; #undef TARG_FN @@ -336,7 +336,7 @@ void TargetService::masterProcChipTargetHandle( Target* l_pTarget = NULL; assert(iv_initialized, TARG_LOC "TargetService not initialized"); - + //@TODO Need to query the actual hardware and cross check it with // PNOR to determine the master chip // target; for now, just always report sys0.n0.proc0 @@ -345,7 +345,7 @@ void TargetService::masterProcChipTargetHandle( .addLast(TYPE_PROC, 0); l_pTarget = l_masterProcChipEntityPath.operator->(); - + o_masterProcChipTargetHandle = l_pTarget; #undef TARG_FN @@ -405,8 +405,8 @@ void TargetService::getAssociated( do { assert(iv_initialized, TARG_LOC "TargetService not initialized"); - - assert( (i_pTarget != NULL) + + assert( (i_pTarget != NULL) && (i_pTarget != MASTER_PROCESSOR_CHIP_TARGET_SENTINEL), TARG_LOC "Caller tried to get association using a NULL target " "handle or the master processor chip target handle sentinel. " @@ -440,7 +440,7 @@ void TargetService::getAssociated( } else { - assert(0, TARG_LOC + assert(0, TARG_LOC "iv_associationMappings[i].associationDir " "= 0x%X not supported", iv_associationMappings[i].associationDir); @@ -615,7 +615,7 @@ void TargetService::_getInwards( EntityPath l_candidatePath; bool l_candidateFound = tryGetPath(i_attr, &(*iv_targets)[i], l_candidatePath); - if ( l_candidateFound + if ( l_candidateFound && (l_candidatePath == i_entityPath) && ( (i_pPredicate == NULL) || (*i_pPredicate)( &(*iv_targets)[i]) ) ) diff --git a/src/usr/vfs/vfsrp.C b/src/usr/vfs/vfsrp.C index 723e565a3..4abbba0ef 100644 --- a/src/usr/vfs/vfsrp.C +++ b/src/usr/vfs/vfsrp.C @@ -69,7 +69,8 @@ void VfsRp::init( void * i_taskArgs ) { errlHndl_t err = NULL; err = Singleton<VfsRp>::instance()._init(); - INITSERVICE::TaskArgs::TaskArgs* args = (INITSERVICE::TaskArgs::TaskArgs*)i_taskArgs; + INITSERVICE::TaskArgs* args = + static_cast<INITSERVICE::TaskArgs*>(i_taskArgs); if(err) { args->postErrorLog(err); |