Skip to content

Commit

Permalink
Fix #379, Align mismatched function prototype/implem. parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Feb 24, 2023
1 parent 6fceb13 commit 6cde7b4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions fsw/mcp750-vxworks/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ extern CFE_PSP_MemoryBlock_t MCP750_ReservedMemBlock;
** Provides a common interface to the processor reset.
**
** Arguments:
** reset_type : Type of reset.
** resetType : Type of reset.
**
** Return:
** (none)
*/

void CFE_PSP_Restart(uint32 reset_type)
void CFE_PSP_Restart(uint32 resetType)
{
if (reset_type == CFE_PSP_RST_TYPE_POWERON)
if (resetType == CFE_PSP_RST_TYPE_POWERON)
{
CFE_PSP_ReservedMemoryMap.BootPtr->bsp_reset_type = CFE_PSP_RST_TYPE_POWERON;
CFE_PSP_FlushCaches(1, MCP750_ReservedMemBlock.BlockPtr, MCP750_ReservedMemBlock.BlockSize);
Expand Down
8 changes: 4 additions & 4 deletions fsw/pc-linux/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ extern char CFE_PSP_CpuName[];
** Provides a common interface to the processor reset.
**
** Arguments:
** reset_type : Type of reset.
** resetType : Type of reset.
**
** Return:
** (none)
*/

void CFE_PSP_Restart(uint32 reset_type)
void CFE_PSP_Restart(uint32 resetType)
{
if (reset_type == CFE_PSP_RST_TYPE_POWERON)
if (resetType == CFE_PSP_RST_TYPE_POWERON)
{
OS_printf("CFE_PSP: Exiting cFE with POWERON Reset status.\n");

Expand All @@ -81,7 +81,7 @@ void CFE_PSP_Restart(uint32 reset_type)
/*
* Record the reset type for the next boot.
*/
CFE_PSP_ReservedMemoryMap.BootPtr->NextResetType = reset_type;
CFE_PSP_ReservedMemoryMap.BootPtr->NextResetType = resetType;
CFE_PSP_ReservedMemoryMap.BootPtr->ValidityFlag = CFE_PSP_BOOTRECORD_VALID;

/*
Expand Down
4 changes: 2 additions & 2 deletions fsw/pc-rtems/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
** Provides a common interface to the processor reset.
**
** Arguments:
** reset_type : Type of reset.
** resetType : Type of reset.
**
** Return:
** (none)
*/

void CFE_PSP_Restart(uint32 reset_type)
void CFE_PSP_Restart(uint32 resetType)
{
CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize);
OS_printf("CFE_PSP_Restart is not implemented on this platform ( yet ! )\n");
Expand Down
18 changes: 9 additions & 9 deletions fsw/shared/src/cfe_psp_memutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
/*
**
** Purpose:
** Copies 'size' byte from memory address pointed by 'src' to memory
** address pointed by ' dst' For now we are using the standard c library
** Copies 'n' byte from memory address pointed by 'src' to memory
** address pointed by ' dest' For now we are using the standard c library
** call 'memcpy' but if we find we need to make it more efficient then
** we'll implement it in assembly.
**
** Assumptions and Notes:
**
** Parameters:
** dst : pointer to an address to copy to
** dest : pointer to an address to copy to
** src : pointer address to copy from
**
** Global Inputs: None
Expand All @@ -66,17 +66,17 @@
**
** Return Values: CFE_PSP_SUCCESS
*/
int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size)
int32 CFE_PSP_MemCpy(void *dest, const void *src, uint32 n)
{
memcpy(dst, src, size);
memcpy(dest, src, n);
return CFE_PSP_SUCCESS;
}

/*
**
** Purpose:
** Copies 'size' number of byte of value 'value' to memory address pointed
** by 'dst' .For now we are using the standard c library call 'memset'
** Copies 'n' number of byte of value 'value' to memory address pointed
** by 'dest' .For now we are using the standard c library call 'memset'
** but if we find we need to make it more efficient then we'll implement
** it in assembly.
**
Expand All @@ -95,8 +95,8 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size)
/*
** CFE_PSP_MemSet
*/
int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size)
int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 n)
{
memset(dst, (int)value, (size_t)size);
memset(dest, (int)value, (size_t)n);
return CFE_PSP_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void Test_CFE_PSP_Restart(void)
{
/*
* Test Case For:
* void CFE_PSP_Restart(uint32 reset_type)
* void CFE_PSP_Restart(uint32 resetType)
*/

UT_Setup_ReservedMem_BootRec();
Expand Down
14 changes: 7 additions & 7 deletions ut-stubs/ut_psp_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ int32 CFE_PSP_GetVolatileDiskMem(cpuaddr *PtrToVolDisk, uint32 *SizeOfVolDisk)
** \par Description
** This function is used as a placeholder for the PSP function
** CFE_PSP_Restart. The variable PSPRestartRtn.value is set to the
** value passed to the function, reset_type, and the variable
** value passed to the function, resetType, and the variable
** PSPRestartRtn.count is incremented each time this function is called.
** The unit tests compare these values to expected results to verify
** proper system response.
Expand All @@ -367,10 +367,10 @@ int32 CFE_PSP_GetVolatileDiskMem(cpuaddr *PtrToVolDisk, uint32 *SizeOfVolDisk)
** This function does not return a value.
**
******************************************************************************/
void CFE_PSP_Restart(uint32 reset_type)
void CFE_PSP_Restart(uint32 resetType)
{
UT_DEFAULT_IMPL(CFE_PSP_Restart);
UT_Stub_CopyFromLocal(UT_KEY(CFE_PSP_Restart), (uint8 *)&reset_type, sizeof(reset_type));
UT_Stub_CopyFromLocal(UT_KEY(CFE_PSP_Restart), (uint8 *)&resetType, sizeof(resetType));
}

/*****************************************************************************/
Expand Down Expand Up @@ -690,7 +690,7 @@ int32 CFE_PSP_MemValidateRange(cpuaddr Address, size_t Size, uint32 MemoryType)
** Returns OS_SUCCESS.
**
******************************************************************************/
int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size)
int32 CFE_PSP_MemCpy(void *dest, const void *src, uint32 n)
{
int32 status;

Expand All @@ -699,7 +699,7 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size)
if (status >= 0)
{
/* this is not actually a stub; it actually has to _do_ the intended function */
memcpy(dst, src, size);
memcpy(dest, src, n);
}

return status;
Expand All @@ -720,7 +720,7 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size)
** Returns OS_SUCCESS.
**
******************************************************************************/
int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size)
int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 n)
{
int32 status;

Expand All @@ -729,7 +729,7 @@ int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size)
if (status >= 0)
{
/* this is not actually a stub; it actually has to _do_ the intended function */
memset(dst, (int)value, (size_t)size);
memset(dest, (int)value, (size_t)n);
}

return status;
Expand Down

0 comments on commit 6cde7b4

Please sign in to comment.