2010-07-08 23:12:21

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 00/16] staging:ti dspbridge: Remove CamelCase, reagroup variables.

The intention of this serie of patches is to rename the remaining variables
with camel case. Words will be renamed avoiding CamelCase and Hungarian
notation. Also the variables in the prototypes will be renamed to make them
match with the ones in the function definitions.

The variables to be renamed are:

================= BEGIN =================
aAddr to addrs
aArgs to args
aSize to len
baseAddress to base_address
bDynamicLoad to dynamic_load
bForce to force
cCharSize to char_size
cContentSize to content_size
cCount to count
cDspCharSize to dsp_char_size
cIndex to index
ClkId to clock_id
cOrigin to origin
dataBasePhys to data_base_phys
dcdObjUnion to dcd_obj
deviceContext to device_ctxt
dspAddr to dsp_address
dspAdr to dsp_adr
dspBaseVirt to dsp_base_virt
dwDeviceContext to device_context
dwDSPAddrOffset to dsp_addr_offset
dwDSPAddr to dsp_addr
dwErrInfo to error_info
dwGPPBaseBA to gpp_base_ba
dwMask to mask
dwTimeout to timeout
dwTimeOut to timeout
dwValue to value
entryNum to entry_num
execFile to exec_file
fFlush to flush_data
FlushMemType to flush_mem_type
FlushType to flush_type
hDevContext to dev_ctxt
hDevExtension to dev_extension
hdevObject to device_obj
hDispObject to disp_obj
hDrVObject to driver_obj
hDRVObject to driver_obj
hMGRHandle to mgr_handle
hNldrObject to nldr
hNode1 to node1
hNode2 to node2
hNodeRes to node_resource
hPCtxt to process_ctxt
hProc to proc
hStreamHandle to stream_handle
hStrm to stream_obj
iMode to io_mode
irqMask to irq_mask
lOffset to offset
memPtr to mem_ptr
moduleId to module_id
msgCallback to msg_callback
msgList to msg_list
nArgc to num_argc
nEntryStart to entry_start
nMemSpace to mem_space
nStatus to node_status
nStrms to strms
numLibs to num_libs
numLockedEntries to num_locked_entries
pageSize to page_sz
pArb to arb
pbAlreadyAttached to already_attached
pBaseAddr to base_addr
pbHostBuf to host_buff
pBufVa to buf_va
pChnlInfo to channel_info
pConfig to config_param
pContent to content
pContext to context
pdcdProps to dcd_prop
pDepLibUuids to dep_lib_uuids
pDevNodeString to dev_node_strg
pDispAttrs to disp_attrs
pDsp to dsp
pdwAutoStart to auto_start
pdwChnl to chnl
pdwSize to buff_size
pdwState to board_state
pdwValue to value
pdwVersion to version
pElemExisting to elem_existing
pEntry to entry
pErrInfo to err_inf
pExists to exists
pfEnablePerf to enable_perf
pGenObj to gen_obj
phChnlMgr to channel_mgr
phChnl to chnl
phCodMgr to cod_mgr
phDCDHandle to dcd_handle
phDcdMgr to dcd_mgr
phDehMgr to deh_manager
phDevContext to device_ctx
phDevNode to dev_nde
phDevObject to device_obj
phDispObject to dispatch_obj
phDmmMgr to dmm_manager
phDrvObject to drv_obj
phDRVObject to drv_obj
phIOMgr to io_man
phLoader to loader
phManager to manager
phMgrObject to mgr_obj
phMgr to mgr
phMsgMgr to msg_man
phMsgQueue to msgq
phNldrNode to nldr_nodeobj
phNldrObj to nldr_ovlyobj
phNldr to nldr
phNodeMgr to node_man
pHostBuf to host_buf
pHostConfig to host_config
phRmmMgr to rmm_mgr
phStrmMgr to strm_man
phStrm to strm_objct
phXlator to xlator
physicalAddr to physical_addr
pInfo to channel_info
pIOC to chan_ioc
pLib to lib_obj
pList to lst
pMemBuf to mem_buf
pMemStatBuf to mem_stat_buf
pMgrAttrs to mgr_attrts
pMgrInfo to mgr_info
pNodeEnv to node_env
pNodeId to node_uuid
pNodeInfo to node_info
pNumLibs to num_libs
pNumPersLibs to num_pers_libs
pObjDef to obj_def
pObjUuid to obj_uuid
poolPhysBase to pool_phys_base
poolSize to pool_size
pPctxt to pctxt
ppDevContext to dev_cntxt
ppDrvInterface to drv_intf
pPersistentDepLibs to prstnt_dep_libs
pPhyAddr to phy_addr
pPhysAddr to phys_addr
pPhysicalAddress to physical_address
ppIntfFxns to if_fxns
pProcLoadStat to proc_load_stat
pProcStat to proc_lstat
ppSym to sym_val
pRefData to ref_data
pRef to ref
preservedBit to preserved_bit
pResult to result
procID to proc_id
pSectInfo to sect_inf
pSrc to src
pstrContent to str_content
pstrDummyFile to str_dummy_file
pstrExecFile to str_exec_file
pstrFxn to str_fxn
pstrLibName to str_lib_name
pstrSect to str_sect
pstrSym to str_sym
pstrZLFileName to str_zl_file_name
pstrZLFile to str_zl_file
pszCoffPath to sz_coff_path
pszMode to sz_mode
pszName to sz_name
pszSectName to sz_sect_name
pszUuid to sz_uuid
pszZlDllName to sz_zl_dll_name
puAddr to addr
pulAddr to addr
pulBufSize to buff_size
pulBytes to nbytes
puLen to len
pulEntry to entry_pt
pulFxnAddr to fxn_addr
pulId to chan_id
pulSegId to sgmt_id
pVaBuf to va_buf
pVirtualAddress to virtual_address
pwMbVal to mbx_val
pWord to word
pXlatorAttrs to xlator_attrs
registerFxn to register_fxn
rootPersistent to root_prstnt
sectionData to section_data
sectionInfo to section_info
sectionName to section_name
sectName to sec_name
segmentId to segmnt_id
SetPageDirty to set_page_dirty
sizeInBytes to size_in_bytes
sleepCode to sleep_code
Status to status
symName to sym_name
szVar to sz_var
Trapped_Args to trapped_args
TTBPhysAddr to ttb_phys_addr
uChirps to chirps
uChnlId to ch_id
uChnlID to ch_id
uContentSize to cont_size
uDDMAChnlId to ddma_chnl_id
uEvents to events
ulAlign to align_mask
ulBrdState to brd_state
ulChnl to chnl
ulDspAddr to dsp_add
ulDspDestAddr to dsp_dest_addr
ulDspLoadAddr to dsp_load_addr
ulDspRunAddr to dsp_run_addr
ulDspSrcAddr to dsp_src_addr
ulEventMask to evnt_mask
ulMapAttrs to map_attr
ulMemType to mem_type
ulRMSFxn to rms_fxn
ulStatus to ret
ulVirtAddr to virt_addr
uNumDesc to num_desc
uNumToDSP to num_to_dsp
uPaSize to pa_size
uPhase to phase
uSegId to segm_id
uStream1 to stream1
uStream2 to stream2
uZId to zid
validBit to valid_bit
victimEntryNum to victim_entry_num
virtualAddr to virtual_addr
xType to xtype
actualValue to actual_value
EASIL1_MMUMMU_IRQSTATUSReadRegister32 to easil1_mmummu_irqstatus_read_register32
EASIL1_MMUMMU_LOCKBaseValueWrite32 to easil1_mmummu_lock_base_value_write32
easiNum to easi_num
expectedValue to expected_value
invalidValue to invalid_value
L1_base to l1_base
L2_base to l2_base
lower16Bits to lower16_bits
lower8Bits to lower8_bits
lowerMiddle8Bits to lower_middle8_bits
lowerUpper8Bits to lower_upper8_bits
maxValidValue to max_valid_value
minValidValue to min_valid_value
newValue to new_value
returnCodeIfMismatch to return_code_if_mismatch
spyCodeIfMisMatch to spy_code_if_mis_match
upper16Bits to upper16_bits
upper8Bits to upper8_bits
================= END =================

Rene Sapiens (16):
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: Rename words with camel case.
dspbridge: make the variables in the prototype of any function match
with its definition.

drivers/staging/tidspbridge/core/_tiomap_pwr.h | 2 +-
drivers/staging/tidspbridge/core/chnl_sm.c | 160 +++++-----
drivers/staging/tidspbridge/core/io_sm.c | 119 ++++----
drivers/staging/tidspbridge/core/mmu_fault.c | 8 +-
drivers/staging/tidspbridge/core/mmu_fault.h | 4 +-
drivers/staging/tidspbridge/core/msg_sm.c | 46 ++--
drivers/staging/tidspbridge/core/tiomap3430.c | 256 ++++++++--------
drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 4 +-
drivers/staging/tidspbridge/core/tiomap_io.c | 58 ++--
drivers/staging/tidspbridge/core/tiomap_io.h | 24 +-
drivers/staging/tidspbridge/core/ue_deh.c | 30 +-
drivers/staging/tidspbridge/dynload/getsection.c | 24 +-
drivers/staging/tidspbridge/dynload/reloc.c | 4 +-
drivers/staging/tidspbridge/gen/uuidutil.c | 10 +-
drivers/staging/tidspbridge/hw/EasiGlobal.h | 2 +-
drivers/staging/tidspbridge/hw/GlobalTypes.h | 72 +++--
drivers/staging/tidspbridge/hw/MMURegAcM.h | 176 +++++-----
drivers/staging/tidspbridge/hw/hw_mmu.c | 204 ++++++------
drivers/staging/tidspbridge/hw/hw_mmu.h | 70 ++--
.../staging/tidspbridge/include/dspbridge/cfg.h | 64 ++--
.../staging/tidspbridge/include/dspbridge/chnl.h | 20 +-
.../staging/tidspbridge/include/dspbridge/cmm.h | 64 ++--
.../staging/tidspbridge/include/dspbridge/cod.h | 100 +++---
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 78 +++---
.../tidspbridge/include/dspbridge/dbdcddef.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbdefs.h | 4 +-
.../tidspbridge/include/dspbridge/dbldefs.h | 9 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 25 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 48 ++--
.../staging/tidspbridge/include/dspbridge/dev.h | 174 +++++-----
.../staging/tidspbridge/include/dspbridge/disp.h | 62 ++--
.../staging/tidspbridge/include/dspbridge/dmm.h | 6 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 76 +++---
.../tidspbridge/include/dspbridge/dspapi-ioctl.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dspapi.h | 116 ++++----
.../tidspbridge/include/dspbridge/dspchnl.h | 22 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 338 ++++++++++----------
.../staging/tidspbridge/include/dspbridge/dspdeh.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dspdrv.h | 6 +-
.../staging/tidspbridge/include/dspbridge/dspio.h | 6 +-
.../staging/tidspbridge/include/dspbridge/dspmsg.h | 8 +-
.../tidspbridge/include/dspbridge/getsection.h | 16 +-
drivers/staging/tidspbridge/include/dspbridge/io.h | 18 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 88 +++---
.../staging/tidspbridge/include/dspbridge/list.h | 68 ++--
.../staging/tidspbridge/include/dspbridge/mgr.h | 20 +-
.../staging/tidspbridge/include/dspbridge/msg.h | 12 +-
.../tidspbridge/include/dspbridge/msgdefs.h | 2 +-
.../staging/tidspbridge/include/dspbridge/nldr.h | 10 +-
.../tidspbridge/include/dspbridge/nldrdefs.h | 48 ++--
.../staging/tidspbridge/include/dspbridge/node.h | 66 ++--
.../tidspbridge/include/dspbridge/nodepriv.h | 14 +-
.../staging/tidspbridge/include/dspbridge/proc.h | 40 ++--
.../staging/tidspbridge/include/dspbridge/pwr.h | 6 +-
.../include/dspbridge/resourcecleanup.h | 43 ++--
.../staging/tidspbridge/include/dspbridge/rmm.h | 18 +-
.../staging/tidspbridge/include/dspbridge/strm.h | 108 +++---
.../tidspbridge/include/dspbridge/uuidutil.h | 16 +-
drivers/staging/tidspbridge/pmgr/chnl.c | 22 +-
drivers/staging/tidspbridge/pmgr/cmm.c | 94 +++---
drivers/staging/tidspbridge/pmgr/cod.c | 185 ++++++------
drivers/staging/tidspbridge/pmgr/dbll.c | 93 +++---
drivers/staging/tidspbridge/pmgr/dev.c | 156 +++++-----
drivers/staging/tidspbridge/pmgr/dmm.c | 38 ++--
drivers/staging/tidspbridge/pmgr/dspapi.c | 116 ++++----
drivers/staging/tidspbridge/pmgr/io.c | 18 +-
drivers/staging/tidspbridge/pmgr/msg.c | 14 +-
drivers/staging/tidspbridge/rmgr/dbdcd.c | 256 ++++++++--------
drivers/staging/tidspbridge/rmgr/disp.c | 52 ++--
drivers/staging/tidspbridge/rmgr/drv.c | 164 +++++-----
drivers/staging/tidspbridge/rmgr/drv_interface.c | 10 +-
drivers/staging/tidspbridge/rmgr/drv_interface.h | 7 +-
drivers/staging/tidspbridge/rmgr/dspdrv.c | 6 +-
drivers/staging/tidspbridge/rmgr/mgr.c | 22 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 187 ++++++------
drivers/staging/tidspbridge/rmgr/node.c | 318 +++++++++---------
drivers/staging/tidspbridge/rmgr/proc.c | 66 ++--
drivers/staging/tidspbridge/rmgr/pwr.c | 6 +-
drivers/staging/tidspbridge/rmgr/rmm.c | 39 ++--
drivers/staging/tidspbridge/rmgr/strm.c | 200 ++++++------
drivers/staging/tidspbridge/services/cfg.c | 54 ++--
81 files changed, 2628 insertions(+), 2595 deletions(-)


2010-07-08 23:12:11

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 01/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
aAddr to addrs
aArgs to args
aSize to len
baseAddress to base_address
bDynamicLoad to dynamic_load
bForce to force
cCharSize to char_size
cContentSize to content_size
cCount to count
cDspCharSize to dsp_char_size
cIndex to index
ClkId to clock_id
cOrigin to origin
dataBasePhys to data_base_phys
dcdObjUnion to dcd_obj
deviceContext to device_ctxt
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/_tiomap_pwr.h | 2 +-
drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 4 +-
drivers/staging/tidspbridge/core/tiomap_io.c | 8 +-
drivers/staging/tidspbridge/core/tiomap_io.h | 2 +-
drivers/staging/tidspbridge/hw/MMURegAcM.h | 108 ++++++++++----------
drivers/staging/tidspbridge/hw/hw_mmu.c | 108 ++++++++++----------
drivers/staging/tidspbridge/hw/hw_mmu.h | 28 +++---
.../staging/tidspbridge/include/dspbridge/cmm.h | 8 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 8 +-
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 4 +-
.../tidspbridge/include/dspbridge/dbdcddef.h | 2 +-
drivers/staging/tidspbridge/pmgr/cmm.c | 6 +-
drivers/staging/tidspbridge/pmgr/cod.c | 28 +++---
drivers/staging/tidspbridge/pmgr/dmm.c | 22 ++--
drivers/staging/tidspbridge/rmgr/dbdcd.c | 26 +++---
drivers/staging/tidspbridge/rmgr/dspdrv.c | 6 +-
16 files changed, 185 insertions(+), 185 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/_tiomap_pwr.h b/drivers/staging/tidspbridge/core/_tiomap_pwr.h
index b9a3453..47c4dd2 100644
--- a/drivers/staging/tidspbridge/core/_tiomap_pwr.h
+++ b/drivers/staging/tidspbridge/core/_tiomap_pwr.h
@@ -80,6 +80,6 @@ int handle_constraints_set(struct bridge_dev_context *dev_context,
* This function sets the group selction bits for while
* enabling/disabling.
*/
-void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable);
+void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable);

#endif /* _TIOMAP_PWR_ */
diff --git a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
index 00ebc0b..aad78eb 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
@@ -407,7 +407,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context,
return status;
}

-void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable)
+void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable)
{
struct cfg_hostres *resources;
int status = 0;
@@ -428,7 +428,7 @@ void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable)
if (!resources)
return;

- switch (ClkId) {
+ switch (clock_id) {
case BPWR_GP_TIMER5:
iva2_grpsel = (u32) *((reg_uword32 *)
((u32) (resources->dw_per_pm_base) +
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 3b2ea70..db916a5 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -227,7 +227,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext,
int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf, u32 dwDSPAddr,
u32 ul_num_bytes, u32 ulMemType,
- bool bDynamicLoad)
+ bool dynamic_load)
{
u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
u32 dw_offset = 0;
@@ -259,7 +259,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
}

/* If dynamic, force remap/unmap */
- if ((bDynamicLoad || trace_load) && dw_base_addr) {
+ if ((dynamic_load || trace_load) && dw_base_addr) {
dw_base_addr = 0;
MEM_UNMAP_LINEAR_ADDRESS((void *)
dev_context->dw_dsp_ext_base_addr);
@@ -271,7 +271,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
ret = dev_get_symbol(dev_context->hdev_obj,
SHMBASENAME, &ul_shm_base_virt);
DBC_ASSERT(ul_shm_base_virt != 0);
- if (bDynamicLoad) {
+ if (dynamic_load) {
if (DSP_SUCCEEDED(ret)) {
if (symbols_reloaded)
ret =
@@ -377,7 +377,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
*((u32 *) pbHostBuf) = dw_base_addr + dw_offset;
}
/* Unmap here to force remap for other Ext loads */
- if ((bDynamicLoad || trace_load) && dev_context->dw_dsp_ext_base_addr) {
+ if ((dynamic_load || trace_load) && dev_context->dw_dsp_ext_base_addr) {
MEM_UNMAP_LINEAR_ADDRESS((void *)
dev_context->dw_dsp_ext_base_addr);
dev_context->dw_dsp_ext_base_addr = 0x0;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index a176e5c..3bfe7b7 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -67,7 +67,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf, u32 dwDSPAddr,
u32 ul_num_bytes, u32 ulMemType,
- bool bDynamicLoad);
+ bool dynamic_load);

/*
* ======== write_ext32_bit_dsp_data ========
diff --git a/drivers/staging/tidspbridge/hw/MMURegAcM.h b/drivers/staging/tidspbridge/hw/MMURegAcM.h
index 8c0c549..c341060 100644
--- a/drivers/staging/tidspbridge/hw/MMURegAcM.h
+++ b/drivers/staging/tidspbridge/hw/MMURegAcM.h
@@ -25,158 +25,158 @@

#if defined(USE_LEVEL_1_MACROS)

-#define MMUMMU_SYSCONFIG_READ_REGISTER32(baseAddress)\
+#define MMUMMU_SYSCONFIG_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_SYSCONFIG_READ_REGISTER32),\
- __raw_readl((baseAddress)+MMU_MMU_SYSCONFIG_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_SYSCONFIG_OFFSET))

-#define MMUMMU_SYSCONFIG_IDLE_MODE_WRITE32(baseAddress, value)\
+#define MMUMMU_SYSCONFIG_IDLE_MODE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_SYSCONFIG_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_SYSCONFIG_IDLE_MODE_WRITE32);\
data &= ~(MMU_MMU_SYSCONFIG_IDLE_MODE_MASK);\
newValue <<= MMU_MMU_SYSCONFIG_IDLE_MODE_OFFSET;\
newValue &= MMU_MMU_SYSCONFIG_IDLE_MODE_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

-#define MMUMMU_SYSCONFIG_AUTO_IDLE_WRITE32(baseAddress, value)\
+#define MMUMMU_SYSCONFIG_AUTO_IDLE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_SYSCONFIG_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_SYSCONFIG_AUTO_IDLE_WRITE32);\
data &= ~(MMU_MMU_SYSCONFIG_AUTO_IDLE_MASK);\
newValue <<= MMU_MMU_SYSCONFIG_AUTO_IDLE_OFFSET;\
newValue &= MMU_MMU_SYSCONFIG_AUTO_IDLE_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

-#define MMUMMU_IRQSTATUS_READ_REGISTER32(baseAddress)\
+#define MMUMMU_IRQSTATUS_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQSTATUSReadRegister32),\
- __raw_readl((baseAddress)+MMU_MMU_IRQSTATUS_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_IRQSTATUS_OFFSET))

-#define MMUMMU_IRQSTATUS_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_IRQSTATUS_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_IRQSTATUS_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQSTATUS_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_IRQENABLE_READ_REGISTER32(baseAddress)\
+#define MMUMMU_IRQENABLE_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQENABLE_READ_REGISTER32),\
- __raw_readl((baseAddress)+MMU_MMU_IRQENABLE_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_IRQENABLE_OFFSET))

-#define MMUMMU_IRQENABLE_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_IRQENABLE_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQENABLE_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_WALKING_STTWL_RUNNING_READ32(baseAddress)\
+#define MMUMMU_WALKING_STTWL_RUNNING_READ32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_WALKING_STTWL_RUNNING_READ32),\
- (((__raw_readl(((baseAddress)+(MMU_MMU_WALKING_ST_OFFSET))))\
+ (((__raw_readl(((base_address)+(MMU_MMU_WALKING_ST_OFFSET))))\
& MMU_MMU_WALKING_ST_TWL_RUNNING_MASK) >>\
MMU_MMU_WALKING_ST_TWL_RUNNING_OFFSET))

-#define MMUMMU_CNTLTWL_ENABLE_READ32(baseAddress)\
+#define MMUMMU_CNTLTWL_ENABLE_READ32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CNTLTWL_ENABLE_READ32),\
- (((__raw_readl(((baseAddress)+(MMU_MMU_CNTL_OFFSET)))) &\
+ (((__raw_readl(((base_address)+(MMU_MMU_CNTL_OFFSET)))) &\
MMU_MMU_CNTL_TWL_ENABLE_MASK) >>\
MMU_MMU_CNTL_TWL_ENABLE_OFFSET))

-#define MMUMMU_CNTLTWL_ENABLE_WRITE32(baseAddress, value)\
+#define MMUMMU_CNTLTWL_ENABLE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_CNTL_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CNTLTWL_ENABLE_WRITE32);\
data &= ~(MMU_MMU_CNTL_TWL_ENABLE_MASK);\
newValue <<= MMU_MMU_CNTL_TWL_ENABLE_OFFSET;\
newValue &= MMU_MMU_CNTL_TWL_ENABLE_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

-#define MMUMMU_CNTLMMU_ENABLE_WRITE32(baseAddress, value)\
+#define MMUMMU_CNTLMMU_ENABLE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_CNTL_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CNTLMMU_ENABLE_WRITE32);\
data &= ~(MMU_MMU_CNTL_MMU_ENABLE_MASK);\
newValue <<= MMU_MMU_CNTL_MMU_ENABLE_OFFSET;\
newValue &= MMU_MMU_CNTL_MMU_ENABLE_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

-#define MMUMMU_FAULT_AD_READ_REGISTER32(baseAddress)\
+#define MMUMMU_FAULT_AD_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_FAULT_AD_READ_REGISTER32),\
- __raw_readl((baseAddress)+MMU_MMU_FAULT_AD_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_FAULT_AD_OFFSET))

-#define MMUMMU_TTB_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_TTB_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_TTB_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_TTB_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_LOCK_READ_REGISTER32(baseAddress)\
+#define MMUMMU_LOCK_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_READ_REGISTER32),\
- __raw_readl((baseAddress)+MMU_MMU_LOCK_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_LOCK_OFFSET))

-#define MMUMMU_LOCK_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_LOCK_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_LOCK_BASE_VALUE_READ32(baseAddress)\
+#define MMUMMU_LOCK_BASE_VALUE_READ32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_BASE_VALUE_READ32),\
- (((__raw_readl(((baseAddress)+(MMU_MMU_LOCK_OFFSET)))) &\
+ (((__raw_readl(((base_address)+(MMU_MMU_LOCK_OFFSET)))) &\
MMU_MMU_LOCK_BASE_VALUE_MASK) >>\
MMU_MMU_LOCK_BASE_VALUE_OFFSET))

-#define MMUMMU_LOCK_BASE_VALUE_WRITE32(baseAddress, value)\
+#define MMUMMU_LOCK_BASE_VALUE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCKBaseValueWrite32);\
data &= ~(MMU_MMU_LOCK_BASE_VALUE_MASK);\
newValue <<= MMU_MMU_LOCK_BASE_VALUE_OFFSET;\
newValue &= MMU_MMU_LOCK_BASE_VALUE_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

-#define MMUMMU_LOCK_CURRENT_VICTIM_READ32(baseAddress)\
+#define MMUMMU_LOCK_CURRENT_VICTIM_READ32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_CURRENT_VICTIM_READ32),\
- (((__raw_readl(((baseAddress)+(MMU_MMU_LOCK_OFFSET)))) &\
+ (((__raw_readl(((base_address)+(MMU_MMU_LOCK_OFFSET)))) &\
MMU_MMU_LOCK_CURRENT_VICTIM_MASK) >>\
MMU_MMU_LOCK_CURRENT_VICTIM_OFFSET))

-#define MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(baseAddress, value)\
+#define MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
- register u32 data = __raw_readl((baseAddress)+offset);\
+ register u32 data = __raw_readl((base_address)+offset);\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_CURRENT_VICTIM_WRITE32);\
data &= ~(MMU_MMU_LOCK_CURRENT_VICTIM_MASK);\
newValue <<= MMU_MMU_LOCK_CURRENT_VICTIM_OFFSET;\
newValue &= MMU_MMU_LOCK_CURRENT_VICTIM_MASK;\
newValue |= data;\
- __raw_writel(newValue, baseAddress+offset);\
+ __raw_writel(newValue, base_address+offset);\
}

#define MMUMMU_LOCK_CURRENT_VICTIM_SET32(var, value)\
@@ -185,40 +185,40 @@
(((value) << MMU_MMU_LOCK_CURRENT_VICTIM_OFFSET) &\
MMU_MMU_LOCK_CURRENT_VICTIM_MASK)))

-#define MMUMMU_LD_TLB_READ_REGISTER32(baseAddress)\
+#define MMUMMU_LD_TLB_READ_REGISTER32(base_address)\
(_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LD_TLB_READ_REGISTER32),\
- __raw_readl((baseAddress)+MMU_MMU_LD_TLB_OFFSET))
+ __raw_readl((base_address)+MMU_MMU_LD_TLB_OFFSET))

-#define MMUMMU_LD_TLB_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_LD_TLB_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_LD_TLB_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LD_TLB_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_CAM_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_CAM_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_CAM_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CAM_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_RAM_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_RAM_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_RAM_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_RAM_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

-#define MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32(baseAddress, value)\
+#define MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_FLUSH_ENTRY_OFFSET;\
register u32 newValue = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32);\
- __raw_writel(newValue, (baseAddress)+offset);\
+ __raw_writel(newValue, (base_address)+offset);\
}

#endif /* USE_LEVEL_1_MACROS */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index 965b659..6d800a8 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -51,7 +51,7 @@ enum hw_mmu_page_size_t {
*
* INPUTS:
*
- * Identifier : baseAddress
+ * Identifier : base_address
* Type : const u32
* Description : Base Address of instance of MMU module
*
@@ -69,14 +69,14 @@ enum hw_mmu_page_size_t {
* METHOD: : Check the Input parameter and Flush a
* single entry in the TLB.
*/
-static hw_status mmu_flush_entry(const void __iomem *baseAddress);
+static hw_status mmu_flush_entry(const void __iomem *base_address);

/*
* FUNCTION : mmu_set_cam_entry
*
* INPUTS:
*
- * Identifier : baseAddress
+ * Identifier : base_address
* TypE : const u32
* Description : Base Address of instance of MMU module
*
@@ -111,7 +111,7 @@ static hw_status mmu_flush_entry(const void __iomem *baseAddress);
*
* METHOD: : Check the Input parameters and set the CAM entry.
*/
-static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
+static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 pageSize,
const u32 preservedBit,
const u32 validBit,
@@ -122,7 +122,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
*
* INPUTS:
*
- * Identifier : baseAddress
+ * Identifier : base_address
* Type : const u32
* Description : Base Address of instance of MMU module
*
@@ -156,7 +156,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
*
* METHOD: : Check the Input parameters and set the RAM entry.
*/
-static hw_status mmu_set_ram_entry(const void __iomem *baseAddress,
+static hw_status mmu_set_ram_entry(const void __iomem *base_address,
const u32 physicalAddr,
enum hw_endianism_t endianism,
enum hw_element_size_t element_size,
@@ -164,135 +164,135 @@ static hw_status mmu_set_ram_entry(const void __iomem *baseAddress,

/* HW FUNCTIONS */

-hw_status hw_mmu_enable(const void __iomem *baseAddress)
+hw_status hw_mmu_enable(const void __iomem *base_address)
{
hw_status status = RET_OK;

- MMUMMU_CNTLMMU_ENABLE_WRITE32(baseAddress, HW_SET);
+ MMUMMU_CNTLMMU_ENABLE_WRITE32(base_address, HW_SET);

return status;
}

-hw_status hw_mmu_disable(const void __iomem *baseAddress)
+hw_status hw_mmu_disable(const void __iomem *base_address)
{
hw_status status = RET_OK;

- MMUMMU_CNTLMMU_ENABLE_WRITE32(baseAddress, HW_CLEAR);
+ MMUMMU_CNTLMMU_ENABLE_WRITE32(base_address, HW_CLEAR);

return status;
}

-hw_status hw_mmu_num_locked_set(const void __iomem *baseAddress,
+hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
u32 numLockedEntries)
{
hw_status status = RET_OK;

- MMUMMU_LOCK_BASE_VALUE_WRITE32(baseAddress, numLockedEntries);
+ MMUMMU_LOCK_BASE_VALUE_WRITE32(base_address, numLockedEntries);

return status;
}

-hw_status hw_mmu_victim_num_set(const void __iomem *baseAddress,
+hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
u32 victimEntryNum)
{
hw_status status = RET_OK;

- MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(baseAddress, victimEntryNum);
+ MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, victimEntryNum);

return status;
}

-hw_status hw_mmu_event_ack(const void __iomem *baseAddress, u32 irqMask)
+hw_status hw_mmu_event_ack(const void __iomem *base_address, u32 irqMask)
{
hw_status status = RET_OK;

- MMUMMU_IRQSTATUS_WRITE_REGISTER32(baseAddress, irqMask);
+ MMUMMU_IRQSTATUS_WRITE_REGISTER32(base_address, irqMask);

return status;
}

-hw_status hw_mmu_event_disable(const void __iomem *baseAddress, u32 irqMask)
+hw_status hw_mmu_event_disable(const void __iomem *base_address, u32 irqMask)
{
hw_status status = RET_OK;
u32 irq_reg;

- irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(baseAddress);
+ irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(base_address);

- MMUMMU_IRQENABLE_WRITE_REGISTER32(baseAddress, irq_reg & ~irqMask);
+ MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg & ~irqMask);

return status;
}

-hw_status hw_mmu_event_enable(const void __iomem *baseAddress, u32 irqMask)
+hw_status hw_mmu_event_enable(const void __iomem *base_address, u32 irqMask)
{
hw_status status = RET_OK;
u32 irq_reg;

- irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(baseAddress);
+ irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(base_address);

- MMUMMU_IRQENABLE_WRITE_REGISTER32(baseAddress, irq_reg | irqMask);
+ MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg | irqMask);

return status;
}

-hw_status hw_mmu_event_status(const void __iomem *baseAddress, u32 *irqMask)
+hw_status hw_mmu_event_status(const void __iomem *base_address, u32 *irqMask)
{
hw_status status = RET_OK;

- *irqMask = MMUMMU_IRQSTATUS_READ_REGISTER32(baseAddress);
+ *irqMask = MMUMMU_IRQSTATUS_READ_REGISTER32(base_address);

return status;
}

-hw_status hw_mmu_fault_addr_read(const void __iomem *baseAddress, u32 *addr)
+hw_status hw_mmu_fault_addr_read(const void __iomem *base_address, u32 *addr)
{
hw_status status = RET_OK;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

/* read values from register */
- *addr = MMUMMU_FAULT_AD_READ_REGISTER32(baseAddress);
+ *addr = MMUMMU_FAULT_AD_READ_REGISTER32(base_address);

return status;
}

-hw_status hw_mmu_ttb_set(const void __iomem *baseAddress, u32 TTBPhysAddr)
+hw_status hw_mmu_ttb_set(const void __iomem *base_address, u32 TTBPhysAddr)
{
hw_status status = RET_OK;
u32 load_ttb;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

load_ttb = TTBPhysAddr & ~0x7FUL;
/* write values to register */
- MMUMMU_TTB_WRITE_REGISTER32(baseAddress, load_ttb);
+ MMUMMU_TTB_WRITE_REGISTER32(base_address, load_ttb);

return status;
}

-hw_status hw_mmu_twl_enable(const void __iomem *baseAddress)
+hw_status hw_mmu_twl_enable(const void __iomem *base_address)
{
hw_status status = RET_OK;

- MMUMMU_CNTLTWL_ENABLE_WRITE32(baseAddress, HW_SET);
+ MMUMMU_CNTLTWL_ENABLE_WRITE32(base_address, HW_SET);

return status;
}

-hw_status hw_mmu_twl_disable(const void __iomem *baseAddress)
+hw_status hw_mmu_twl_disable(const void __iomem *base_address)
{
hw_status status = RET_OK;

- MMUMMU_CNTLTWL_ENABLE_WRITE32(baseAddress, HW_CLEAR);
+ MMUMMU_CNTLTWL_ENABLE_WRITE32(base_address, HW_CLEAR);

return status;
}

-hw_status hw_mmu_tlb_flush(const void __iomem *baseAddress, u32 virtualAddr,
+hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
u32 pageSize)
{
hw_status status = RET_OK;
@@ -323,14 +323,14 @@ hw_status hw_mmu_tlb_flush(const void __iomem *baseAddress, u32 virtualAddr,
/* Generate the 20-bit tag from virtual address */
virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);

- mmu_set_cam_entry(baseAddress, pg_size_bits, 0, 0, virtual_addr_tag);
+ mmu_set_cam_entry(base_address, pg_size_bits, 0, 0, virtual_addr_tag);

- mmu_flush_entry(baseAddress);
+ mmu_flush_entry(base_address);

return status;
}

-hw_status hw_mmu_tlb_add(const void __iomem *baseAddress,
+hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
u32 pageSize,
@@ -344,7 +344,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *baseAddress,
enum hw_mmu_page_size_t mmu_pg_size;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
CHECK_INPUT_RANGE_MIN0(pageSize, MMU_PAGE_MAX, RET_PARAM_OUT_OF_RANGE,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
@@ -373,29 +373,29 @@ hw_status hw_mmu_tlb_add(const void __iomem *baseAddress,
return RET_FAIL;
}

- lock_reg = MMUMMU_LOCK_READ_REGISTER32(baseAddress);
+ lock_reg = MMUMMU_LOCK_READ_REGISTER32(base_address);

/* Generate the 20-bit tag from virtual address */
virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);

/* Write the fields in the CAM Entry Register */
- mmu_set_cam_entry(baseAddress, mmu_pg_size, preservedBit, validBit,
+ mmu_set_cam_entry(base_address, mmu_pg_size, preservedBit, validBit,
virtual_addr_tag);

/* Write the different fields of the RAM Entry Register */
/* endianism of the page,Element Size of the page (8, 16, 32, 64 bit) */
- mmu_set_ram_entry(baseAddress, physicalAddr, map_attrs->endianism,
+ mmu_set_ram_entry(base_address, physicalAddr, map_attrs->endianism,
map_attrs->element_size, map_attrs->mixed_size);

/* Update the MMU Lock Register */
/* currentVictim between lockedBaseValue and (MMU_Entries_Number - 1) */
- MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(baseAddress, entryNum);
+ MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, entryNum);

/* Enable loading of an entry in TLB by writing 1
into LD_TLB_REG register */
- MMUMMU_LD_TLB_WRITE_REGISTER32(baseAddress, MMU_LOAD_TLB);
+ MMUMMU_LD_TLB_WRITE_REGISTER32(base_address, MMU_LOAD_TLB);

- MMUMMU_LOCK_WRITE_REGISTER32(baseAddress, lock_reg);
+ MMUMMU_LOCK_WRITE_REGISTER32(base_address, lock_reg);

return status;
}
@@ -519,23 +519,23 @@ hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, u32 virtualAddr, u32 page_size)
}

/* mmu_flush_entry */
-static hw_status mmu_flush_entry(const void __iomem *baseAddress)
+static hw_status mmu_flush_entry(const void __iomem *base_address)
{
hw_status status = RET_OK;
u32 flush_entry_data = 0x1;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

/* write values to register */
- MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32(baseAddress, flush_entry_data);
+ MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32(base_address, flush_entry_data);

return status;
}

/* mmu_set_cam_entry */
-static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
+static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 pageSize,
const u32 preservedBit,
const u32 validBit,
@@ -545,7 +545,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
u32 mmu_cam_reg;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

mmu_cam_reg = (virtual_addr_tag << 12);
@@ -553,13 +553,13 @@ static hw_status mmu_set_cam_entry(const void __iomem *baseAddress,
(preservedBit << 3);

/* write values to register */
- MMUMMU_CAM_WRITE_REGISTER32(baseAddress, mmu_cam_reg);
+ MMUMMU_CAM_WRITE_REGISTER32(base_address, mmu_cam_reg);

return status;
}

/* mmu_set_ram_entry */
-static hw_status mmu_set_ram_entry(const void __iomem *baseAddress,
+static hw_status mmu_set_ram_entry(const void __iomem *base_address,
const u32 physicalAddr,
enum hw_endianism_t endianism,
enum hw_element_size_t element_size,
@@ -569,7 +569,7 @@ static hw_status mmu_set_ram_entry(const void __iomem *baseAddress,
u32 mmu_ram_reg;

/*Check the input Parameters */
- CHECK_INPUT_PARAM(baseAddress, 0, RET_BAD_NULL_PARAM,
+ CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
CHECK_INPUT_RANGE_MIN0(element_size, MMU_ELEMENTSIZE_MAX,
RET_PARAM_OUT_OF_RANGE, RES_MMU_BASE +
@@ -580,7 +580,7 @@ static hw_status mmu_set_ram_entry(const void __iomem *baseAddress,
(mixed_size << 6));

/* write values to register */
- MMUMMU_RAM_WRITE_REGISTER32(baseAddress, mmu_ram_reg);
+ MMUMMU_RAM_WRITE_REGISTER32(base_address, mmu_ram_reg);

return status;

diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 9b13468..191b5d9 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -42,44 +42,44 @@ struct hw_mmu_map_attrs_t {
bool donotlockmpupage;
};

-extern hw_status hw_mmu_enable(const void __iomem *baseAddress);
+extern hw_status hw_mmu_enable(const void __iomem *base_address);

-extern hw_status hw_mmu_disable(const void __iomem *baseAddress);
+extern hw_status hw_mmu_disable(const void __iomem *base_address);

-extern hw_status hw_mmu_num_locked_set(const void __iomem *baseAddress,
+extern hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
u32 numLockedEntries);

-extern hw_status hw_mmu_victim_num_set(const void __iomem *baseAddress,
+extern hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
u32 victimEntryNum);

/* For MMU faults */
-extern hw_status hw_mmu_event_ack(const void __iomem *baseAddress,
+extern hw_status hw_mmu_event_ack(const void __iomem *base_address,
u32 irqMask);

-extern hw_status hw_mmu_event_disable(const void __iomem *baseAddress,
+extern hw_status hw_mmu_event_disable(const void __iomem *base_address,
u32 irqMask);

-extern hw_status hw_mmu_event_enable(const void __iomem *baseAddress,
+extern hw_status hw_mmu_event_enable(const void __iomem *base_address,
u32 irqMask);

-extern hw_status hw_mmu_event_status(const void __iomem *baseAddress,
+extern hw_status hw_mmu_event_status(const void __iomem *base_address,
u32 *irqMask);

-extern hw_status hw_mmu_fault_addr_read(const void __iomem *baseAddress,
+extern hw_status hw_mmu_fault_addr_read(const void __iomem *base_address,
u32 *addr);

/* Set the TT base address */
-extern hw_status hw_mmu_ttb_set(const void __iomem *baseAddress,
+extern hw_status hw_mmu_ttb_set(const void __iomem *base_address,
u32 TTBPhysAddr);

-extern hw_status hw_mmu_twl_enable(const void __iomem *baseAddress);
+extern hw_status hw_mmu_twl_enable(const void __iomem *base_address);

-extern hw_status hw_mmu_twl_disable(const void __iomem *baseAddress);
+extern hw_status hw_mmu_twl_disable(const void __iomem *base_address);

-extern hw_status hw_mmu_tlb_flush(const void __iomem *baseAddress,
+extern hw_status hw_mmu_tlb_flush(const void __iomem *base_address,
u32 virtualAddr, u32 pageSize);

-extern hw_status hw_mmu_tlb_add(const void __iomem *baseAddress,
+extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
u32 pageSize,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 3cf93aa..493ff56 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -95,7 +95,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Destroy the communication memory manager object.
* Parameters:
* hcmm_mgr: Cmm Mgr handle.
- * bForce: Force deallocation of all cmm memory immediately if set TRUE.
+ * force: Force deallocation of all cmm memory immediately if set TRUE.
* If FALSE, and outstanding allocations will return -EPERM
* status.
* Returns:
@@ -108,7 +108,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Ensures:
* Memory resources used by Cmm Mgr are freed.
*/
-extern int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce);
+extern int cmm_destroy(struct cmm_object *hcmm_mgr, bool force);

/*
* ======== cmm_exit ========
@@ -305,7 +305,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
* Delete translator resources
* Parameters:
* xlator: handle to translator.
- * bForce: bForce = TRUE will free XLators SM buffers/dscriptrs.
+ * force: force = TRUE will free XLators SM buffers/dscriptrs.
* Returns:
* 0: Success.
* -EFAULT: Bad translator handle.
@@ -316,7 +316,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
*
*/
extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator,
- bool bForce);
+ bool force);

/*
* ======== cmm_xlator_free_buf ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index c8e6098..6914247 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -288,13 +288,13 @@ extern bool cod_init(void);
* COD module initialized.
* hmgr is valid.
* nArgc > 0.
- * aArgs != NULL.
- * aArgs[0] != NULL.
+ * args != NULL.
+ * args[0] != NULL.
* pfn_write != NULL.
* Ensures:
*/
extern int cod_load_base(struct cod_manager *cod_mgr_obj,
- u32 nArgc, char *aArgs[],
+ u32 nArgc, char *args[],
cod_writefxn pfn_write, void *pArb,
char *envp[]);

@@ -364,6 +364,6 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
*/
extern int cod_read_section(struct cod_libraryobj *lib,
IN char *pstrSect,
- OUT char *pstrContent, IN u32 cContentSize);
+ OUT char *pstrContent, IN u32 content_size);

#endif /* COD_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index df172bc..54e8238 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -113,7 +113,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);
* This function enumerates currently visible DSP/BIOS Bridge objects
* and returns the UUID and type of each enumerated object.
* Parameters:
- * cIndex: The object enumeration index.
+ * index: The object enumeration index.
* obj_type: Type of object to enumerate.
* uuid_obj: Pointer to a dsp_uuid object.
* Returns:
@@ -128,7 +128,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);
* This function can be used in conjunction with dcd_get_object_def to
* retrieve object properties.
*/
-extern int dcd_enumerate_object(IN s32 cIndex,
+extern int dcd_enumerate_object(IN s32 index,
IN enum dsp_dcdobjtype obj_type,
OUT struct dsp_uuid *uuid_obj);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h
index 47afc82..d24bec0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h
@@ -61,7 +61,7 @@ struct dcd_nodeprops {

/* DCD Generic Object Type */
struct dcd_genericobj {
- union dcdObjUnion {
+ union dcd_obj {
struct dcd_nodeprops node_obj; /* node object. */
/* processor object. */
struct dsp_processorinfo proc_info;
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 7aa4ca4..711d206 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -304,7 +304,7 @@ int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Purpose:
* Release the communication memory manager resources.
*/
-int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce)
+int cmm_destroy(struct cmm_object *hcmm_mgr, bool force)
{
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
struct cmm_info temp_info;
@@ -319,7 +319,7 @@ int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce)
}
mutex_lock(&cmm_mgr_obj->cmm_lock);
/* If not force then fail if outstanding allocations exist */
- if (!bForce) {
+ if (!force) {
/* Check for outstanding memory allocations */
status = cmm_get_info(hcmm_mgr, &temp_info);
if (DSP_SUCCEEDED(status)) {
@@ -989,7 +989,7 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
* Free the Xlator resources.
* VM gets freed later.
*/
-int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool bForce)
+int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = 0;
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index f9c0f30..a9b0491 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -128,21 +128,21 @@ static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode)
return filp;
}

-static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
+static s32 cod_f_read(void __user *pbuffer, s32 size, s32 count,
struct file *filp)
{
/* check for valid file handle */
if (!filp)
return -EFAULT;

- if ((size > 0) && (cCount > 0) && pbuffer) {
+ if ((size > 0) && (count > 0) && pbuffer) {
u32 dw_bytes_read;
mm_segment_t fs;

/* read from file */
fs = get_fs();
set_fs(get_ds());
- dw_bytes_read = filp->f_op->read(filp, pbuffer, size * cCount,
+ dw_bytes_read = filp->f_op->read(filp, pbuffer, size * count,
&(filp->f_pos));
set_fs(fs);

@@ -155,7 +155,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
return -EINVAL;
}

-static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin)
+static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 origin)
{
loff_t dw_cur_pos;

@@ -164,7 +164,7 @@ static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin)
return -EFAULT;

/* based on the origin flag, move the internal pointer */
- dw_cur_pos = filp->f_op->llseek(filp, lOffset, cOrigin);
+ dw_cur_pos = filp->f_op->llseek(filp, lOffset, origin);

if ((s32) dw_cur_pos < 0)
return -EPERM;
@@ -487,12 +487,12 @@ bool cod_init(void)
* loaded must be the first element of the args array and must be a fully
* qualified pathname.
* Details:
- * if nArgc doesn't match the number of arguments in the aArgs array, the
- * aArgs array is searched for a NULL terminating entry, and argc is
+ * if nArgc doesn't match the number of arguments in the args array, the
+ * args array is searched for a NULL terminating entry, and argc is
* recalculated to reflect this. In this way, we can support NULL
- * terminating aArgs arrays, if nArgc is very large.
+ * terminating args arrays, if nArgc is very large.
*/
-int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[],
+int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *args[],
cod_writefxn pfn_write, void *pArb, char *envp[])
{
dbll_flags flags;
@@ -504,8 +504,8 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[],
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
DBC_REQUIRE(nArgc > 0);
- DBC_REQUIRE(aArgs != NULL);
- DBC_REQUIRE(aArgs[0] != NULL);
+ DBC_REQUIRE(args != NULL);
+ DBC_REQUIRE(args[0] != NULL);
DBC_REQUIRE(pfn_write != NULL);
DBC_REQUIRE(hmgr->base_lib != NULL);

@@ -514,7 +514,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[],
* reflect true number in NULL terminated argv array.
*/
for (i = 0; i < nArgc; i++) {
- if (aArgs[i] == NULL) {
+ if (args[i] == NULL) {
nArgc = i;
break;
}
@@ -626,7 +626,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Retrieve the content of a code section given the section name.
*/
int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
- OUT char *pstrContent, IN u32 cContentSize)
+ OUT char *pstrContent, IN u32 content_size)
{
int status = 0;

@@ -639,7 +639,7 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
if (lib != NULL)
status =
lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
- pstrContent, cContentSize);
+ pstrContent, content_size);
else
status = -ESPIPE;

diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c
index c8abce8..e0be8e0 100644
--- a/drivers/staging/tidspbridge/pmgr/dmm.c
+++ b/drivers/staging/tidspbridge/pmgr/dmm.c
@@ -72,8 +72,8 @@ static u32 table_size; /* The size of virt and phys pages tables */

/* ----------------------------------- Function Prototypes */
static struct map_page *get_region(u32 addr);
-static struct map_page *get_free_region(u32 aSize);
-static struct map_page *get_mapped_region(u32 aAddr);
+static struct map_page *get_free_region(u32 len);
+static struct map_page *get_mapped_region(u32 addrs);

/* ======== dmm_create_tables ========
* Purpose:
@@ -405,14 +405,14 @@ int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)
* Purpose:
* Returns a region containing the specified memory region
*/
-static struct map_page *get_region(u32 aAddr)
+static struct map_page *get_region(u32 addrs)
{
struct map_page *curr_region = NULL;
u32 i = 0;

if (virtual_mapping_table != NULL) {
/* find page mapped by this address */
- i = DMM_ADDR_TO_INDEX(aAddr);
+ i = DMM_ADDR_TO_INDEX(addrs);
if (i < table_size)
curr_region = virtual_mapping_table + i;
}
@@ -427,7 +427,7 @@ static struct map_page *get_region(u32 aAddr)
* Purpose:
* Returns the requested free region
*/
-static struct map_page *get_free_region(u32 aSize)
+static struct map_page *get_free_region(u32 len)
{
struct map_page *curr_region = NULL;
u32 i = 0;
@@ -436,7 +436,7 @@ static struct map_page *get_free_region(u32 aSize)

if (virtual_mapping_table == NULL)
return curr_region;
- if (aSize > free_size) {
+ if (len > free_size) {
/* Find the largest free region
* (coalesce during the traversal) */
while (i < table_size) {
@@ -461,10 +461,10 @@ static struct map_page *get_free_region(u32 aSize)
i = next_i;
}
}
- if (aSize <= free_size) {
+ if (len <= free_size) {
curr_region = virtual_mapping_table + free_region;
- free_region += (aSize / PG_SIZE4K);
- free_size -= aSize;
+ free_region += (len / PG_SIZE4K);
+ free_size -= len;
}
return curr_region;
}
@@ -474,7 +474,7 @@ static struct map_page *get_free_region(u32 aSize)
* Purpose:
* Returns the requestedmapped region
*/
-static struct map_page *get_mapped_region(u32 aAddr)
+static struct map_page *get_mapped_region(u32 addrs)
{
u32 i = 0;
struct map_page *curr_region = NULL;
@@ -482,7 +482,7 @@ static struct map_page *get_mapped_region(u32 aAddr)
if (virtual_mapping_table == NULL)
return curr_region;

- i = DMM_ADDR_TO_INDEX(aAddr);
+ i = DMM_ADDR_TO_INDEX(addrs);
if (i < table_size && (virtual_mapping_table[i].mapped ||
virtual_mapping_table[i].reserved))
curr_region = virtual_mapping_table + i;
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index e014600..4fe96bf 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -65,8 +65,8 @@ static s32 atoi(char *psz_buf);
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
struct dcd_genericobj *pGenObj);
-static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize);
-static char dsp_char2_gpp_char(char *pWord, s32 cDspCharSize);
+static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
+static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT u16 *pNumLibs,
@@ -193,7 +193,7 @@ int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr)
* Purpose:
* Enumerates objects in the DCD.
*/
-int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
+int dcd_enumerate_object(IN s32 index, IN enum dsp_dcdobjtype obj_type,
OUT struct dsp_uuid *uuid_obj)
{
int status = 0;
@@ -206,10 +206,10 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
int len;

DBC_REQUIRE(refs >= 0);
- DBC_REQUIRE(cIndex >= 0);
+ DBC_REQUIRE(index >= 0);
DBC_REQUIRE(uuid_obj != NULL);

- if ((cIndex != 0) && (enum_refs == 0)) {
+ if ((index != 0) && (enum_refs == 0)) {
/*
* If an enumeration is being performed on an index greater
* than zero, then the current enum_refs must have been
@@ -257,7 +257,7 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
spin_lock(&dbdcd_lock);
list_for_each_entry(dcd_key, &reg_key_list, link) {
if (!strncmp(dcd_key->name, sz_reg_key, len)
- && !cIndex--) {
+ && !index--) {
strncpy(sz_value, &dcd_key->name[len],
strlen(&dcd_key->name[len]) + 1);
break;
@@ -1321,7 +1321,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
* Purpose:
* Compress the DSP buffer, if necessary, to conform to PC format.
*/
-static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
+static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size)
{
char *p;
char ch;
@@ -1332,10 +1332,10 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
return;

for (q = psz_buf; q < (psz_buf + ul_buf_size);) {
- ch = dsp_char2_gpp_char(q, cCharSize);
+ ch = dsp_char2_gpp_char(q, char_size);
if (ch == '\\') {
- q += cCharSize;
- ch = dsp_char2_gpp_char(q, cCharSize);
+ q += char_size;
+ ch = dsp_char2_gpp_char(q, char_size);
switch (ch) {
case 't':
*p = '\t';
@@ -1361,7 +1361,7 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
*p = ch;
}
p++;
- q += cCharSize;
+ q += char_size;
}

/* NULL out remainder of buffer. */
@@ -1374,13 +1374,13 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
* Purpose:
* Convert DSP char to host GPP char in a portable manner
*/
-static char dsp_char2_gpp_char(char *pWord, s32 cDspCharSize)
+static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size)
{
char ch = '\0';
char *ch_src;
s32 i;

- for (ch_src = pWord, i = cDspCharSize; i > 0; i--)
+ for (ch_src = pWord, i = dsp_char_size; i > 0; i--)
ch |= *ch_src++;

return ch;
diff --git a/drivers/staging/tidspbridge/rmgr/dspdrv.c b/drivers/staging/tidspbridge/rmgr/dspdrv.c
index ec9ba4f..19a7471 100644
--- a/drivers/staging/tidspbridge/rmgr/dspdrv.c
+++ b/drivers/staging/tidspbridge/rmgr/dspdrv.c
@@ -116,7 +116,7 @@ func_cont:
* ======== dsp_deinit ========
* Frees the resources allocated for bridge.
*/
-bool dsp_deinit(u32 deviceContext)
+bool dsp_deinit(u32 device_ctxt)
{
bool ret = true;
u32 device_node;
@@ -126,10 +126,10 @@ bool dsp_deinit(u32 deviceContext)
(void)dev_remove_device((struct cfg_devnode *)device_node);

(void)drv_release_resources((u32) device_node,
- (struct drv_object *)deviceContext);
+ (struct drv_object *)device_ctxt);
}

- (void)drv_destroy((struct drv_object *)deviceContext);
+ (void)drv_destroy((struct drv_object *)device_ctxt);

/* Get the Manager Object from Registry
* MGR Destroy will unload the DCD dll */
--
1.6.3.3

2010-07-08 23:12:18

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 02/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
dspAddr to dsp_address
dspAdr to dsp_adr
dspBaseVirt to dsp_base_virt
dwDeviceContext to device_context
dwDSPAddrOffset to dsp_addr_offset
dwDSPAddr to dsp_addr
dwErrInfo to error_info
dwGPPBaseBA to gpp_base_ba
dwMask to mask
dwTimeout to timeout
dwTimeOut to timeout
dwValue to value
entryNum to entry_num
execFile to exec_file
fFlush to flush_data
FlushMemType to flush_mem_type
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 28 ++++++------
drivers/staging/tidspbridge/core/io_sm.c | 8 ++--
drivers/staging/tidspbridge/core/tiomap3430.c | 44 ++++++++++----------
drivers/staging/tidspbridge/core/tiomap_io.c | 24 +++++-----
drivers/staging/tidspbridge/core/tiomap_io.h | 14 +++---
drivers/staging/tidspbridge/core/ue_deh.c | 14 +++---
drivers/staging/tidspbridge/hw/hw_mmu.c | 4 +-
drivers/staging/tidspbridge/hw/hw_mmu.h | 2 +-
.../staging/tidspbridge/include/dspbridge/cfg.h | 8 ++--
.../staging/tidspbridge/include/dspbridge/cmm.h | 6 +-
.../tidspbridge/include/dspbridge/dbldefs.h | 9 ++--
.../tidspbridge/include/dspbridge/dblldefs.h | 8 ++--
.../staging/tidspbridge/include/dspbridge/dev.h | 2 +-
.../tidspbridge/include/dspbridge/dspchnl.h | 6 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 44 ++++++++++----------
.../staging/tidspbridge/include/dspbridge/dspdeh.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dspdrv.h | 6 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 12 +++---
.../staging/tidspbridge/include/dspbridge/rmm.h | 14 +++---
.../staging/tidspbridge/include/dspbridge/strm.h | 8 ++--
drivers/staging/tidspbridge/pmgr/cmm.c | 8 ++--
drivers/staging/tidspbridge/rmgr/disp.c | 8 ++--
drivers/staging/tidspbridge/rmgr/nldr.c | 27 ++++++-----
drivers/staging/tidspbridge/rmgr/proc.c | 6 +-
drivers/staging/tidspbridge/rmgr/rmm.c | 14 +++---
drivers/staging/tidspbridge/rmgr/strm.c | 9 ++--
drivers/staging/tidspbridge/services/cfg.c | 10 ++--
27 files changed, 174 insertions(+), 171 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 714b6f7..362e01e 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -479,7 +479,7 @@ int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr)
* purpose:
* Flushes all the outstanding data requests on a channel.
*/
-int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)
+int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 timeout)
{
int status = 0;
struct chnl_object *pchnl = (struct chnl_object *)chnl_obj;
@@ -488,7 +488,7 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)
struct chnl_ioc chnl_ioc_obj;
/* Check args: */
if (pchnl) {
- if ((dwTimeOut == CHNL_IOCNOWAIT)
+ if ((timeout == CHNL_IOCNOWAIT)
&& CHNL_IS_OUTPUT(pchnl->chnl_mode)) {
status = -EINVAL;
} else {
@@ -509,7 +509,7 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)
while (!LST_IS_EMPTY(pchnl->pio_requests) &&
DSP_SUCCEEDED(status)) {
status = bridge_chnl_get_ioc(chnl_obj,
- dwTimeOut, &chnl_ioc_obj);
+ timeout, &chnl_ioc_obj);
if (DSP_FAILED(status))
continue;

@@ -566,7 +566,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj,
* I/O request.
* Note: Ensures Channel Invariant (see notes above).
*/
-int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
+int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
OUT struct chnl_ioc *pIOC)
{
int status = 0;
@@ -582,7 +582,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
/* Check args: */
if (!pIOC || !pchnl) {
status = -EFAULT;
- } else if (dwTimeOut == CHNL_IOCNOWAIT) {
+ } else if (timeout == CHNL_IOCNOWAIT) {
if (LST_IS_EMPTY(pchnl->pio_completions))
status = -EREMOTEIO;

@@ -597,12 +597,12 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
goto func_end;

ioc.status = CHNL_IOCSTATCOMPLETE;
- if (dwTimeOut !=
+ if (timeout !=
CHNL_IOCNOWAIT && LST_IS_EMPTY(pchnl->pio_completions)) {
- if (dwTimeOut == CHNL_IOCINFINITE)
- dwTimeOut = SYNC_INFINITE;
+ if (timeout == CHNL_IOCINFINITE)
+ timeout = SYNC_INFINITE;

- stat_sync = sync_wait_on_event(pchnl->sync_event, dwTimeOut);
+ stat_sync = sync_wait_on_event(pchnl->sync_event, timeout);
if (stat_sync == -ETIME) {
/* No response from DSP */
ioc.status |= CHNL_IOCSTATTIMEOUT;
@@ -663,7 +663,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,
* value may be non-zero, we still have to set the event.
* Therefore, this optimization is taken out.
*
- * if (dwTimeOut == CHNL_IOCNOWAIT) {
+ * if (timeout == CHNL_IOCNOWAIT) {
* ... ensure event is set..
* sync_set_event(pchnl->sync_event);
* } */
@@ -744,8 +744,8 @@ int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 uChnlID,
* ======== bridge_chnl_idle ========
* Idles a particular channel.
*/
-int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 dwTimeOut,
- bool fFlush)
+int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,
+ bool flush_data)
{
s8 chnl_mode;
struct chnl_mgr *chnl_mgr_obj;
@@ -756,9 +756,9 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 dwTimeOut,
chnl_mode = chnl_obj->chnl_mode;
chnl_mgr_obj = chnl_obj->chnl_mgr_obj;

- if (CHNL_IS_OUTPUT(chnl_mode) && !fFlush) {
+ if (CHNL_IS_OUTPUT(chnl_mode) && !flush_data) {
/* Wait for IO completions, up to the specified timeout: */
- status = bridge_chnl_flush_io(chnl_obj, dwTimeOut);
+ status = bridge_chnl_flush_io(chnl_obj, timeout);
} else {
status = bridge_chnl_cancel_io(chnl_obj);

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 7fb840d..01564a5 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -146,7 +146,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static void output_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
- struct chnl_object *pchnl, u32 dwMask);
+ struct chnl_object *pchnl, u32 mask);
static u32 read_data(struct bridge_dev_context *hDevContext, void *dest,
void *pSrc, u32 usize);
static u32 write_data(struct bridge_dev_context *hDevContext, void *dest,
@@ -1081,7 +1081,7 @@ void iosm_schedule(struct io_mgr *pio_mgr)
* IO_Dispatch()), so just start searching from the current channel id.
*/
static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
- struct chnl_object *pchnl, u32 dwMask)
+ struct chnl_object *pchnl, u32 mask)
{
u32 ret = OUTPUTNOTREADY;
u32 id, start_id;
@@ -1092,11 +1092,11 @@ static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
id = ((id == CHNL_MAXCHANNELS) ? 0 : id);
if (id >= CHNL_MAXCHANNELS)
goto func_end;
- if (dwMask) {
+ if (mask) {
shift = (1 << id);
start_id = id;
do {
- if (dwMask & shift) {
+ if (mask & shift) {
ret = id;
if (pchnl == NULL)
chnl_mgr_obj->dw_last_output = id;
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index ee9205b..1555af7 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -79,16 +79,16 @@
static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
static int bridge_brd_read(struct bridge_dev_context *dev_context,
OUT u8 *pbHostBuf,
- u32 dwDSPAddr, u32 ul_num_bytes,
+ u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
static int bridge_brd_start(struct bridge_dev_context *dev_context,
- u32 dwDSPAddr);
+ u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context,
int *pdwState);
static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf,
- u32 dwDSPAddr, u32 ul_num_bytes,
+ u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
static int bridge_brd_set_state(struct bridge_dev_context *hDevContext,
u32 ulBrdState);
@@ -96,7 +96,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dwDSPAddr,
+ IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
static int bridge_brd_mem_map(struct bridge_dev_context *hDevContext,
u32 ul_mpu_addr, u32 ulVirtAddr,
@@ -317,7 +317,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *hDevContext)
* Reads buffers for DSP memory.
*/
static int bridge_brd_read(struct bridge_dev_context *hDevContext,
- OUT u8 *pbHostBuf, u32 dwDSPAddr,
+ OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -325,16 +325,16 @@ static int bridge_brd_read(struct bridge_dev_context *hDevContext,
u32 offset;
u32 dsp_base_addr = hDevContext->dw_dsp_base_addr;

- if (dwDSPAddr < dev_context->dw_dsp_start_add) {
+ if (dsp_addr < dev_context->dw_dsp_start_add) {
status = -EPERM;
return status;
}
/* change here to account for the 3 bands of the DSP internal memory */
- if ((dwDSPAddr - dev_context->dw_dsp_start_add) <
+ if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
- offset = dwDSPAddr - dev_context->dw_dsp_start_add;
+ offset = dsp_addr - dev_context->dw_dsp_start_add;
} else {
- status = read_ext_dsp_data(dev_context, pbHostBuf, dwDSPAddr,
+ status = read_ext_dsp_data(dev_context, pbHostBuf, dsp_addr,
ul_num_bytes, ulMemType);
return status;
}
@@ -369,7 +369,7 @@ static int bridge_brd_set_state(struct bridge_dev_context *hDevContext,
* b) DSP_RST2 is released.
*/
static int bridge_brd_start(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr)
+ u32 dsp_addr)
{
int status = 0;
struct bridge_dev_context *dev_context = hDevContext;
@@ -430,7 +430,7 @@ static int bridge_brd_start(struct bridge_dev_context *hDevContext,
OMAP3430_RST1_IVA2_MASK, OMAP3430_IVA2_MOD,
OMAP2_RM_RSTCTRL);
/* Mask address with 1K for compatibility */
- __raw_writel(dwDSPAddr & OMAP3_IVA2_BOOTADDR_MASK,
+ __raw_writel(dsp_addr & OMAP3_IVA2_BOOTADDR_MASK,
OMAP343X_CTRL_REGADDR(
OMAP343X_CONTROL_IVA2_BOOTADDR));
/*
@@ -601,7 +601,7 @@ static int bridge_brd_start(struct bridge_dev_context *hDevContext,
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);

dev_dbg(bridge, "Waiting for Sync @ 0x%x\n", dw_sync_addr);
- dev_dbg(bridge, "DSP c_int00 Address = 0x%x\n", dwDSPAddr);
+ dev_dbg(bridge, "DSP c_int00 Address = 0x%x\n", dsp_addr);
if (dsp_debug)
while (*((volatile u16 *)dw_sync_addr))
;;
@@ -778,22 +778,22 @@ static int bridge_brd_status(struct bridge_dev_context *hDevContext,
* Copies the buffers to DSP internal or external memory.
*/
static int bridge_brd_write(struct bridge_dev_context *hDevContext,
- IN u8 *pbHostBuf, u32 dwDSPAddr,
+ IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
struct bridge_dev_context *dev_context = hDevContext;

- if (dwDSPAddr < dev_context->dw_dsp_start_add) {
+ if (dsp_addr < dev_context->dw_dsp_start_add) {
status = -EPERM;
return status;
}
- if ((dwDSPAddr - dev_context->dw_dsp_start_add) <
+ if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
- status = write_dsp_data(hDevContext, pbHostBuf, dwDSPAddr,
+ status = write_dsp_data(hDevContext, pbHostBuf, dsp_addr,
ul_num_bytes, ulMemType);
} else {
- status = write_ext_dsp_data(dev_context, pbHostBuf, dwDSPAddr,
+ status = write_ext_dsp_data(dev_context, pbHostBuf, dsp_addr,
ul_num_bytes, ulMemType, false);
}

@@ -1162,7 +1162,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,

/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
static int bridge_brd_mem_write(struct bridge_dev_context *hDevContext,
- IN u8 *pbHostBuf, u32 dwDSPAddr,
+ IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -1173,18 +1173,18 @@ static int bridge_brd_mem_write(struct bridge_dev_context *hDevContext,
while (ul_remain_bytes > 0 && DSP_SUCCEEDED(status)) {
ul_bytes =
ul_remain_bytes > BUFFERSIZE ? BUFFERSIZE : ul_remain_bytes;
- if (dwDSPAddr < (dev_context->dw_dsp_start_add +
+ if (dsp_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
status =
- write_dsp_data(hDevContext, pbHostBuf, dwDSPAddr,
+ write_dsp_data(hDevContext, pbHostBuf, dsp_addr,
ul_bytes, ulMemType);
} else {
status = write_ext_dsp_data(hDevContext, pbHostBuf,
- dwDSPAddr, ul_bytes,
+ dsp_addr, ul_bytes,
ulMemType, true);
}
ul_remain_bytes -= ul_bytes;
- dwDSPAddr += ul_bytes;
+ dsp_addr += ul_bytes;
pbHostBuf = pbHostBuf + ul_bytes;
}
return status;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index db916a5..3952dcb 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -51,7 +51,7 @@ bool symbols_reloaded = true;
* Copies DSP external memory buffers to the host side buffers.
*/
int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
- OUT u8 *pbHostBuf, u32 dwDSPAddr,
+ OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -83,8 +83,8 @@ int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
DBC_ASSERT(ul_trace_sec_end != 0);

if (DSP_SUCCEEDED(status)) {
- if ((dwDSPAddr <= ul_trace_sec_end) &&
- (dwDSPAddr >= ul_trace_sec_beg))
+ if ((dsp_addr <= ul_trace_sec_end) &&
+ (dsp_addr >= ul_trace_sec_beg))
trace_read = true;
}

@@ -165,7 +165,7 @@ int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
if (!dw_base_addr || !ul_ext_base || !ul_ext_end)
status = -EPERM;

- offset = dwDSPAddr - ul_ext_base;
+ offset = dsp_addr - ul_ext_base;

if (DSP_SUCCEEDED(status))
memcpy(pbHostBuf, (u8 *) dw_base_addr + offset, ul_num_bytes);
@@ -179,7 +179,7 @@ int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
* Copies buffers to the DSP internal/external memory.
*/
int write_dsp_data(struct bridge_dev_context *hDevContext,
- IN u8 *pbHostBuf, u32 dwDSPAddr, u32 ul_num_bytes,
+ IN u8 *pbHostBuf, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType)
{
u32 offset;
@@ -194,7 +194,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext,
if (!resources)
return -EPERM;

- offset = dwDSPAddr - hDevContext->dw_dsp_start_add;
+ offset = dsp_addr - hDevContext->dw_dsp_start_add;
if (offset < base1) {
dw_base_addr = MEM_LINEAR_ADDRESS(resources->dw_mem_base[2],
resources->dw_mem_length[2]);
@@ -225,7 +225,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext,
*
*/
int write_ext_dsp_data(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dwDSPAddr,
+ IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
bool dynamic_load)
{
@@ -253,8 +253,8 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
&ul_trace_sec_end);
}
if (DSP_SUCCEEDED(ret)) {
- if ((dwDSPAddr <= ul_trace_sec_end) &&
- (dwDSPAddr >= ul_trace_sec_beg))
+ if ((dsp_addr <= ul_trace_sec_end) &&
+ (dsp_addr >= ul_trace_sec_beg))
trace_load = true;
}

@@ -364,9 +364,9 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
for (i = 0; i < 4; i++)
remain_byte[i] = 0x0;

- dw_offset = dwDSPAddr - ul_ext_base;
- /* Also make sure the dwDSPAddr is < ul_ext_end */
- if (dwDSPAddr > ul_ext_end || dw_offset > dwDSPAddr)
+ dw_offset = dsp_addr - ul_ext_base;
+ /* Also make sure the dsp_addr is < ul_ext_end */
+ if (dsp_addr > ul_ext_end || dw_offset > dsp_addr)
ret = -EPERM;
}
if (DSP_SUCCEEDED(ret)) {
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index 3bfe7b7..b398f54 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -48,14 +48,14 @@
* is configured by the combination of DSP MMU and shm Memory manager in the CDB
*/
extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
- OUT u8 *pbHostBuf, u32 dwDSPAddr,
+ OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
* ======== write_dsp_data ========
*/
extern int write_dsp_data(struct bridge_dev_context *dev_context,
- OUT u8 *pbHostBuf, u32 dwDSPAddr,
+ OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
@@ -65,7 +65,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
* shm Memory manager in the CDB
*/
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dwDSPAddr,
+ IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
bool dynamic_load);

@@ -75,9 +75,9 @@ extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
*/
extern inline void write_ext32_bit_dsp_data(IN const
struct bridge_dev_context *dev_context,
- IN u32 dwDSPAddr, IN u32 val)
+ IN u32 dsp_addr, IN u32 val)
{
- *(u32 *) dwDSPAddr = ((dev_context->tc_word_swap_on) ? (((val << 16) &
+ *(u32 *) dsp_addr = ((dev_context->tc_word_swap_on) ? (((val << 16) &
0xFFFF0000) |
((val >> 16) &
0x0000FFFF)) :
@@ -89,10 +89,10 @@ extern inline void write_ext32_bit_dsp_data(IN const
* Reads 32 bit data from the external memory
*/
extern inline u32 read_ext32_bit_dsp_data(IN const struct bridge_dev_context
- *dev_context, IN u32 dwDSPAddr)
+ *dev_context, IN u32 dsp_addr)
{
u32 ret;
- ret = *(u32 *) dwDSPAddr;
+ ret = *(u32 *) dsp_addr;

ret = ((dev_context->tc_word_swap_on) ? (((ret << 16)
& 0xFFFF0000) | ((ret >> 16) &
diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index 64e9366..69256a6 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -161,7 +161,7 @@ int bridge_deh_register_notify(struct deh_mgr *deh_mgr, u32 event_mask,
return status;
}

-void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
+void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 error_info)
{
struct bridge_dev_context *dev_context;
int status = 0;
@@ -183,9 +183,9 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
deh_mgr->err_info.dw_val1 = 0L;
deh_mgr->err_info.dw_val2 = 0L;
deh_mgr->err_info.dw_val3 = 0L;
- deh_mgr->err_info.dw_val1 = dwErrInfo;
+ deh_mgr->err_info.dw_val1 = error_info;
dev_err(bridge, "%s: %s, err_info = 0x%x\n",
- __func__, "DSP_SYSERROR", dwErrInfo);
+ __func__, "DSP_SYSERROR", error_info);
dump_dl_modules(dev_context);
dump_dsp_stack(dev_context);
break;
@@ -193,7 +193,7 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
/* MMU fault routine should have set err info structure. */
deh_mgr->err_info.dw_err_mask = DSP_MMUFAULT;
dev_err(bridge, "%s: %s, err_info = 0x%x\n",
- __func__, "DSP_MMUFAULT", dwErrInfo);
+ __func__, "DSP_MMUFAULT", error_info);
dev_info(bridge, "%s: %s, high=0x%x, low=0x%x, "
"fault=0x%x\n", __func__, "DSP_MMUFAULT",
(unsigned int) deh_mgr->err_info.dw_val1,
@@ -241,9 +241,9 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
deh_mgr->err_info.dw_val1 = 0L;
deh_mgr->err_info.dw_val2 = 0L;
deh_mgr->err_info.dw_val3 = 0L;
- deh_mgr->err_info.dw_val1 = dwErrInfo;
+ deh_mgr->err_info.dw_val1 = error_info;
dev_err(bridge, "%s: %s, err_info = 0x%x\n",
- __func__, "DSP_PWRERROR", dwErrInfo);
+ __func__, "DSP_PWRERROR", error_info);
break;
#endif /* CONFIG_BRIDGE_NTFY_PWRERR */
case DSP_WDTOVERFLOW:
@@ -255,7 +255,7 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
break;
default:
dev_dbg(bridge, "%s: Unknown Error, err_info = 0x%x\n",
- __func__, dwErrInfo);
+ __func__, error_info);
break;
}

diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index 6d800a8..d5d562d 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -334,7 +334,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
u32 pageSize,
- u32 entryNum,
+ u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
s8 preservedBit, s8 validBit)
{
@@ -389,7 +389,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,

/* Update the MMU Lock Register */
/* currentVictim between lockedBaseValue and (MMU_Entries_Number - 1) */
- MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, entryNum);
+ MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, entry_num);

/* Enable loading of an entry in TLB by writing 1
into LD_TLB_REG register */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 191b5d9..2a75268 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -83,7 +83,7 @@ extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
u32 pageSize,
- u32 entryNum,
+ u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
s8 preservedBit, s8 validBit);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index a2580f0..58064e0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -189,7 +189,7 @@ extern bool cfg_init(void);
* Store the Device Object handle for a given devnode.
* Parameters:
* dev_node_obj: Platform's dev_node handle we are storing value with.
- * dwValue: Arbitrary value to store.
+ * value: Arbitrary value to store.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid.
@@ -200,14 +200,14 @@ extern bool cfg_init(void);
* 0: The Private u32 was successfully set.
*/
extern int cfg_set_dev_object(IN struct cfg_devnode *dev_node_obj,
- IN u32 dwValue);
+ IN u32 value);

/*
* ======== CFG_SetDrvObject ========
* Purpose:
* Store the Driver Object handle.
* Parameters:
- * dwValue: Arbitrary value to store.
+ * value: Arbitrary value to store.
* dw_type Type of Object to Store
* Returns:
* 0: Success.
@@ -217,6 +217,6 @@ extern int cfg_set_dev_object(IN struct cfg_devnode *dev_node_obj,
* Ensures:
* 0: The Private u32 was successfully set.
*/
-extern int cfg_set_object(IN u32 dwValue, u8 dw_type);
+extern int cfg_set_object(IN u32 value, u8 dw_type);

#endif /* CFG_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 493ff56..5fbb051 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -205,7 +205,7 @@ extern bool cmm_init(void);
* hcmm_mgr: Handle to a Cmm Mgr.
* lpGPPBasePA: GPP Base Physical address.
* ul_size: Size in GPP bytes.
- * dwDSPAddrOffset GPP PA to DSP PA Offset.
+ * dsp_addr_offset GPP PA to DSP PA Offset.
* c_factor: Add offset if CMM_ADDTODSPPA, sub if CMM_SUBFROMDSPPA.
* dw_dsp_base: DSP virtual base byte address.
* ul_dsp_size: Size of DSP segment in bytes.
@@ -228,11 +228,11 @@ extern bool cmm_init(void);
extern int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
unsigned int dw_gpp_base_pa,
u32 ul_size,
- u32 dwDSPAddrOffset,
+ u32 dsp_addr_offset,
s8 c_factor,
unsigned int dw_dsp_base,
u32 ul_dsp_size,
- u32 *pulSegId, u32 dwGPPBaseBA);
+ u32 *pulSegId, u32 gpp_base_ba);

/*
* ======== cmm_un_register_gppsm_seg ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dbldefs.h
index a47e7b8..bf4fb99 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbldefs.h
@@ -59,11 +59,12 @@ struct dbl_symbol {
* ======== dbl_alloc_fxn ========
* Allocate memory function. Allocate or reserve (if reserved == TRUE)
* "size" bytes of memory from segment "space" and return the address in
- * *dspAddr (or starting at *dspAddr if reserve == TRUE). Returns 0 on
+ * *dsp_address (or starting at *dsp_address if reserve == TRUE). Returns 0 on
* success, or an error code on failure.
*/
typedef s32(*dbl_alloc_fxn) (void *hdl, s32 space, u32 size, u32 align,
- u32 *dspAddr, s32 seg_id, s32 req, bool reserved);
+ u32 *dsp_address, s32 seg_id, s32 req,
+ bool reserved);

/*
* ======== dbl_free_fxn ========
@@ -102,10 +103,10 @@ typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle,
/*
* ======== dbl_write_fxn ========
* Write memory function. Write "n" HOST bytes of memory to segment "mtype"
- * starting at address "dspAddr" from the buffer "buf". The buffer is
+ * starting at address "dsp_address" from the buffer "buf". The buffer is
* formatted as an array of words appropriate for the DSP.
*/
-typedef s32(*dbl_write_fxn) (void *hdl, u32 dspAddr, void *buf,
+typedef s32(*dbl_write_fxn) (void *hdl, u32 dsp_address, void *buf,
u32 n, s32 mtype);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index f587106..d780ee8 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -71,11 +71,11 @@ struct dbll_sym_val {
* ======== dbll_alloc_fxn ========
* Allocate memory function. Allocate or reserve (if reserved == TRUE)
* "size" bytes of memory from segment "space" and return the address in
- * *dspAddr (or starting at *dspAddr if reserve == TRUE). Returns 0 on
+ * *dsp_address (or starting at *dsp_address if reserve == TRUE). Returns 0 on
* success, or an error code on failure.
*/
typedef s32(*dbll_alloc_fxn) (void *hdl, s32 space, u32 size, u32 align,
- u32 *dspAddr, s32 seg_id, s32 req,
+ u32 *dsp_address, s32 seg_id, s32 req,
bool reserved);

/*
@@ -140,10 +140,10 @@ typedef s32(*dbll_tell_fxn) (void *);
/*
* ======== dbll_write_fxn ========
* Write memory function. Write "n" HOST bytes of memory to segment "mtype"
- * starting at address "dspAddr" from the buffer "buf". The buffer is
+ * starting at address "dsp_address" from the buffer "buf". The buffer is
* formatted as an array of words appropriate for the DSP.
*/
-typedef s32(*dbll_write_fxn) (void *hdl, u32 dspAddr, void *buf,
+typedef s32(*dbll_write_fxn) (void *hdl, u32 dsp_address, void *buf,
u32 n, s32 mtype);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 434c128..87c1681 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -42,7 +42,7 @@
* Parameters:
* pArb: Handle to a Device Object.
* hDevContext: Handle to Bridge driver defined device info.
- * dwDSPAddr: Address on DSP board (Destination).
+ * dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
index 5661bca..34ce4e8 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
@@ -46,12 +46,12 @@ extern int bridge_chnl_add_io_req(struct chnl_object *chnl_obj,
OPTIONAL u32 dw_dsp_addr, u32 dw_arg);

extern int bridge_chnl_get_ioc(struct chnl_object *chnl_obj,
- u32 dwTimeOut, OUT struct chnl_ioc *pIOC);
+ u32 timeout, OUT struct chnl_ioc *pIOC);

extern int bridge_chnl_cancel_io(struct chnl_object *chnl_obj);

extern int bridge_chnl_flush_io(struct chnl_object *chnl_obj,
- u32 dwTimeOut);
+ u32 timeout);

extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,
OUT struct chnl_info *pInfo);
@@ -61,7 +61,7 @@ extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
*pMgrInfo);

extern int bridge_chnl_idle(struct chnl_object *chnl_obj,
- u32 dwTimeOut, bool fFlush);
+ u32 timeout, bool flush_data);

extern int bridge_chnl_register_notify(struct chnl_object *chnl_obj,
u32 event_mask,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 493f62e..fe3abab 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -94,7 +94,7 @@ typedef int(*fxn_brd_setstate) (struct bridge_dev_context
* Bring board to the BRD_RUNNING (start) state.
* Parameters:
* hDevContext: Handle to Bridge driver defined device context.
- * dwDSPAddr: DSP address at which to start execution.
+ * dsp_addr: DSP address at which to start execution.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -108,7 +108,7 @@ typedef int(*fxn_brd_setstate) (struct bridge_dev_context
* else: Board state is indeterminate.
*/
typedef int(*fxn_brd_start) (struct bridge_dev_context
- * hDevContext, u32 dwDSPAddr);
+ * hDevContext, u32 dsp_addr);

/*
* ======== bridge_brd_mem_copy ========
@@ -142,7 +142,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* space. Unlike bridge_brd_write, this API does reset the DSP
* Parameters:
* hDevContext: Handle to Bridge driver defined device info.
- * dwDSPAddr: Address on DSP board (Destination).
+ * dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
@@ -158,7 +158,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* hDevContext,
IN u8 *pHostBuf,
- u32 dwDSPAddr, u32 ul_num_bytes,
+ u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);

/*
@@ -248,7 +248,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *hDevContext,
* Parameters:
* hDevContext: Handle to Bridge driver defined device info.
* pHostBuf: Pointer to host buffer (Destination).
- * dwDSPAddr: Address on DSP board (Source).
+ * dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP from which to transfer.
* Returns:
@@ -263,7 +263,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *hDevContext,
*/
typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
OUT u8 *pHostBuf,
- u32 dwDSPAddr,
+ u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
@@ -273,7 +273,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
* space.
* Parameters:
* hDevContext: Handle to Bridge driver defined device info.
- * dwDSPAddr: Address on DSP board (Destination).
+ * dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
@@ -288,7 +288,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
*/
typedef int(*fxn_brd_write) (struct bridge_dev_context *hDevContext,
IN u8 *pHostBuf,
- u32 dwDSPAddr,
+ u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
@@ -351,7 +351,7 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
* Parameters:
* hdeh_mgr: Handle to DEH manager object.
* ulEventMask: Indicate the type of exception
- * dwErrInfo: Error information
+ * error_info: Error information
* Returns:
*
* Requires:
@@ -360,7 +360,7 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
* Ensures:
*/
typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
- u32 ulEventMask, u32 dwErrInfo);
+ u32 ulEventMask, u32 error_info);

/*
* ======== bridge_chnl_open ========
@@ -483,7 +483,7 @@ typedef int(*fxn_chnl_addioreq) (struct chnl_object
* completed I/O request.
* Parameters:
* chnl_obj: Channel object handle.
- * dwTimeOut: A value of CHNL_IOCNOWAIT will simply dequeue the
+ * timeout: A value of CHNL_IOCNOWAIT will simply dequeue the
* first available IOC.
* pIOC: On output, contains host buffer address, bytes
* transferred, and status of I/O completion.
@@ -491,17 +491,17 @@ typedef int(*fxn_chnl_addioreq) (struct chnl_object
* Returns:
* 0: Success.
* -EFAULT: Invalid chnl_obj or pIOC.
- * -EREMOTEIO: CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
+ * -EREMOTEIO: CHNL_IOCNOWAIT was specified as the timeout parameter
* yet no I/O completions were queued.
* Requires:
- * dwTimeOut == CHNL_IOCNOWAIT.
+ * timeout == CHNL_IOCNOWAIT.
* Ensures:
* 0: if there are any remaining IOC's queued before this call
* returns, the channel event object will be left in a signalled
* state.
*/
typedef int(*fxn_chnl_getioc) (struct chnl_object *chnl_obj,
- u32 dwTimeOut,
+ u32 timeout,
OUT struct chnl_ioc *pIOC);

/*
@@ -532,7 +532,7 @@ typedef int(*fxn_chnl_cancelio) (struct chnl_object *chnl_obj);
* cancel all pending IO requests.
* Parameters:
* chnl_obj: Channel object handle.
- * dwTimeOut: Timeout value for flush operation.
+ * timeout: Timeout value for flush operation.
* Returns:
* 0: Success;
* S_CHNLIOREQUEST: Returned if any IORequests are in the output queue.
@@ -542,7 +542,7 @@ typedef int(*fxn_chnl_cancelio) (struct chnl_object *chnl_obj);
* 0: No I/O requests will be pending on this channel.
*/
typedef int(*fxn_chnl_flushio) (struct chnl_object *chnl_obj,
- u32 dwTimeOut);
+ u32 timeout);

/*
* ======== bridge_chnl_get_info ========
@@ -588,21 +588,21 @@ typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr
* ======== bridge_chnl_idle ========
* Purpose:
* Idle a channel. If this is an input channel, or if this is an output
- * channel and fFlush is TRUE, all currently enqueued buffers will be
+ * channel and flush_data is TRUE, all currently enqueued buffers will be
* dequeued (data discarded for output channel).
- * If this is an output channel and fFlush is FALSE, this function
+ * If this is an output channel and flush_data is FALSE, this function
* will block until all currently buffered data is output, or the timeout
* specified has been reached.
*
* Parameters:
* chnl_obj: Channel object handle.
- * dwTimeOut: If output channel and fFlush is FALSE, timeout value
+ * timeout: If output channel and flush_data is FALSE, timeout value
* to wait for buffers to be output. (Not used for
* input channel).
- * fFlush: If output channel and fFlush is TRUE, discard any
+ * flush_data: If output channel and flush_data is TRUE, discard any
* currently buffered data. If FALSE, wait for currently
* buffered data to be output, or timeout, whichever
- * occurs first. fFlush is ignored for input channel.
+ * occurs first. flush_data is ignored for input channel.
* Returns:
* 0: Success;
* -EFAULT: Invalid chnl_obj.
@@ -611,7 +611,7 @@ typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr
* Ensures:
*/
typedef int(*fxn_chnl_idle) (struct chnl_object *chnl_obj,
- u32 dwTimeOut, bool fFlush);
+ u32 timeout, bool flush_data);

/*
* ======== bridge_chnl_register_notify ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
index 4394711..ce8c936 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
@@ -41,7 +41,7 @@ extern int bridge_deh_register_notify(struct deh_mgr *deh_mgr,
struct dsp_notification *hnotification);

extern void bridge_deh_notify(struct deh_mgr *deh_mgr,
- u32 ulEventMask, u32 dwErrInfo);
+ u32 ulEventMask, u32 error_info);

extern void bridge_deh_release_dummy_mem(void);
#endif /* DSPDEH_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdrv.h b/drivers/staging/tidspbridge/include/dspbridge/dspdrv.h
index 2dd4f8b..8601b13 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdrv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdrv.h
@@ -28,17 +28,17 @@
* This function is called by Device Manager to de-initialize a device.
* This function is not called by applications.
* Parameters:
- * dwDeviceContext:Handle to the device context. The XXX_Init function
+ * device_context:Handle to the device context. The XXX_Init function
* creates and returns this identifier.
* Returns:
* TRUE indicates the device successfully de-initialized. Otherwise it
* returns FALSE.
* Requires:
- * dwDeviceContext!= NULL. For a built in device this should never
+ * device_context!= NULL. For a built in device this should never
* get called.
* Ensures:
*/
-extern bool dsp_deinit(u32 dwDeviceContext);
+extern bool dsp_deinit(u32 device_context);

/*
* ======== dsp_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 3ffd542..fa63820 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -270,22 +270,22 @@ extern int io_sh_msetting(struct io_mgr *hio_mgr, u8 desc, void *pargs);
/* Maximum channel bufsize that can be used. */
extern u32 io_buf_size(struct io_mgr *hio_mgr);

-extern u32 io_read_value(struct bridge_dev_context *hDevContext, u32 dwDSPAddr);
+extern u32 io_read_value(struct bridge_dev_context *hDevContext, u32 dsp_addr);

extern void io_write_value(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr, u32 dwValue);
+ u32 dsp_addr, u32 value);

extern u32 io_read_value_long(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr);
+ u32 dsp_addr);

extern void io_write_value_long(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr, u32 dwValue);
+ u32 dsp_addr, u32 value);

extern void io_or_set_value(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr, u32 dwValue);
+ u32 dsp_addr, u32 value);

extern void io_and_set_value(struct bridge_dev_context *hDevContext,
- u32 dwDSPAddr, u32 dwValue);
+ u32 dsp_addr, u32 value);

extern void io_intr_dsp2(IN struct io_mgr *pio_mgr, IN u16 mb_val);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/rmm.h b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
index d36a8c3..468d8d8 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/rmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
@@ -56,10 +56,10 @@ struct rmm_target_obj;
* segid - Memory segment to allocate from.
* size - Size (target MAUS) to allocate.
* align - alignment.
- * dspAddr - If reserve is FALSE, the location to store allocated
+ * dsp_address - If reserve is FALSE, the location to store allocated
* address on output, otherwise, the DSP address to
* reserve.
- * reserve - If TRUE, reserve the memory specified by dspAddr.
+ * reserve - If TRUE, reserve the memory specified by dsp_address.
* Returns:
* 0: Success.
* -ENOMEM: Memory allocation on GPP failed.
@@ -68,13 +68,13 @@ struct rmm_target_obj;
* Requires:
* RMM initialized.
* Valid target.
- * dspAddr != NULL.
+ * dsp_address != NULL.
* size > 0
* reserve || target->num_segs > 0.
* Ensures:
*/
extern int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
- u32 align, u32 *dspAdr, bool reserve);
+ u32 align, u32 *dsp_adr, bool reserve);

/*
* ======== rmm_create ========
@@ -133,7 +133,7 @@ extern void rmm_exit(void);
* Parameters:
* target: - Target returned from rmm_create().
* segid: - Segment of memory to free.
- * dspAddr: - Address to free or unreserve.
+ * dsp_address: - Address to free or unreserve.
* size: - Size of memory to free or unreserve.
* reserved: - TRUE if memory was reserved only, otherwise FALSE.
* Returns:
@@ -141,10 +141,10 @@ extern void rmm_exit(void);
* RMM initialized.
* Valid target.
* reserved || segid < target->num_segs.
- * reserve || [dspAddr, dspAddr + size] is a valid memory range.
+ * reserve || [dsp_address, dsp_address + size] is a valid memory range.
* Ensures:
*/
-extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dspAddr,
+extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_address,
u32 size, bool reserved);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/strm.h b/drivers/staging/tidspbridge/include/dspbridge/strm.h
index b85a460..2ac630d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/strm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/strm.h
@@ -187,16 +187,16 @@ extern int strm_get_info(struct strm_object *hStrm,
* ======== strm_idle ========
* Purpose:
* Idle a stream and optionally flush output data buffers.
- * If this is an output stream and fFlush is TRUE, all data currently
+ * If this is an output stream and flush_data is TRUE, all data currently
* enqueued will be discarded.
- * If this is an output stream and fFlush is FALSE, this function
+ * If this is an output stream and flush_data is FALSE, this function
* will block until all currently buffered data is output, or the timeout
* specified has been reached.
* After a successful call to strm_idle(), all buffers can immediately
* be reclaimed.
* Parameters:
* hStrm: Stream handle returned from strm_open().
- * fFlush: If TRUE, discard output buffers.
+ * flush_data: If TRUE, discard output buffers.
* Returns:
* 0: Success.
* -EFAULT: Invalid hStrm.
@@ -206,7 +206,7 @@ extern int strm_get_info(struct strm_object *hStrm,
* strm_init(void) called.
* Ensures:
*/
-extern int strm_idle(struct strm_object *hStrm, bool fFlush);
+extern int strm_idle(struct strm_object *hStrm, bool flush_data);

/*
* ======== strm_init ========
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 711d206..b302db5 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -538,7 +538,7 @@ bool cmm_init(void)
*/
int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
u32 dw_gpp_base_pa, u32 ul_size,
- u32 dwDSPAddrOffset, s8 c_factor,
+ u32 dsp_addr_offset, s8 c_factor,
u32 dw_dsp_base, u32 ul_dsp_size,
u32 *pulSegId, u32 dw_gpp_base_va)
{
@@ -554,9 +554,9 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
DBC_REQUIRE(dw_gpp_base_va != 0);
DBC_REQUIRE((c_factor <= CMM_ADDTODSPPA) &&
(c_factor >= CMM_SUBFROMDSPPA));
- dev_dbg(bridge, "%s: dw_gpp_base_pa %x ul_size %x dwDSPAddrOffset %x "
+ dev_dbg(bridge, "%s: dw_gpp_base_pa %x ul_size %x dsp_addr_offset %x "
"dw_dsp_base %x ul_dsp_size %x dw_gpp_base_va %x\n", __func__,
- dw_gpp_base_pa, ul_size, dwDSPAddrOffset, dw_dsp_base,
+ dw_gpp_base_pa, ul_size, dsp_addr_offset, dw_dsp_base,
ul_dsp_size, dw_gpp_base_va);
if (!hcmm_mgr) {
status = -EFAULT;
@@ -586,7 +586,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
psma->shm_base = dw_gpp_base_pa; /* SM Base phys */
psma->ul_sm_size = ul_size; /* SM segment size in bytes */
psma->dw_vm_base = dw_gpp_base_va;
- psma->dw_dsp_phys_addr_offset = dwDSPAddrOffset;
+ psma->dw_dsp_phys_addr_offset = dsp_addr_offset;
psma->c_factor = c_factor;
psma->dw_dsp_base = dw_dsp_base;
psma->ul_dsp_size = ul_dsp_size;
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index 7195415..1bcd403 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -80,7 +80,7 @@ static void delete_disp(struct disp_object *disp_obj);
static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset,
struct node_strmdef strm_def, u32 max,
u32 chars_in_rms_word);
-static int send_message(struct disp_object *disp_obj, u32 dwTimeout,
+static int send_message(struct disp_object *disp_obj, u32 timeout,
u32 ul_bytes, OUT u32 *pdw_arg);

/*
@@ -686,7 +686,7 @@ static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset,
* ======== send_message ======
* Send command message to RMS, get reply from RMS.
*/
-static int send_message(struct disp_object *disp_obj, u32 dwTimeout,
+static int send_message(struct disp_object *disp_obj, u32 timeout,
u32 ul_bytes, u32 *pdw_arg)
{
struct bridge_drv_interface *intf_fxns;
@@ -710,7 +710,7 @@ static int send_message(struct disp_object *disp_obj, u32 dwTimeout,
goto func_end;

status =
- (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, dwTimeout, &chnl_ioc_obj);
+ (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) {
if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
if (CHNL_IS_TIMED_OUT(chnl_ioc_obj))
@@ -731,7 +731,7 @@ static int send_message(struct disp_object *disp_obj, u32 dwTimeout,
goto func_end;

status =
- (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, dwTimeout, &chnl_ioc_obj);
+ (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) {
if (CHNL_IS_TIMED_OUT(chnl_ioc_obj)) {
status = -ETIME;
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index d0138af..4a55e84 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -291,7 +291,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo,
bool *pExists, u32 addr, u32 bytes);
-static s32 fake_ovly_write(void *handle, u32 dspAddr, void *buf, u32 bytes,
+static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype);
static void free_sects(struct nldr_object *nldr_obj,
struct ovly_sect *phase_sects, u16 alloc_num);
@@ -305,9 +305,10 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
static int remote_alloc(void **pRef, u16 mem_sect_type, u32 size,
- u32 align, u32 *dspAddr, OPTIONAL s32 segmentId,
+ u32 align, u32 *dsp_address,
+ OPTIONAL s32 segmentId,
OPTIONAL s32 req, bool reserve);
-static int remote_free(void **pRef, u16 space, u32 dspAddr, u32 size,
+static int remote_free(void **pRef, u16 space, u32 dsp_address, u32 size,
bool reserve);

static void unload_lib(struct nldr_nodeobject *nldr_node_obj,
@@ -1125,7 +1126,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
/*
* ======== fake_ovly_write ========
*/
-static s32 fake_ovly_write(void *handle, u32 dspAddr, void *buf, u32 bytes,
+static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype)
{
return (s32) bytes;
@@ -1623,7 +1624,7 @@ func_end:
* ======== remote_alloc ========
*/
static int remote_alloc(void **pRef, u16 space, u32 size,
- u32 align, u32 *dspAddr,
+ u32 align, u32 *dsp_address,
OPTIONAL s32 segmentId, OPTIONAL s32 req,
bool reserve)
{
@@ -1635,7 +1636,7 @@ static int remote_alloc(void **pRef, u16 space, u32 size,
u16 i;
u16 mem_sect_type;
u32 word_size;
- struct rmm_addr *rmm_addr_obj = (struct rmm_addr *)dspAddr;
+ struct rmm_addr *rmm_addr_obj = (struct rmm_addr *)dsp_address;
bool mem_load_req = false;
int status = -ENOMEM; /* Set to fail */
DBC_REQUIRE(hnode);
@@ -1693,7 +1694,7 @@ static int remote_alloc(void **pRef, u16 space, u32 size,
/* Attempt to allocate from segid first. */
rmm_addr_obj->segid = segid;
status =
- rmm_alloc(rmm, segid, word_size, align, dspAddr, false);
+ rmm_alloc(rmm, segid, word_size, align, dsp_address, false);
if (DSP_FAILED(status)) {
dev_dbg(bridge, "%s: Unable allocate from segment %d\n",
__func__, segid);
@@ -1710,8 +1711,8 @@ static int remote_alloc(void **pRef, u16 space, u32 size,
mem_sect_type)
continue;

- status = rmm_alloc(rmm, i, word_size, align, dspAddr,
- false);
+ status = rmm_alloc(rmm, i, word_size, align,
+ dsp_address, false);
if (DSP_SUCCEEDED(status)) {
/* Save segid for freeing later */
rmm_addr_obj->segid = i;
@@ -1730,8 +1731,8 @@ func_cont:
mem_sect_type)
continue;

- status = rmm_alloc(rmm, i, word_size, align, dspAddr,
- false);
+ status = rmm_alloc(rmm, i, word_size, align,
+ dsp_address, false);
if (DSP_SUCCEEDED(status)) {
/* Save segid */
rmm_addr_obj->segid = i;
@@ -1743,7 +1744,7 @@ func_cont:
return status;
}

-static int remote_free(void **pRef, u16 space, u32 dspAddr,
+static int remote_free(void **pRef, u16 space, u32 dsp_address,
u32 size, bool reserve)
{
struct nldr_object *nldr_obj = (struct nldr_object *)pRef;
@@ -1760,7 +1761,7 @@ static int remote_free(void **pRef, u16 space, u32 dspAddr,
(size + nldr_obj->us_dsp_word_size -
1) / nldr_obj->us_dsp_word_size;

- if (rmm_free(rmm, space, dspAddr, word_size, reserve))
+ if (rmm_free(rmm, space, dsp_address, word_size, reserve))
status = 0;

return status;
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index c5a8b6b..818a050 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -389,18 +389,18 @@ func_end:

static int get_exec_file(struct cfg_devnode *dev_node_obj,
struct dev_object *hdev_obj,
- u32 size, char *execFile)
+ u32 size, char *exec_file)
{
u8 dev_type;
s32 len;

dev_get_dev_type(hdev_obj, (u8 *) &dev_type);
if (dev_type == DSP_UNIT) {
- return cfg_get_exec_file(dev_node_obj, size, execFile);
+ return cfg_get_exec_file(dev_node_obj, size, exec_file);
} else if (dev_type == IVA_UNIT) {
if (iva_img) {
len = strlen(iva_img);
- strncpy(execFile, iva_img, len + 1);
+ strncpy(exec_file, iva_img, len + 1);
return 0;
}
}
diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c
index ff33080..96c61dd 100644
--- a/drivers/staging/tidspbridge/rmgr/rmm.c
+++ b/drivers/staging/tidspbridge/rmgr/rmm.c
@@ -84,7 +84,7 @@ struct rmm_target_obj {
static u32 refs; /* module reference count */

static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size,
- u32 align, u32 *dspAddr);
+ u32 align, u32 *dsp_address);
static bool free_block(struct rmm_target_obj *target, u32 segid, u32 addr,
u32 size);

@@ -92,7 +92,7 @@ static bool free_block(struct rmm_target_obj *target, u32 segid, u32 addr,
* ======== rmm_alloc ========
*/
int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
- u32 align, u32 *dspAddr, bool reserve)
+ u32 align, u32 *dsp_address, bool reserve)
{
struct rmm_ovly_sect *sect;
struct rmm_ovly_sect *prev_sect = NULL;
@@ -101,13 +101,13 @@ int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
int status = 0;

DBC_REQUIRE(target);
- DBC_REQUIRE(dspAddr != NULL);
+ DBC_REQUIRE(dsp_address != NULL);
DBC_REQUIRE(size > 0);
DBC_REQUIRE(reserve || (target->num_segs > 0));
DBC_REQUIRE(refs > 0);

if (!reserve) {
- if (!alloc_block(target, segid, size, align, dspAddr)) {
+ if (!alloc_block(target, segid, size, align, dsp_address)) {
status = -ENOMEM;
} else {
/* Increment the number of allocated blocks in this
@@ -118,7 +118,7 @@ int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
}
/* An overlay section - See if block is already in use. If not,
* insert into the list in ascending address size. */
- addr = *dspAddr;
+ addr = *dsp_address;
sect = (struct rmm_ovly_sect *)lst_first(target->ovly_list);
/* Find place to insert new list element. List is sorted from
* smallest to largest address. */
@@ -419,7 +419,7 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,
* first.
*/
static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size,
- u32 align, u32 *dspAddr)
+ u32 align, u32 *dsp_address)
{
struct rmm_header *head;
struct rmm_header *prevhead = NULL;
@@ -460,7 +460,7 @@ static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size,
if (tmpalign)
free_block(target, segid, addr, tmpalign);

- *dspAddr = addr + tmpalign;
+ *dsp_address = addr + tmpalign;
return true;
}

diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index e537ee8..ffacfd4 100644
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -373,7 +373,7 @@ func_end:
* Purpose:
* Idles a particular stream.
*/
-int strm_idle(struct strm_object *hStrm, bool fFlush)
+int strm_idle(struct strm_object *hStrm, bool flush_data)
{
struct bridge_drv_interface *intf_fxns;
int status = 0;
@@ -386,11 +386,12 @@ int strm_idle(struct strm_object *hStrm, bool fFlush)
intf_fxns = hStrm->strm_mgr_obj->intf_fxns;

status = (*intf_fxns->pfn_chnl_idle) (hStrm->chnl_obj,
- hStrm->utimeout, fFlush);
+ hStrm->utimeout,
+ flush_data);
}

- dev_dbg(bridge, "%s: hStrm: %p fFlush: 0x%x status: 0x%x\n",
- __func__, hStrm, fFlush, status);
+ dev_dbg(bridge, "%s: hStrm: %p flush_data: 0x%x status: 0x%x\n",
+ __func__, hStrm, flush_data, status);
return status;
}

diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 8ae64f4..243fea9 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -197,7 +197,7 @@ bool cfg_init(void)
* Purpose:
* Store the Device Object handle and dev_node pointer for a given devnode.
*/
-int cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 dwValue)
+int cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 value)
{
int status = 0;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
@@ -214,7 +214,7 @@ int cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 dwValue)
/* Store the Bridge device object in the Registry */

if (!(strcmp((char *)dev_node_obj, "TIOMAP1510")))
- drv_datap->dev_object = (void *) dwValue;
+ drv_datap->dev_object = (void *) value;
}
if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
@@ -227,7 +227,7 @@ int cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 dwValue)
* Purpose:
* Store the Driver Object handle
*/
-int cfg_set_object(u32 dwValue, u8 dw_type)
+int cfg_set_object(u32 value, u8 dw_type)
{
int status = -EINVAL;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
@@ -237,11 +237,11 @@ int cfg_set_object(u32 dwValue, u8 dw_type)

switch (dw_type) {
case (REG_DRV_OBJECT):
- drv_datap->drv_object = (void *)dwValue;
+ drv_datap->drv_object = (void *)value;
status = 0;
break;
case (REG_MGR_OBJECT):
- drv_datap->mgr_object = (void *)dwValue;
+ drv_datap->mgr_object = (void *)value;
status = 0;
break;
default:
--
1.6.3.3

2010-07-08 23:14:45

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 07/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
phDevContext to device_ctx
phDevNode to dev_nde
phDevObject to device_obj
phDispObject to dispatch_obj
phDmmMgr to dmm_manager
phDrvObject to drv_obj
phDRVObject to drv_obj
phIOMgr to io_man
phLoader to loader
phManager to manager
phMgrObject to mgr_obj
phMgr to mgr
phMsgMgr to msg_man
phMsgQueue to msgq
phNldrNode to nldr_nodeobj
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 10 +-
drivers/staging/tidspbridge/core/msg_sm.c | 16 ++--
.../staging/tidspbridge/include/dspbridge/cfg.h | 2 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 10 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 82 ++++++++++----------
.../staging/tidspbridge/include/dspbridge/disp.h | 10 +-
.../staging/tidspbridge/include/dspbridge/dmm.h | 4 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 18 ++--
.../tidspbridge/include/dspbridge/dspdefs.h | 26 +++---
.../staging/tidspbridge/include/dspbridge/dspio.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dspmsg.h | 4 +-
drivers/staging/tidspbridge/include/dspbridge/io.h | 4 +-
.../staging/tidspbridge/include/dspbridge/mgr.h | 6 +-
.../staging/tidspbridge/include/dspbridge/msg.h | 6 +-
.../staging/tidspbridge/include/dspbridge/nldr.h | 2 +-
.../tidspbridge/include/dspbridge/nldrdefs.h | 10 +-
.../staging/tidspbridge/include/dspbridge/proc.h | 14 ++--
drivers/staging/tidspbridge/pmgr/cod.c | 14 ++--
drivers/staging/tidspbridge/pmgr/dev.c | 74 +++++++++---------
drivers/staging/tidspbridge/pmgr/dmm.c | 14 ++--
drivers/staging/tidspbridge/pmgr/io.c | 8 +-
drivers/staging/tidspbridge/pmgr/msg.c | 8 +-
drivers/staging/tidspbridge/rmgr/disp.c | 12 ++--
drivers/staging/tidspbridge/rmgr/drv.c | 14 ++--
drivers/staging/tidspbridge/rmgr/mgr.c | 6 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 12 ++--
drivers/staging/tidspbridge/rmgr/proc.c | 12 ++--
27 files changed, 200 insertions(+), 200 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 19c4cc7..e92cc1e 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -161,7 +161,7 @@ static int register_shm_segs(struct io_mgr *hio_mgr,
* ======== bridge_io_create ========
* Create an IO manager object.
*/
-int bridge_io_create(OUT struct io_mgr **phIOMgr,
+int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs)
{
@@ -174,7 +174,7 @@ int bridge_io_create(OUT struct io_mgr **phIOMgr,
u8 dev_type;

/* Check requirements */
- if (!phIOMgr || !pMgrAttrs || pMgrAttrs->word_size == 0) {
+ if (!io_man || !pMgrAttrs || pMgrAttrs->word_size == 0) {
status = -EFAULT;
goto func_end;
}
@@ -243,12 +243,12 @@ func_end:
if (DSP_FAILED(status)) {
/* Cleanup */
bridge_io_destroy(pio_mgr);
- if (phIOMgr)
- *phIOMgr = NULL;
+ if (io_man)
+ *io_man = NULL;
} else {
/* Return IO manager object to caller... */
hchnl_mgr->hio_mgr = pio_mgr;
- *phIOMgr = pio_mgr;
+ *io_man = pio_mgr;
}
return status;
}
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c b/drivers/staging/tidspbridge/core/msg_sm.c
index 0a68df9..22e1898 100644
--- a/drivers/staging/tidspbridge/core/msg_sm.c
+++ b/drivers/staging/tidspbridge/core/msg_sm.c
@@ -48,7 +48,7 @@ static void free_msg_list(struct lst_list *msg_list);
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
*/
-int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
+int bridge_msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback)
{
@@ -56,7 +56,7 @@ int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
struct io_mgr *hio_mgr;
int status = 0;

- if (!phMsgMgr || !msg_callback || !hdev_obj) {
+ if (!msg_man || !msg_callback || !hdev_obj) {
status = -EFAULT;
goto func_end;
}
@@ -65,7 +65,7 @@ int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
status = -EFAULT;
goto func_end;
}
- *phMsgMgr = NULL;
+ *msg_man = NULL;
/* Allocate msg_ctrl manager object */
msg_mgr_obj = kzalloc(sizeof(struct msg_mgr), GFP_KERNEL);

@@ -103,7 +103,7 @@ int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
sync_init_event(msg_mgr_obj->sync_event);

if (DSP_SUCCEEDED(status))
- *phMsgMgr = msg_mgr_obj;
+ *msg_man = msg_mgr_obj;
else
delete_msg_mgr(msg_mgr_obj);

@@ -120,7 +120,7 @@ func_end:
* on the DSP.
*/
int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue,
+ OUT struct msg_queue **msgq,
u32 msgq_id, u32 max_msgs, void *arg)
{
u32 i;
@@ -128,12 +128,12 @@ int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
struct msg_queue *msg_q;
int status = 0;

- if (!hmsg_mgr || phMsgQueue == NULL || !hmsg_mgr->msg_free_list) {
+ if (!hmsg_mgr || msgq == NULL || !hmsg_mgr->msg_free_list) {
status = -EFAULT;
goto func_end;
}

- *phMsgQueue = NULL;
+ *msgq = NULL;
/* Allocate msg_queue object */
msg_q = kzalloc(sizeof(struct msg_queue), GFP_KERNEL);
if (!msg_q) {
@@ -217,7 +217,7 @@ int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
} else {
lst_put_tail(hmsg_mgr->queue_list,
(struct list_head *)msg_q);
- *phMsgQueue = msg_q;
+ *msgq = msg_q;
/* Signal that free frames are now available */
if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list))
sync_set_event(hmsg_mgr->sync_event);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 29f9024..6fdd229 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -82,7 +82,7 @@ extern int cfg_get_cd_version(OUT u32 *version);
* value: Ptr to location to store the value.
* Returns:
* 0: Success.
- * -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
+ * -EFAULT: dev_node_obj is invalid or device_obj is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 92f3cf7..63bb874 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -77,7 +77,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* Symbol table information is managed by this object and can be retrieved
* using the cod_get_sym_value() function.
* Parameters:
- * phManager: created manager object
+ * manager: created manager object
* pstrZLFile: ZL DLL filename, of length < COD_MAXPATHLENGTH.
* attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used.
@@ -91,7 +91,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* pstrZLFile != NULL
* Ensures:
*/
-extern int cod_create(OUT struct cod_manager **phManager,
+extern int cod_create(OUT struct cod_manager **manager,
char *pstrZLFile,
IN OPTIONAL CONST struct cod_attrs *attrs);

@@ -187,17 +187,17 @@ extern int cod_get_entry(struct cod_manager *cod_mgr_obj,
* Get handle to the DBL loader.
* Parameters:
* cod_mgr_obj: handle of manager to be deleted
- * phLoader: location to store loader handle on output.
+ * loader: location to store loader handle on output.
* Returns:
* 0: Success.
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * phLoader != NULL.
+ * loader != NULL.
* Ensures:
*/
extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
- struct dbll_tar_obj **phLoader);
+ struct dbll_tar_obj **loader);

/*
* ======== cod_get_section ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 3d7a08a..68aa0b1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -64,7 +64,7 @@ extern u32 dev_brd_write_fxn(void *arb,
* Called by the operating system to load the Bridge Driver for a
* 'Bridge device.
* Parameters:
- * phDevObject: Ptr to location to receive the device object handle.
+ * device_obj: Ptr to location to receive the device object handle.
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
@@ -80,17 +80,17 @@ extern u32 dev_brd_write_fxn(void *arb,
* -ESPIPE: Unable to load ZL DLL.
* Requires:
* DEV Initialized.
- * phDevObject != NULL.
+ * device_obj != NULL.
* driver_file_name != NULL.
* pHostConfig != NULL.
* pDspConfig != NULL.
* Ensures:
- * 0: *phDevObject will contain handle to the new device object.
+ * 0: *device_obj will contain handle to the new device object.
* Otherwise, does not create the device object, ensures the Bridge driver
- * module is unloaded, and sets *phDevObject to NULL.
+ * module is unloaded, and sets *device_obj to NULL.
*/
extern int dev_create_device(OUT struct dev_object
- **phDevObject,
+ **device_obj,
IN CONST char *driver_file_name,
struct cfg_devnode *dev_node_obj);

@@ -99,7 +99,7 @@ extern int dev_create_device(OUT struct dev_object
* Purpose:
* Called by the operating system to load the Bridge Driver for IVA.
* Parameters:
- * phDevObject: Ptr to location to receive the device object handle.
+ * device_obj: Ptr to location to receive the device object handle.
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
@@ -115,17 +115,17 @@ extern int dev_create_device(OUT struct dev_object
* -ESPIPE: Unable to load ZL DLL.
* Requires:
* DEV Initialized.
- * phDevObject != NULL.
+ * device_obj != NULL.
* driver_file_name != NULL.
* pHostConfig != NULL.
* pDspConfig != NULL.
* Ensures:
- * 0: *phDevObject will contain handle to the new device object.
+ * 0: *device_obj will contain handle to the new device object.
* Otherwise, does not create the device object, ensures the Bridge driver
- * module is unloaded, and sets *phDevObject to NULL.
+ * module is unloaded, and sets *device_obj to NULL.
*/
extern int dev_create_iva_device(OUT struct dev_object
- **phDevObject,
+ **device_obj,
IN CONST char *driver_file_name,
IN CONST struct cfg_hostres
*pHostConfig,
@@ -195,20 +195,20 @@ extern int dev_destroy_device(struct dev_object
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_chnl_mgr(struct dev_object *hdev_obj,
- OUT struct chnl_mgr **phMgr);
+ OUT struct chnl_mgr **mgr);

/*
* ======== dev_get_cmm_mgr ========
@@ -218,20 +218,20 @@ extern int dev_get_chnl_mgr(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_cmm_mgr(struct dev_object *hdev_obj,
- OUT struct cmm_object **phMgr);
+ OUT struct cmm_object **mgr);

/*
* ======== dev_get_dmm_mgr ========
@@ -241,20 +241,20 @@ extern int dev_get_cmm_mgr(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_dmm_mgr(struct dev_object *hdev_obj,
- OUT struct dmm_object **phMgr);
+ OUT struct dmm_object **mgr);

/*
* ======== dev_get_cod_mgr ========
@@ -304,19 +304,19 @@ extern int dev_get_deh_mgr(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * phDevNode: Ptr to location to get the device node handle.
+ * dev_nde: Ptr to location to get the device node handle.
* Returns:
* 0: Returns a DEVNODE in *dev_node_obj.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDevNode != NULL.
+ * dev_nde != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phDevNode contains a platform specific device ID;
- * else: *phDevNode is NULL.
+ * 0: *dev_nde contains a platform specific device ID;
+ * else: *dev_nde is NULL.
*/
extern int dev_get_dev_node(struct dev_object *hdev_obj,
- OUT struct cfg_devnode **phDevNode);
+ OUT struct cfg_devnode **dev_nde);

/*
* ======== dev_get_dev_type ========
@@ -325,16 +325,16 @@ extern int dev_get_dev_node(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * phDevNode: Ptr to location to get the device node handle.
+ * dev_nde: Ptr to location to get the device node handle.
* Returns:
* 0: Success
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDevNode != NULL.
+ * dev_nde != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phDevNode contains a platform specific device ID;
- * else: *phDevNode is NULL.
+ * 0: *dev_nde contains a platform specific device ID;
+ * else: *dev_nde is NULL.
*/
extern int dev_get_dev_type(struct dev_object *device_obj,
u8 *dev_type);
@@ -389,19 +389,19 @@ extern int dev_get_intf_fxns(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to an IO manager object.
- * else: *phMgr is NULL.
+ * 0: *mgr contains a handle to an IO manager object.
+ * else: *mgr is NULL.
*/
extern int dev_get_io_mgr(struct dev_object *hdev_obj,
- OUT struct io_mgr **phMgr);
+ OUT struct io_mgr **mgr);

/*
* ======== dev_get_next ========
@@ -434,7 +434,7 @@ extern struct dev_object *dev_get_next(struct dev_object
* Retrieve the msg_ctrl Manager Handle from the DevObject.
* Parameters:
* hdev_obj: Handle to the Dev Object
- * phMsgMgr: Location where msg_ctrl Manager handle will be returned.
+ * msg_man: Location where msg_ctrl Manager handle will be returned.
* Returns:
* Requires:
* DEV Initialized.
@@ -443,7 +443,7 @@ extern struct dev_object *dev_get_next(struct dev_object
* Ensures:
*/
extern void dev_get_msg_mgr(struct dev_object *hdev_obj,
- OUT struct msg_mgr **phMsgMgr);
+ OUT struct msg_mgr **msg_man);

/*
* ========= dev_get_node_manager ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 59fb431..03467bb 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -32,7 +32,7 @@
* Manager object should have exactly one NODE Dispatcher.
*
* Parameters:
- * phDispObject: Location to store node dispatcher object on output.
+ * dispatch_obj: Location to store node dispatcher object on output.
* hdev_obj: Device for this processor.
* disp_attrs: Node dispatcher attributes.
* Returns:
@@ -43,12 +43,12 @@
* disp_init(void) called.
* disp_attrs != NULL.
* hdev_obj != NULL.
- * phDispObject != NULL.
+ * dispatch_obj != NULL.
* Ensures:
- * 0: IS_VALID(*phDispObject).
- * error: *phDispObject == NULL.
+ * 0: IS_VALID(*dispatch_obj).
+ * error: *dispatch_obj == NULL.
*/
-extern int disp_create(OUT struct disp_object **phDispObject,
+extern int disp_create(OUT struct disp_object **dispatch_obj,
struct dev_object *hdev_obj,
IN CONST struct disp_attr *disp_attrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dmm.h b/drivers/staging/tidspbridge/include/dspbridge/dmm.h
index 1ce1b65..9be892f 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dmm.h
@@ -39,7 +39,7 @@ struct dmm_mgrattrs {
*/

extern int dmm_get_handle(void *hprocessor,
- OUT struct dmm_object **phDmmMgr);
+ OUT struct dmm_object **dmm_manager);

extern int dmm_reserve_memory(struct dmm_object *dmm_mgr,
u32 size, u32 *prsv_addr);
@@ -57,7 +57,7 @@ extern int dmm_destroy(struct dmm_object *dmm_mgr);

extern int dmm_delete_tables(struct dmm_object *dmm_mgr);

-extern int dmm_create(OUT struct dmm_object **phDmmMgr,
+extern int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
IN CONST struct dmm_mgrattrs *pMgrAttrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index fb8afe4..91725c8 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -183,16 +183,16 @@ struct process_context {
* Creates the Driver Object. This is done during the driver loading.
* There is only one Driver Object in the DSP/BIOS Bridge.
* Parameters:
- * phDrvObject: Location to store created DRV Object handle.
+ * drv_obj: Location to store created DRV Object handle.
* Returns:
* 0: Sucess
* -ENOMEM: Failed in Memory allocation
* -EPERM: General Failure
* Requires:
* DRV Initialized (refs > 0 )
- * phDrvObject != NULL.
+ * drv_obj != NULL.
* Ensures:
- * 0: - *phDrvObject is a valid DRV interface to the device.
+ * 0: - *drv_obj is a valid DRV interface to the device.
* - List of DevObject Created and Initialized.
* - List of dev_node String created and intialized.
* - Registry is updated with the DRV Object.
@@ -204,7 +204,7 @@ struct process_context {
* Also it can hold other neccessary
* information in its storage area.
*/
-extern int drv_create(struct drv_object **phDrvObject);
+extern int drv_create(struct drv_object **drv_obj);

/*
* ======== drv_destroy ========
@@ -274,23 +274,23 @@ extern u32 drv_get_first_dev_extension(void);
* Given a index, returns a handle to DevObject from the list
* Parameters:
* hdrv_obj: Handle to the Manager
- * phDevObject: Location to store the Dev Handle
+ * device_obj: Location to store the Dev Handle
* Requires:
* DRV Initialized
* index >= 0
* hdrv_obj is not NULL and Valid DRV Object
- * phDevObject is not NULL
+ * device_obj is not NULL
* Device Object List not Empty
* Returns:
* 0: Success
* -EPERM: Failed to Get the Dev Object
* Ensures:
- * 0: *phDevObject != NULL
- * -EPERM: *phDevObject = NULL
+ * 0: *device_obj != NULL
+ * -EPERM: *device_obj = NULL
*/
extern int drv_get_dev_object(u32 index,
struct drv_object *hdrv_obj,
- struct dev_object **phDevObject);
+ struct dev_object **device_obj);

/*
* ======== drv_get_next_dev_object ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 9fda242..d11ec63 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -648,7 +648,7 @@ typedef int(*fxn_chnl_registernotify)
* Purpose:
* Complete creation of the device object for this board.
* Parameters:
- * phDevContext: Ptr to location to store a Bridge device context.
+ * device_ctx: Ptr to location to store a Bridge device context.
* hdev_obj: Handle to a Device Object, created and managed by DSP API.
* config_param: Ptr to configuration parameters provided by the
* Configuration Manager during device loading.
@@ -658,7 +658,7 @@ typedef int(*fxn_chnl_registernotify)
* 0: Success.
* -ENOMEM: Unable to allocate memory for device context.
* Requires:
- * phDevContext != NULL;
+ * device_ctx != NULL;
* hdev_obj != NULL;
* config_param != NULL;
* pDspConfig != NULL;
@@ -680,7 +680,7 @@ typedef int(*fxn_chnl_registernotify)
* structure.
*/
typedef int(*fxn_dev_create) (OUT struct bridge_dev_context
- **phDevContext,
+ **device_ctx,
struct dev_object
* hdev_obj,
IN struct cfg_hostres
@@ -799,7 +799,7 @@ typedef int(*fxn_deh_getinfo) (struct deh_mgr *deh_manager,
* Purpose:
* Create an object that manages I/O between CHNL and msg_ctrl.
* Parameters:
- * phIOMgr: Location to store IO manager on output.
+ * io_man: Location to store IO manager on output.
* hchnl_mgr: Handle to channel manager.
* hmsg_mgr: Handle to message manager.
* Returns:
@@ -811,10 +811,10 @@ typedef int(*fxn_deh_getinfo) (struct deh_mgr *deh_manager,
* Channel manager already created;
* Message manager already created;
* pMgrAttrs != NULL;
- * phIOMgr != NULL;
+ * io_man != NULL;
* Ensures:
*/
-typedef int(*fxn_io_create) (OUT struct io_mgr **phIOMgr,
+typedef int(*fxn_io_create) (OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);

@@ -875,20 +875,20 @@ typedef int(*fxn_io_getprocload) (struct io_mgr *hio_mgr,
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
* Parameters:
- * phMsgMgr: Location to store msg_ctrl manager on output.
+ * msg_man: Location to store msg_ctrl manager on output.
* hdev_obj: Handle to a device object.
* msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* 0: Success.
* -ENOMEM: Insufficient memory.
* Requires:
- * phMsgMgr != NULL.
+ * msg_man != NULL.
* msg_callback != NULL.
* hdev_obj != NULL.
* Ensures:
*/
typedef int(*fxn_msg_create)
- (OUT struct msg_mgr **phMsgMgr,
+ (OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj, msg_onexit msg_callback);

/*
@@ -899,7 +899,7 @@ typedef int(*fxn_msg_create)
* Parameters:
* hmsg_mgr: msg_ctrl queue manager handle returned from
* bridge_msg_create.
- * phMsgQueue: Location to store msg_ctrl queue on output.
+ * msgq: Location to store msg_ctrl queue on output.
* msgq_id: Identifier for messages (node environment pointer).
* max_msgs: Max number of simultaneous messages for the node.
* h: Handle passed to hmsg_mgr->msg_callback().
@@ -907,15 +907,15 @@ typedef int(*fxn_msg_create)
* 0: Success.
* -ENOMEM: Insufficient memory.
* Requires:
- * phMsgQueue != NULL.
+ * msgq != NULL.
* h != NULL.
* max_msgs > 0.
* Ensures:
- * phMsgQueue !=NULL <==> 0.
+ * msgq !=NULL <==> 0.
*/
typedef int(*fxn_msg_createqueue)
(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue, u32 msgq_id, u32 max_msgs, void *h);
+ OUT struct msg_queue **msgq, u32 msgq_id, u32 max_msgs, void *h);

/*
* ======== bridge_msg_delete ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspio.h b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
index 275697a..7b33563 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspio.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
@@ -26,7 +26,7 @@
#include <dspbridge/devdefs.h>
#include <dspbridge/iodefs.h>

-extern int bridge_io_create(OUT struct io_mgr **phIOMgr,
+extern int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
index 18f56e1..a40b0ff 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
@@ -26,12 +26,12 @@

#include <dspbridge/msgdefs.h>

-extern int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
+extern int bridge_msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback);

extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue,
+ OUT struct msg_queue **msgq,
u32 msgq_id, u32 max_msgs, void *h);

extern void bridge_msg_delete(struct msg_mgr *hmsg_mgr);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io.h b/drivers/staging/tidspbridge/include/dspbridge/io.h
index 123cf03..aa24535 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io.h
@@ -45,11 +45,11 @@
* Invalid base address for DSP communications.
* Requires:
* io_init(void) called.
- * phIOMgr != NULL.
+ * io_man != NULL.
* pMgrAttrs != NULL.
* Ensures:
*/
-extern int io_create(OUT struct io_mgr **phIOMgr,
+extern int io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
index 90e174c..b90457b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
@@ -49,7 +49,7 @@ int mgr_wait_for_bridge_events(struct dsp_notification
* Creates the Manager Object. This is done during the driver loading.
* There is only one Manager Object in the DSP/BIOS Bridge.
* Parameters:
- * phMgrObject: Location to store created MGR Object handle.
+ * mgr_obj: Location to store created MGR Object handle.
* dev_node_obj: Device object as known to the system.
* Returns:
* 0: Success
@@ -57,9 +57,9 @@ int mgr_wait_for_bridge_events(struct dsp_notification
* -EPERM: General Failure
* Requires:
* MGR Initialized (refs > 0 )
- * phMgrObject != NULL.
+ * mgr_obj != NULL.
* Ensures:
- * 0: *phMgrObject is a valid MGR interface to the device.
+ * 0: *mgr_obj is a valid MGR interface to the device.
* MGR Object stores the DCD Manager Handle.
* MGR Object stored in the Regsitry.
* !0: MGR Object not created
diff --git a/drivers/staging/tidspbridge/include/dspbridge/msg.h b/drivers/staging/tidspbridge/include/dspbridge/msg.h
index 973bce2..007bb73 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/msg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/msg.h
@@ -29,18 +29,18 @@
* can exist per device object. The msg_ctrl manager must be created before
* the IO Manager.
* Parameters:
- * phMsgMgr: Location to store msg_ctrl manager handle on output.
+ * msg_man: Location to store msg_ctrl manager handle on output.
* hdev_obj: The device object.
* msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* Requires:
* msg_mod_init(void) called.
- * phMsgMgr != NULL.
+ * msg_man != NULL.
* hdev_obj != NULL.
* msg_callback != NULL.
* Ensures:
*/
-extern int msg_create(OUT struct msg_mgr **phMsgMgr,
+extern int msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index 505740f..51f96d5 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -28,7 +28,7 @@
extern int nldr_allocate(struct nldr_object *nldr_obj,
void *priv_ref, IN CONST struct dcd_nodeprops
*node_props,
- OUT struct nldr_nodeobject **phNldrNode,
+ OUT struct nldr_nodeobject **nldr_nodeobj,
IN bool *pf_phase_split);

extern int nldr_create(OUT struct nldr_object **phNldr,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index d53b43e..17c5d70 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -112,7 +112,7 @@ enum nldr_phase {
* nldr_obj: Handle of loader that will load the node.
* priv_ref: Handle to identify the node.
* node_props: Pointer to a dcd_nodeprops for the node.
- * phNldrNode: Location to store node handle on output. This handle
+ * nldr_nodeobj: Location to store node handle on output. This handle
* will be passed to nldr_load/nldr_unload.
* pf_phase_split: pointer to int variable referenced in node.c
* Returns:
@@ -122,17 +122,17 @@ enum nldr_phase {
* nldr_init(void) called.
* Valid nldr_obj.
* node_props != NULL.
- * phNldrNode != NULL.
+ * nldr_nodeobj != NULL.
* Ensures:
- * 0: IsValidNode(*phNldrNode).
- * error: *phNldrNode == NULL.
+ * 0: IsValidNode(*nldr_nodeobj).
+ * error: *nldr_nodeobj == NULL.
*/
typedef int(*nldr_allocatefxn) (struct nldr_object *nldr_obj,
void *priv_ref,
IN CONST struct dcd_nodeprops
* node_props,
OUT struct nldr_nodeobject
- **phNldrNode,
+ **nldr_nodeobj,
OUT bool *pf_phase_split);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index 11fdc97..cbd26dc 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -208,19 +208,19 @@ extern void proc_exit(void);
* Returns the DEV Hanlde for a given Processor handle
* Parameters:
* hprocessor : Processor Handle
- * phDevObject : Location to store the DEV Handle.
+ * device_obj : Location to store the DEV Handle.
* Returns:
- * 0 : Success; *phDevObject has Dev handle
- * -EPERM : Failure; *phDevObject is zero.
+ * 0 : Success; *device_obj has Dev handle
+ * -EPERM : Failure; *device_obj is zero.
* Requires:
- * phDevObject is not NULL
+ * device_obj is not NULL
* PROC Initialized.
* Ensures:
- * 0 : *phDevObject is not NULL
- * -EPERM : *phDevObject is NULL.
+ * 0 : *device_obj is not NULL
+ * -EPERM : *device_obj is NULL.
*/
extern int proc_get_dev_object(void *hprocessor,
- struct dev_object **phDevObject);
+ struct dev_object **device_obj);

/*
* ======== proc_init ========
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index 8317d03..e8d5b7e 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -215,7 +215,7 @@ void cod_close(struct cod_libraryobj *lib)
* dynamically loaded object files.
*
*/
-int cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,
+int cod_create(OUT struct cod_manager **mgr, char *pstrDummyFile,
IN OPTIONAL CONST struct cod_attrs *attrs)
{
struct cod_manager *mgr_new;
@@ -223,10 +223,10 @@ int cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);

/* assume failure */
- *phMgr = NULL;
+ *mgr = NULL;

/* we don't support non-default attrs yet */
if (attrs != NULL)
@@ -271,7 +271,7 @@ int cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,
}

/* return the new manager */
- *phMgr = mgr_new;
+ *mgr = mgr_new;

return 0;
}
@@ -377,15 +377,15 @@ int cod_get_entry(struct cod_manager *cod_mgr_obj, u32 *pulEntry)
* Get handle to the DBLL loader.
*/
int cod_get_loader(struct cod_manager *cod_mgr_obj,
- struct dbll_tar_obj **phLoader)
+ struct dbll_tar_obj **loader)
{
int status = 0;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj));
- DBC_REQUIRE(phLoader != NULL);
+ DBC_REQUIRE(loader != NULL);

- *phLoader = (struct dbll_tar_obj *)cod_mgr_obj->target;
+ *loader = (struct dbll_tar_obj *)cod_mgr_obj->target;

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 4ae4f6c..9a52a40 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -130,7 +130,7 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *pHostBuf,
* Called by the operating system to load the PM Bridge Driver for a
* PM board (device).
*/
-int dev_create_device(OUT struct dev_object **phDevObject,
+int dev_create_device(OUT struct dev_object **device_obj,
IN CONST char *driver_file_name,
struct cfg_devnode *dev_node_obj)
{
@@ -144,7 +144,7 @@ int dev_create_device(OUT struct dev_object **phDevObject,
struct drv_object *hdrv_obj = NULL;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);
DBC_REQUIRE(driver_file_name != NULL);

status = drv_request_bridge_res_dsp((void *)&host_res);
@@ -262,7 +262,7 @@ leave:
/* If all went well, return a handle to the dev object;
* else, cleanup and return NULL in the OUT parameter. */
if (DSP_SUCCEEDED(status)) {
- *phDevObject = dev_obj;
+ *device_obj = dev_obj;
} else {
if (dev_obj) {
kfree(dev_obj->proc_list);
@@ -273,11 +273,11 @@ leave:
kfree(dev_obj);
}

- *phDevObject = NULL;
+ *device_obj = NULL;
}

- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDevObject) ||
- (DSP_FAILED(status) && !*phDevObject));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *device_obj) ||
+ (DSP_FAILED(status) && !*device_obj));
return status;
}

@@ -421,23 +421,23 @@ int dev_destroy_device(struct dev_object *hdev_obj)
* device.
*/
int dev_get_chnl_mgr(struct dev_object *hdev_obj,
- OUT struct chnl_mgr **phMgr)
+ OUT struct chnl_mgr **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);

if (hdev_obj) {
- *phMgr = dev_obj->hchnl_mgr;
+ *mgr = dev_obj->hchnl_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}

@@ -448,23 +448,23 @@ int dev_get_chnl_mgr(struct dev_object *hdev_obj,
* device.
*/
int dev_get_cmm_mgr(struct dev_object *hdev_obj,
- OUT struct cmm_object **phMgr)
+ OUT struct cmm_object **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);

if (hdev_obj) {
- *phMgr = dev_obj->hcmm_mgr;
+ *mgr = dev_obj->hcmm_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}

@@ -475,23 +475,23 @@ int dev_get_cmm_mgr(struct dev_object *hdev_obj,
* device.
*/
int dev_get_dmm_mgr(struct dev_object *hdev_obj,
- OUT struct dmm_object **phMgr)
+ OUT struct dmm_object **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);

if (hdev_obj) {
- *phMgr = dev_obj->dmm_mgr;
+ *mgr = dev_obj->dmm_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}

@@ -547,23 +547,23 @@ int dev_get_deh_mgr(struct dev_object *hdev_obj,
* Retrieve the platform specific device ID for this device.
*/
int dev_get_dev_node(struct dev_object *hdev_obj,
- OUT struct cfg_devnode **phDevNode)
+ OUT struct cfg_devnode **dev_nde)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevNode != NULL);
+ DBC_REQUIRE(dev_nde != NULL);

if (hdev_obj) {
- *phDevNode = dev_obj->dev_node_obj;
+ *dev_nde = dev_obj->dev_node_obj;
} else {
- *phDevNode = NULL;
+ *dev_nde = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phDevNode != NULL) &&
- (*phDevNode == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((dev_nde != NULL) &&
+ (*dev_nde == NULL)));
return status;
}

@@ -613,18 +613,18 @@ int dev_get_intf_fxns(struct dev_object *hdev_obj,
* ========= dev_get_io_mgr ========
*/
int dev_get_io_mgr(struct dev_object *hdev_obj,
- OUT struct io_mgr **phIOMgr)
+ OUT struct io_mgr **io_man)
{
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phIOMgr != NULL);
+ DBC_REQUIRE(io_man != NULL);
DBC_REQUIRE(hdev_obj);

if (hdev_obj) {
- *phIOMgr = hdev_obj->hio_mgr;
+ *io_man = hdev_obj->hio_mgr;
} else {
- *phIOMgr = NULL;
+ *io_man = NULL;
status = -EFAULT;
}

@@ -653,13 +653,13 @@ struct dev_object *dev_get_next(struct dev_object *hdev_obj)
/*
* ========= dev_get_msg_mgr ========
*/
-void dev_get_msg_mgr(struct dev_object *hdev_obj, OUT struct msg_mgr **phMsgMgr)
+void dev_get_msg_mgr(struct dev_object *hdev_obj, OUT struct msg_mgr **msg_man)
{
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMsgMgr != NULL);
+ DBC_REQUIRE(msg_man != NULL);
DBC_REQUIRE(hdev_obj);

- *phMsgMgr = hdev_obj->hmsg_mgr;
+ *msg_man = hdev_obj->hmsg_mgr;
}

/*
diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c
index e0be8e0..96af2cc 100644
--- a/drivers/staging/tidspbridge/pmgr/dmm.c
+++ b/drivers/staging/tidspbridge/pmgr/dmm.c
@@ -117,21 +117,21 @@ int dmm_create_tables(struct dmm_object *dmm_mgr, u32 addr, u32 size)
* Purpose:
* Create a dynamic memory manager object.
*/
-int dmm_create(OUT struct dmm_object **phDmmMgr,
+int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
IN CONST struct dmm_mgrattrs *pMgrAttrs)
{
struct dmm_object *dmm_obj = NULL;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDmmMgr != NULL);
+ DBC_REQUIRE(dmm_manager != NULL);

- *phDmmMgr = NULL;
+ *dmm_manager = NULL;
/* create, zero, and tag a cmm mgr object */
dmm_obj = kzalloc(sizeof(struct dmm_object), GFP_KERNEL);
if (dmm_obj != NULL) {
spin_lock_init(&dmm_obj->dmm_lock);
- *phDmmMgr = dmm_obj;
+ *dmm_manager = dmm_obj;
} else {
status = -ENOMEM;
}
@@ -197,20 +197,20 @@ void dmm_exit(void)
* Return the dynamic memory manager object for this device.
* This is typically called from the client process.
*/
-int dmm_get_handle(void *hprocessor, OUT struct dmm_object **phDmmMgr)
+int dmm_get_handle(void *hprocessor, OUT struct dmm_object **dmm_manager)
{
int status = 0;
struct dev_object *hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDmmMgr != NULL);
+ DBC_REQUIRE(dmm_manager != NULL);
if (hprocessor != NULL)
status = proc_get_dev_object(hprocessor, &hdev_obj);
else
hdev_obj = dev_get_first(); /* default */

if (DSP_SUCCEEDED(status))
- status = dev_get_dmm_mgr(hdev_obj, phDmmMgr);
+ status = dev_get_dmm_mgr(hdev_obj, dmm_manager);

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/io.c b/drivers/staging/tidspbridge/pmgr/io.c
index c6ad203..fdd3390 100644
--- a/drivers/staging/tidspbridge/pmgr/io.c
+++ b/drivers/staging/tidspbridge/pmgr/io.c
@@ -46,7 +46,7 @@ static u32 refs;
* Create an IO manager object, responsible for managing IO between
* CHNL and msg_ctrl
*/
-int io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
+int io_create(OUT struct io_mgr **io_man, struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs)
{
struct bridge_drv_interface *intf_fxns;
@@ -55,10 +55,10 @@ int io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phIOMgr != NULL);
+ DBC_REQUIRE(io_man != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);

- *phIOMgr = NULL;
+ *io_man = NULL;

/* A memory base of 0 implies no memory base: */
if ((pMgrAttrs->shm_base != 0) && (pMgrAttrs->usm_length == 0))
@@ -80,7 +80,7 @@ int io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
pio_mgr->hdev_obj = hdev_obj;

/* Return the new channel manager handle: */
- *phIOMgr = hio_mgr;
+ *io_man = hio_mgr;
}
}

diff --git a/drivers/staging/tidspbridge/pmgr/msg.c b/drivers/staging/tidspbridge/pmgr/msg.c
index 6122cd4..3903c41 100644
--- a/drivers/staging/tidspbridge/pmgr/msg.c
+++ b/drivers/staging/tidspbridge/pmgr/msg.c
@@ -45,7 +45,7 @@ static u32 refs; /* module reference count */
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
*/
-int msg_create(OUT struct msg_mgr **phMsgMgr,
+int msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj, msg_onexit msg_callback)
{
struct bridge_drv_interface *intf_fxns;
@@ -54,11 +54,11 @@ int msg_create(OUT struct msg_mgr **phMsgMgr,
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMsgMgr != NULL);
+ DBC_REQUIRE(msg_man != NULL);
DBC_REQUIRE(msg_callback != NULL);
DBC_REQUIRE(hdev_obj != NULL);

- *phMsgMgr = NULL;
+ *msg_man = NULL;

dev_get_intf_fxns(hdev_obj, &intf_fxns);

@@ -73,7 +73,7 @@ int msg_create(OUT struct msg_mgr **phMsgMgr,
msg_mgr_obj->intf_fxns = intf_fxns;

/* Finally, return the new message manager handle: */
- *phMsgMgr = hmsg_mgr;
+ *msg_man = hmsg_mgr;
} else {
status = -EPERM;
}
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index 5f51d50..9ebdf1e 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -87,7 +87,7 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
* ======== disp_create ========
* Create a NODE Dispatcher object.
*/
-int disp_create(OUT struct disp_object **phDispObject,
+int disp_create(OUT struct disp_object **dispatch_obj,
struct dev_object *hdev_obj,
IN CONST struct disp_attr *disp_attrs)
{
@@ -99,11 +99,11 @@ int disp_create(OUT struct disp_object **phDispObject,
u8 dev_type;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDispObject != NULL);
+ DBC_REQUIRE(dispatch_obj != NULL);
DBC_REQUIRE(disp_attrs != NULL);
DBC_REQUIRE(hdev_obj != NULL);

- *phDispObject = NULL;
+ *dispatch_obj = NULL;

/* Allocate Node Dispatcher object */
disp_obj = kzalloc(sizeof(struct disp_object), GFP_KERNEL);
@@ -166,12 +166,12 @@ int disp_create(OUT struct disp_object **phDispObject,
}
func_cont:
if (DSP_SUCCEEDED(status))
- *phDispObject = disp_obj;
+ *dispatch_obj = disp_obj;
else
delete_disp(disp_obj);

- DBC_ENSURE(((DSP_FAILED(status)) && ((*phDispObject == NULL))) ||
- ((DSP_SUCCEEDED(status)) && *phDispObject));
+ DBC_ENSURE(((DSP_FAILED(status)) && ((*dispatch_obj == NULL))) ||
+ ((DSP_SUCCEEDED(status)) && *dispatch_obj));
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 50c0dc7..0de7f89 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -422,12 +422,12 @@ int drv_proc_update_strm_res(u32 num_bufs, void *hstrm_res)
* Purpose:
* DRV Object gets created only once during Driver Loading.
*/
-int drv_create(OUT struct drv_object **phDRVObject)
+int drv_create(OUT struct drv_object **drv_obj)
{
int status = 0;
struct drv_object *pdrv_object = NULL;

- DBC_REQUIRE(phDRVObject != NULL);
+ DBC_REQUIRE(drv_obj != NULL);
DBC_REQUIRE(refs > 0);

pdrv_object = kzalloc(sizeof(struct drv_object), GFP_KERNEL);
@@ -456,7 +456,7 @@ int drv_create(OUT struct drv_object **phDRVObject)
if (DSP_SUCCEEDED(status))
status = cfg_set_object((u32) pdrv_object, REG_DRV_OBJECT);
if (DSP_SUCCEEDED(status)) {
- *phDRVObject = pdrv_object;
+ *drv_obj = pdrv_object;
} else {
kfree(pdrv_object->dev_list);
kfree(pdrv_object->dev_node_string);
@@ -515,7 +515,7 @@ int drv_destroy(struct drv_object *driver_obj)
* Given a index, returns a handle to DevObject from the list.
*/
int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj,
- struct dev_object **phDevObject)
+ struct dev_object **device_obj)
{
int status = 0;
#ifdef CONFIG_BRIDGE_DEBUG
@@ -525,7 +525,7 @@ int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj,
struct dev_object *dev_obj;
u32 i;
DBC_REQUIRE(pdrv_obj);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);
DBC_REQUIRE(index >= 0);
DBC_REQUIRE(refs > 0);
DBC_ASSERT(!(LST_IS_EMPTY(pdrv_obj->dev_list)));
@@ -536,9 +536,9 @@ int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj,
(struct dev_object *)drv_get_next_dev_object((u32) dev_obj);
}
if (dev_obj) {
- *phDevObject = (struct dev_object *)dev_obj;
+ *device_obj = (struct dev_object *)dev_obj;
} else {
- *phDevObject = NULL;
+ *device_obj = NULL;
status = -EPERM;
}

diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index 43be669..3f52660 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -52,13 +52,13 @@ static u32 refs;
* Purpose:
* MGR Object gets created only once during driver Loading.
*/
-int mgr_create(OUT struct mgr_object **phMgrObject,
+int mgr_create(OUT struct mgr_object **mgr_obj,
struct cfg_devnode *dev_node_obj)
{
int status = 0;
struct mgr_object *pmgr_obj = NULL;

- DBC_REQUIRE(phMgrObject != NULL);
+ DBC_REQUIRE(mgr_obj != NULL);
DBC_REQUIRE(refs > 0);

pmgr_obj = kzalloc(sizeof(struct mgr_object), GFP_KERNEL);
@@ -68,7 +68,7 @@ int mgr_create(OUT struct mgr_object **phMgrObject,
/* If succeeded store the handle in the MGR Object */
status = cfg_set_object((u32) pmgr_obj, REG_MGR_OBJECT);
if (DSP_SUCCEEDED(status)) {
- *phMgrObject = pmgr_obj;
+ *mgr_obj = pmgr_obj;
} else {
dcd_destroy_manager(pmgr_obj->hdcd_mgr);
kfree(pmgr_obj);
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index d461271..5ae0f14 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -325,7 +325,7 @@ static u32 find_gcf(u32 a, u32 b);
*/
int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,
IN CONST struct dcd_nodeprops *node_props,
- OUT struct nldr_nodeobject **phNldrNode,
+ OUT struct nldr_nodeobject **nldr_nodeobj,
IN bool *pf_phase_split)
{
struct nldr_nodeobject *nldr_node_obj = NULL;
@@ -333,11 +333,11 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(node_props != NULL);
- DBC_REQUIRE(phNldrNode != NULL);
+ DBC_REQUIRE(nldr_nodeobj != NULL);
DBC_REQUIRE(nldr_obj);

/* Initialize handle in case of failure */
- *phNldrNode = NULL;
+ *nldr_nodeobj = NULL;
/* Allocate node object */
nldr_node_obj = kzalloc(sizeof(struct nldr_nodeobject), GFP_KERNEL);

@@ -410,14 +410,14 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,
nldr_node_obj->overlay = true;

}
- *phNldrNode = (struct nldr_nodeobject *)nldr_node_obj;
+ *nldr_nodeobj = (struct nldr_nodeobject *)nldr_node_obj;
}
/* Cleanup on failure */
if (DSP_FAILED(status) && nldr_node_obj)
kfree(nldr_node_obj);

- DBC_ENSURE((DSP_SUCCEEDED(status) && *phNldrNode)
- || (DSP_FAILED(status) && *phNldrNode == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *nldr_nodeobj)
+ || (DSP_FAILED(status) && *nldr_nodeobj == NULL));
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index ace3bc5..ed26d06 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -936,24 +936,24 @@ void proc_exit(void)
*
*/
int proc_get_dev_object(void *hprocessor,
- struct dev_object **phDevObject)
+ struct dev_object **device_obj)
{
int status = -EPERM;
struct proc_object *p_proc_object = (struct proc_object *)hprocessor;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);

if (p_proc_object) {
- *phDevObject = p_proc_object->hdev_obj;
+ *device_obj = p_proc_object->hdev_obj;
status = 0;
} else {
- *phDevObject = NULL;
+ *device_obj = NULL;
status = -EFAULT;
}

- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDevObject != NULL) ||
- (DSP_FAILED(status) && *phDevObject == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *device_obj != NULL) ||
+ (DSP_FAILED(status) && *device_obj == NULL));

return status;
}
--
1.6.3.3

2010-07-08 23:14:27

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 09/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pMemStatBuf to mem_stat_buf
pMgrAttrs to mgr_attrts
pMgrInfo to mgr_info
pNodeEnv to node_env
pNodeId to node_uuid
pNodeInfo to node_info
pNumLibs to num_libs
pNumPersLibs to num_pers_libs
pObjDef to obj_def
pObjUuid to obj_uuid
poolPhysBase to pool_phys_base
poolSize to pool_size
pPctxt to pctxt
ppDevContext to dev_cntxt
ppDrvInterface to drv_intf
pPersistentDepLibs to prstnt_dep_libs
pPhyAddr to phy_addr
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 28 +++++-----
drivers/staging/tidspbridge/core/io_sm.c | 8 ++--
drivers/staging/tidspbridge/core/tiomap3430.c | 10 ++--
.../staging/tidspbridge/include/dspbridge/chnl.h | 14 +++---
.../staging/tidspbridge/include/dspbridge/cmm.h | 6 +-
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 24 +++++-----
.../staging/tidspbridge/include/dspbridge/disp.h | 6 +-
.../staging/tidspbridge/include/dspbridge/dmm.h | 2 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 8 ++--
.../tidspbridge/include/dspbridge/dspchnl.h | 4 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 40 ++++++++--------
.../staging/tidspbridge/include/dspbridge/dspio.h | 2 +-
drivers/staging/tidspbridge/include/dspbridge/io.h | 12 ++--
.../staging/tidspbridge/include/dspbridge/node.h | 8 ++--
.../tidspbridge/include/dspbridge/nodepriv.h | 2 +-
.../include/dspbridge/resourcecleanup.h | 6 +-
.../staging/tidspbridge/include/dspbridge/rmm.h | 4 +-
drivers/staging/tidspbridge/pmgr/chnl.c | 14 +++---
drivers/staging/tidspbridge/pmgr/cmm.c | 10 ++--
drivers/staging/tidspbridge/pmgr/dmm.c | 2 +-
drivers/staging/tidspbridge/pmgr/io.c | 10 ++--
drivers/staging/tidspbridge/rmgr/dbdcd.c | 52 ++++++++++----------
drivers/staging/tidspbridge/rmgr/disp.c | 6 +-
drivers/staging/tidspbridge/rmgr/drv.c | 10 ++--
drivers/staging/tidspbridge/rmgr/node.c | 50 +++++++++---------
drivers/staging/tidspbridge/rmgr/rmm.c | 14 +++---
26 files changed, 176 insertions(+), 176 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 4c61a31..97eeda9 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -382,7 +382,7 @@ func_cont:
*/
int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
- IN CONST struct chnl_mgrattrs *pMgrAttrs)
+ IN CONST struct chnl_mgrattrs *mgr_attrts)
{
int status = 0;
struct chnl_mgr *chnl_mgr_obj = NULL;
@@ -390,10 +390,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,

/* Check DBC requirements: */
DBC_REQUIRE(channel_mgr != NULL);
- DBC_REQUIRE(pMgrAttrs != NULL);
- DBC_REQUIRE(pMgrAttrs->max_channels > 0);
- DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS);
- DBC_REQUIRE(pMgrAttrs->word_size != 0);
+ DBC_REQUIRE(mgr_attrts != NULL);
+ DBC_REQUIRE(mgr_attrts->max_channels > 0);
+ DBC_REQUIRE(mgr_attrts->max_channels <= CHNL_MAXCHANNELS);
+ DBC_REQUIRE(mgr_attrts->word_size != 0);

/* Allocate channel manager object */
chnl_mgr_obj = kzalloc(sizeof(struct chnl_mgr), GFP_KERNEL);
@@ -401,10 +401,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
/*
* The max_channels attr must equal the # of supported chnls for
* each transport(# chnls for PCPY = DDMA = ZCPY): i.e.
- * pMgrAttrs->max_channels = CHNL_MAXCHANNELS =
+ * mgr_attrts->max_channels = CHNL_MAXCHANNELS =
* DDMA_MAXDDMACHNLS = DDMA_MAXZCPYCHNLS.
*/
- DBC_ASSERT(pMgrAttrs->max_channels == CHNL_MAXCHANNELS);
+ DBC_ASSERT(mgr_attrts->max_channels == CHNL_MAXCHANNELS);
max_channels = CHNL_MAXCHANNELS + CHNL_MAXCHANNELS * CHNL_PCPY;
/* Create array of channels */
chnl_mgr_obj->ap_channel = kzalloc(sizeof(struct chnl_object *)
@@ -412,7 +412,7 @@ int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
if (chnl_mgr_obj->ap_channel) {
/* Initialize chnl_mgr object */
chnl_mgr_obj->dw_type = CHNL_TYPESM;
- chnl_mgr_obj->word_size = pMgrAttrs->word_size;
+ chnl_mgr_obj->word_size = mgr_attrts->word_size;
/* Total # chnls supported */
chnl_mgr_obj->max_channels = max_channels;
chnl_mgr_obj->open_channels = 0;
@@ -710,22 +710,22 @@ func_end:
* Retrieve information related to the channel manager.
*/
int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 uChnlID,
- OUT struct chnl_mgrinfo *pMgrInfo)
+ OUT struct chnl_mgrinfo *mgr_info)
{
int status = 0;
struct chnl_mgr *chnl_mgr_obj = (struct chnl_mgr *)hchnl_mgr;

- if (pMgrInfo != NULL) {
+ if (mgr_info != NULL) {
if (uChnlID <= CHNL_MAXCHANNELS) {
if (hchnl_mgr) {
/* Return the requested information: */
- pMgrInfo->chnl_obj =
+ mgr_info->chnl_obj =
chnl_mgr_obj->ap_channel[uChnlID];
- pMgrInfo->open_channels =
+ mgr_info->open_channels =
chnl_mgr_obj->open_channels;
- pMgrInfo->dw_type = chnl_mgr_obj->dw_type;
+ mgr_info->dw_type = chnl_mgr_obj->dw_type;
/* total # of chnls */
- pMgrInfo->max_channels =
+ mgr_info->max_channels =
chnl_mgr_obj->max_channels;
} else {
status = -EFAULT;
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index e92cc1e..1724138 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -163,7 +163,7 @@ static int register_shm_segs(struct io_mgr *hio_mgr,
*/
int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
- IN CONST struct io_attrs *pMgrAttrs)
+ IN CONST struct io_attrs *mgr_attrts)
{
int status = 0;
struct io_mgr *pio_mgr = NULL;
@@ -174,7 +174,7 @@ int bridge_io_create(OUT struct io_mgr **io_man,
u8 dev_type;

/* Check requirements */
- if (!io_man || !pMgrAttrs || pMgrAttrs->word_size == 0) {
+ if (!io_man || !mgr_attrts || mgr_attrts->word_size == 0) {
status = -EFAULT;
goto func_end;
}
@@ -214,7 +214,7 @@ int bridge_io_create(OUT struct io_mgr **io_man,
pio_mgr->pmsg = NULL;
#endif
pio_mgr->hchnl_mgr = hchnl_mgr;
- pio_mgr->word_size = pMgrAttrs->word_size;
+ pio_mgr->word_size = mgr_attrts->word_size;
pio_mgr->shared_mem = shared_mem;

if (dev_type == DSP_UNIT) {
@@ -233,7 +233,7 @@ int bridge_io_create(OUT struct io_mgr **io_man,

if (DSP_SUCCEEDED(status)) {
pio_mgr->hbridge_context = hbridge_context;
- pio_mgr->shared_irq = pMgrAttrs->irq_shared;
+ pio_mgr->shared_irq = mgr_attrts->irq_shared;
if (dsp_wdt_init())
status = -EPERM;
} else {
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 9eadf1f..2d56f02 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -105,7 +105,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes);
static int bridge_dev_create(OUT struct bridge_dev_context
- **ppDevContext,
+ **dev_cntxt,
struct dev_object *hdev_obj,
IN struct cfg_hostres *config_param);
static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
@@ -249,7 +249,7 @@ static void bad_page_dump(u32 pa, struct page *pg)
* purpose:
* Bridge Driver entry point.
*/
-void bridge_drv_entry(OUT struct bridge_drv_interface **ppDrvInterface,
+void bridge_drv_entry(OUT struct bridge_drv_interface **drv_intf,
IN CONST char *driver_file_name)
{

@@ -258,7 +258,7 @@ void bridge_drv_entry(OUT struct bridge_drv_interface **ppDrvInterface,
io_sm_init(); /* Initialization of io_sm module */

if (strcmp(driver_file_name, "UMA") == 0)
- *ppDrvInterface = &drv_interface_fxns;
+ *drv_intf = &drv_interface_fxns;
else
dev_dbg(bridge, "%s Unknown Bridge file name", __func__);

@@ -805,7 +805,7 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
* Creates a driver object. Puts DSP in self loop.
*/
static int bridge_dev_create(OUT struct bridge_dev_context
- **ppDevContext,
+ **dev_cntxt,
struct dev_object *hdev_obj,
IN struct cfg_hostres *config_param)
{
@@ -945,7 +945,7 @@ static int bridge_dev_create(OUT struct bridge_dev_context
dev_context->dw_brd_state = BRD_STOPPED;
dev_context->resources = resources;
/* Return ptr to our device state to the DSP API for storage */
- *ppDevContext = dev_context;
+ *dev_cntxt = dev_context;
} else {
if (pt_attrs != NULL) {
kfree(pt_attrs->pg_info);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/chnl.h b/drivers/staging/tidspbridge/include/dspbridge/chnl.h
index 7b0352e..4c2020c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/chnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/chnl.h
@@ -53,11 +53,11 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* Parameters:
* channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
- * pMgrAttrs: Channel manager attributes.
- * pMgrAttrs->max_channels: Max channels
- * pMgrAttrs->birq: Channel's I/O IRQ number.
- * pMgrAttrs->irq_shared: TRUE if the IRQ is shareable.
- * pMgrAttrs->word_size: DSP Word size in equivalent PC bytes..
+ * mgr_attrts: Channel manager attributes.
+ * mgr_attrts->max_channels: Max channels
+ * mgr_attrts->birq: Channel's I/O IRQ number.
+ * mgr_attrts->irq_shared: TRUE if the IRQ is shareable.
+ * mgr_attrts->word_size: DSP Word size in equivalent PC bytes..
* Returns:
* 0: Success;
* -EFAULT: hdev_obj is invalid.
@@ -71,7 +71,7 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* Requires:
* chnl_init(void) called.
* channel_mgr != NULL.
- * pMgrAttrs != NULL.
+ * mgr_attrts != NULL.
* Ensures:
* 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to
@@ -79,7 +79,7 @@ extern int chnl_close(struct chnl_object *chnl_obj);
*/
extern int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
- IN CONST struct chnl_mgrattrs *pMgrAttrs);
+ IN CONST struct chnl_mgrattrs *mgr_attrts);

/*
* ======== chnl_destroy ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 22d053b..9d773aa 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -72,7 +72,7 @@ extern void *cmm_calloc_buf(struct cmm_object *hcmm_mgr,
* ph_cmm_mgr: Location to store a communication manager handle on
* output.
* hdev_obj: Handle to a device object.
- * pMgrAttrs: Comm mem manager attributes.
+ * mgr_attrts: Comm mem manager attributes.
* Returns:
* 0: Success;
* -ENOMEM: Insufficient memory for requested resources.
@@ -81,13 +81,13 @@ extern void *cmm_calloc_buf(struct cmm_object *hcmm_mgr,
* Requires:
* cmm_init(void) called.
* ph_cmm_mgr != NULL.
- * pMgrAttrs->ul_min_block_size >= 4 bytes.
+ * mgr_attrts->ul_min_block_size >= 4 bytes.
* Ensures:
*
*/
extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
struct dev_object *hdev_obj,
- IN CONST struct cmm_mgrattrs *pMgrAttrs);
+ IN CONST struct cmm_mgrattrs *mgr_attrts);

/*
* ======== cmm_destroy ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index 8c06272..8d1fc68 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -155,7 +155,7 @@ extern void dcd_exit(void);
* uuid_obj: Pointer to a dsp_uuid for a library.
* num_libs: Size of uuid array (number of library uuids).
* dep_lib_uuids: Array of dependent library uuids to be filled in.
- * pPersistentDepLibs: Array indicating if corresponding lib is persistent.
+ * prstnt_dep_libs: Array indicating if corresponding lib is persistent.
* phase: phase to obtain correct input library
* Returns:
* 0: Success.
@@ -173,7 +173,7 @@ extern int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
u16 num_libs,
OUT struct dsp_uuid *dep_lib_uuids,
- OUT bool *pPersistentDepLibs,
+ OUT bool *prstnt_dep_libs,
IN enum nldr_phase phase);

/*
@@ -184,8 +184,8 @@ extern int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Parameters:
* hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid for a library.
- * pNumLibs: Size of uuid array (number of library uuids).
- * pNumPersLibs: number of persistent dependent library.
+ * num_libs: Size of uuid array (number of library uuids).
+ * num_pers_libs: number of persistent dependent library.
* phase: Phase to obtain correct input library
* Returns:
* 0: Success.
@@ -196,13 +196,13 @@ extern int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
* DCD initialized.
* Valid hdcd_mgr.
* uuid_obj != NULL
- * pNumLibs != NULL.
+ * num_libs != NULL.
* Ensures:
*/
extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- OUT u16 *pNumLibs,
- OUT u16 *pNumPersLibs,
+ OUT u16 *num_libs,
+ OUT u16 *num_pers_libs,
IN enum nldr_phase phase);

/*
@@ -247,7 +247,7 @@ extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
* DSP/BIOS Bridge object.
* obj_type: The type of DSP/BIOS Bridge object to be
* referenced (node, processor, etc).
- * pObjDef: Pointer to an object definition structure. A
+ * obj_def: Pointer to an object definition structure. A
* union of various possible DCD object types.
* Returns:
* 0: Success.
@@ -257,14 +257,14 @@ extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
* -EFAULT: Invalid DCD_HMANAGER handle.
* Requires:
* DCD initialized.
- * pObjUuid is non-NULL.
- * pObjDef is non-NULL.
+ * obj_uuid is non-NULL.
+ * obj_def is non-NULL.
* Ensures:
*/
extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
- IN struct dsp_uuid *pObjUuid,
+ IN struct dsp_uuid *obj_uuid,
IN enum dsp_dcdobjtype obj_type,
- OUT struct dcd_genericobj *pObjDef);
+ OUT struct dcd_genericobj *obj_def);

/*
* ======== dcd_get_objects ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 03467bb..9f694a4 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -128,7 +128,7 @@ extern int disp_node_change_priority(struct disp_object
* ul_fxn_addr: Address or RMS create node function.
* ul_create_fxn: Address of node's create function.
* pargs: Arguments to pass to RMS node create function.
- * pNodeEnv: Location to store node environment pointer on
+ * node_env: Location to store node environment pointer on
* output.
* Returns:
* 0: Success.
@@ -139,7 +139,7 @@ extern int disp_node_change_priority(struct disp_object
* Valid disp_obj.
* pargs != NULL.
* hnode != NULL.
- * pNodeEnv != NULL.
+ * node_env != NULL.
* node_get_type(hnode) != NODE_DEVICE.
* Ensures:
*/
@@ -148,7 +148,7 @@ extern int disp_node_create(struct disp_object *disp_obj,
u32 ul_fxn_addr,
u32 ul_create_fxn,
IN CONST struct node_createargs
- *pargs, OUT nodeenv *pNodeEnv);
+ *pargs, OUT nodeenv *node_env);

/*
* ======== disp_node_delete ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dmm.h b/drivers/staging/tidspbridge/include/dspbridge/dmm.h
index 9be892f..8c9a3d4 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dmm.h
@@ -59,7 +59,7 @@ extern int dmm_delete_tables(struct dmm_object *dmm_mgr);

extern int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
- IN CONST struct dmm_mgrattrs *pMgrAttrs);
+ IN CONST struct dmm_mgrattrs *mgr_attrts);

extern bool dmm_init(void);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 91725c8..0f69fb7 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -430,15 +430,15 @@ void bridge_recover_schedule(void);
* allocations.
* physical address based on the page frame address.
* Parameters:
- * poolPhysBase starting address of the physical memory pool.
- * poolSize size of the physical memory pool.
+ * pool_phys_base starting address of the physical memory pool.
+ * pool_size size of the physical memory pool.
* Returns:
* none.
* Requires:
* - MEM initialized.
* - valid physical address for the base and size > 0
*/
-extern void mem_ext_phys_pool_init(IN u32 poolPhysBase, IN u32 poolSize);
+extern void mem_ext_phys_pool_init(IN u32 pool_phys_base, IN u32 pool_size);

/*
* ======== mem_ext_phys_pool_release ========
@@ -502,7 +502,7 @@ extern void mem_free_phys_mem(void *pVirtualAddress,
* If valid linear address is returned, be sure to call
* MEM_UNMAP_LINEAR_ADDRESS().
*/
-#define MEM_LINEAR_ADDRESS(pPhyAddr, byte_size) pPhyAddr
+#define MEM_LINEAR_ADDRESS(phy_addr, byte_size) phy_addr

/*
* ======== MEM_UNMAP_LINEAR_ADDRESS ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
index a4e0c84..cb7e18b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
@@ -27,7 +27,7 @@
extern int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs
- *pMgrAttrs);
+ *mgr_attrts);

extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);

@@ -58,7 +58,7 @@ extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,

extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
u32 uChnlID, OUT struct chnl_mgrinfo
- *pMgrInfo);
+ *mgr_info);

extern int bridge_chnl_idle(struct chnl_object *chnl_obj,
u32 timeout, bool flush_data);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 04f00db..7ae7d63 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -300,13 +300,13 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* Parameters:
* channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
- * pMgrAttrs: Channel manager attributes.
- * pMgrAttrs->max_channels: Max channels
- * pMgrAttrs->birq: Channel's I/O IRQ number.
- * pMgrAttrs->irq_shared: TRUE if the IRQ is shareable.
- * pMgrAttrs->word_size: DSP Word size in equivalent PC bytes..
- * pMgrAttrs->shm_base: Base physical address of shared memory, if any.
- * pMgrAttrs->usm_length: Bytes of shared memory block.
+ * mgr_attrts: Channel manager attributes.
+ * mgr_attrts->max_channels: Max channels
+ * mgr_attrts->birq: Channel's I/O IRQ number.
+ * mgr_attrts->irq_shared: TRUE if the IRQ is shareable.
+ * mgr_attrts->word_size: DSP Word size in equivalent PC bytes..
+ * mgr_attrts->shm_base: Base physical address of shared memory, if any.
+ * mgr_attrts->usm_length: Bytes of shared memory block.
* Returns:
* 0: Success;
* -ENOMEM: Insufficient memory for requested resources.
@@ -314,8 +314,8 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* -EFAULT: Couldn't map physical address to a virtual one.
* Requires:
* channel_mgr != NULL.
- * pMgrAttrs != NULL
- * pMgrAttrs field are all valid:
+ * mgr_attrts != NULL
+ * mgr_attrts field are all valid:
* 0 < max_channels <= CHNL_MAXCHANNELS.
* birq <= 15.
* word_size > 0.
@@ -328,7 +328,7 @@ typedef int(*fxn_chnl_create) (OUT struct chnl_mgr
struct dev_object
* hdev_obj,
IN CONST struct
- chnl_mgrattrs * pMgrAttrs);
+ chnl_mgrattrs * mgr_attrts);

/*
* ======== bridge_chnl_destroy ========
@@ -570,20 +570,20 @@ typedef int(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
* Parameters:
* hchnl_mgr: Handle to a valid channel manager, or NULL.
* uChnlID: Channel ID.
- * pMgrInfo: Location to store channel manager info.
+ * mgr_info: Location to store channel manager info.
* Returns:
* 0: Success;
- * -EFAULT: Invalid hchnl_mgr or pMgrInfo.
+ * -EFAULT: Invalid hchnl_mgr or mgr_info.
* -ECHRNG: Invalid channel ID.
* Requires:
* Ensures:
- * 0: pMgrInfo points to a filled in chnl_mgrinfo
- * struct, if (pMgrInfo != NULL).
+ * 0: mgr_info points to a filled in chnl_mgrinfo
+ * struct, if (mgr_info != NULL).
*/
typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr
* hchnl_mgr,
u32 uChnlID,
- OUT struct chnl_mgrinfo *pMgrInfo);
+ OUT struct chnl_mgrinfo *mgr_info);

/*
* ======== bridge_chnl_idle ========
@@ -810,13 +810,13 @@ typedef int(*fxn_deh_getinfo) (struct deh_mgr *deh_manager,
* hdev_obj != NULL;
* Channel manager already created;
* Message manager already created;
- * pMgrAttrs != NULL;
+ * mgr_attrts != NULL;
* io_man != NULL;
* Ensures:
*/
typedef int(*fxn_io_create) (OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
- IN CONST struct io_attrs *pMgrAttrs);
+ IN CONST struct io_attrs *mgr_attrts);

/*
* ======== bridge_io_destroy ========
@@ -1112,19 +1112,19 @@ struct bridge_drv_interface {
* compatibility, and then copy the interface functions into its own
* memory space.
* Parameters:
- * ppDrvInterface Pointer to a location to receive a pointer to the
+ * drv_intf Pointer to a location to receive a pointer to the
* Bridge driver interface.
* Returns:
* Requires:
* The code segment this function resides in must expect to be discarded
* after completion.
* Ensures:
- * ppDrvInterface pointer initialized to Bridge driver's function
+ * drv_intf pointer initialized to Bridge driver's function
* interface. No system resources are acquired by this function.
* Details:
* Called during the Device_Init phase.
*/
-void bridge_drv_entry(OUT struct bridge_drv_interface **ppDrvInterface,
+void bridge_drv_entry(OUT struct bridge_drv_interface **drv_intf,
IN CONST char *driver_file_name);

#endif /* DSPDEFS_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspio.h b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
index 7b33563..93dc592 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspio.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
@@ -28,7 +28,7 @@

extern int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
- IN CONST struct io_attrs *pMgrAttrs);
+ IN CONST struct io_attrs *mgr_attrts);

extern int bridge_io_destroy(struct io_mgr *hio_mgr);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/io.h b/drivers/staging/tidspbridge/include/dspbridge/io.h
index aa24535..b8670ca 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io.h
@@ -33,10 +33,10 @@
* channel_mgr: Location to store a channel manager object on
* output.
* hdev_obj: Handle to a device object.
- * pMgrAttrs: IO manager attributes.
- * pMgrAttrs->birq: I/O IRQ number.
- * pMgrAttrs->irq_shared: TRUE if the IRQ is shareable.
- * pMgrAttrs->word_size: DSP Word size in equivalent PC bytes..
+ * mgr_attrts: IO manager attributes.
+ * mgr_attrts->birq: I/O IRQ number.
+ * mgr_attrts->irq_shared: TRUE if the IRQ is shareable.
+ * mgr_attrts->word_size: DSP Word size in equivalent PC bytes..
* Returns:
* 0: Success;
* -ENOMEM: Insufficient memory for requested resources.
@@ -46,12 +46,12 @@
* Requires:
* io_init(void) called.
* io_man != NULL.
- * pMgrAttrs != NULL.
+ * mgr_attrts != NULL.
* Ensures:
*/
extern int io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
- IN CONST struct io_attrs *pMgrAttrs);
+ IN CONST struct io_attrs *mgr_attrts);

/*
* ======== io_destroy ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index 38d0a7d..68bef9e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -32,7 +32,7 @@
* Allocate GPP resources to manage a node on the DSP.
* Parameters:
* hprocessor: Handle of processor that is allocating the node.
- * pNodeId: Pointer to a dsp_uuid for the node.
+ * node_uuid: Pointer to a dsp_uuid for the node.
* pargs: Optional arguments to be passed to the node.
* attr_in: Optional pointer to node attributes (priority,
* timeout...)
@@ -49,14 +49,14 @@
* Requires:
* node_init(void) called.
* hprocessor != NULL.
- * pNodeId != NULL.
+ * node_uuid != NULL.
* ph_node != NULL.
* Ensures:
* 0: IsValidNode(*ph_node).
* error: *ph_node == NULL.
*/
extern int node_allocate(struct proc_object *hprocessor,
- IN CONST struct dsp_uuid *pNodeId,
+ IN CONST struct dsp_uuid *node_uuid,
OPTIONAL IN CONST struct dsp_cbdata
*pargs, OPTIONAL IN CONST struct dsp_nodeattrin
*attr_in,
@@ -554,7 +554,7 @@ extern int node_terminate(struct node_object *hnode,
*
*/
extern int node_get_uuid_props(void *hprocessor,
- IN CONST struct dsp_uuid *pNodeId,
+ IN CONST struct dsp_uuid *node_uuid,
OUT struct dsp_ndbprops
*node_props);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
index 0dc6dc7..0b45094 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
@@ -163,7 +163,7 @@ extern enum node_type node_get_type(struct node_object *hnode);
* Ensures:
*/
extern void get_node_info(struct node_object *hnode,
- struct dsp_nodeinfo *pNodeInfo);
+ struct dsp_nodeinfo *node_info);

/*
* ======== node_get_load_type ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
index 6c78f2d..48aebff 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
@@ -17,7 +17,7 @@
#include <dspbridge/nodepriv.h>
#include <dspbridge/drv.h>

-extern int drv_get_proc_ctxt_list(struct process_context **pPctxt,
+extern int drv_get_proc_ctxt_list(struct process_context **pctxt,
struct drv_object *hdrv_obj);

extern int drv_insert_proc_context(struct drv_object *driver_obj,
@@ -29,7 +29,7 @@ extern int drv_remove_all_node_res_elements(void *ctxt);

extern int drv_proc_set_pid(void *ctxt, s32 process);

-extern int drv_remove_all_resources(void *pPctxt);
+extern int drv_remove_all_resources(void *pctxt);

extern int drv_remove_proc_context(struct drv_object *driver_obj,
void *pr_ctxt);
@@ -50,7 +50,7 @@ extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_res);

extern int drv_proc_insert_strm_res_element(void *stream_obj,
void *strm_res,
- void *pPctxt);
+ void *pctxt);

extern int drv_get_strm_res_element(void *stream_obj, void *strm_res,
void *ctxt);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/rmm.h b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
index 468d8d8..f6b78d7 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/rmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
@@ -166,7 +166,7 @@ extern bool rmm_init(void);
*
* Parameters:
* segid: Segment ID of the dynamic loading segment.
- * pMemStatBuf: Pointer to allocated buffer into which memory stats are
+ * mem_stat_buf: Pointer to allocated buffer into which memory stats are
* placed.
* Returns:
* TRUE: Success.
@@ -176,6 +176,6 @@ extern bool rmm_init(void);
* Ensures:
*/
extern bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,
- struct dsp_memstat *pMemStatBuf);
+ struct dsp_memstat *mem_stat_buf);

#endif /* RMM_ */
diff --git a/drivers/staging/tidspbridge/pmgr/chnl.c b/drivers/staging/tidspbridge/pmgr/chnl.c
index 0ba5039..7da17c8 100644
--- a/drivers/staging/tidspbridge/pmgr/chnl.c
+++ b/drivers/staging/tidspbridge/pmgr/chnl.c
@@ -53,7 +53,7 @@ static u32 refs;
*/
int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
- IN CONST struct chnl_mgrattrs *pMgrAttrs)
+ IN CONST struct chnl_mgrattrs *mgr_attrts)
{
int status;
struct chnl_mgr *hchnl_mgr;
@@ -61,20 +61,20 @@ int chnl_create(OUT struct chnl_mgr **channel_mgr,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(channel_mgr != NULL);
- DBC_REQUIRE(pMgrAttrs != NULL);
+ DBC_REQUIRE(mgr_attrts != NULL);

*channel_mgr = NULL;

/* Validate args: */
- if ((0 < pMgrAttrs->max_channels) &&
- (pMgrAttrs->max_channels <= CHNL_MAXCHANNELS))
+ if ((0 < mgr_attrts->max_channels) &&
+ (mgr_attrts->max_channels <= CHNL_MAXCHANNELS))
status = 0;
- else if (pMgrAttrs->max_channels == 0)
+ else if (mgr_attrts->max_channels == 0)
status = -EINVAL;
else
status = -ECHRNG;

- if (pMgrAttrs->word_size == 0)
+ if (mgr_attrts->word_size == 0)
status = -EINVAL;

if (DSP_SUCCEEDED(status)) {
@@ -89,7 +89,7 @@ int chnl_create(OUT struct chnl_mgr **channel_mgr,
dev_get_intf_fxns(hdev_obj, &intf_fxns);
/* Let Bridge channel module finish the create: */
status = (*intf_fxns->pfn_chnl_create) (&hchnl_mgr, hdev_obj,
- pMgrAttrs);
+ mgr_attrts);
if (DSP_SUCCEEDED(status)) {
/* Fill in DSP API channel module's fields of the
* chnl_mgr structure */
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index ffe724a..8fd9c26 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -242,7 +242,7 @@ void *cmm_calloc_buf(struct cmm_object *hcmm_mgr, u32 usize,
*/
int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
struct dev_object *hdev_obj,
- IN CONST struct cmm_mgrattrs *pMgrAttrs)
+ IN CONST struct cmm_mgrattrs *mgr_attrts)
{
struct cmm_object *cmm_obj = NULL;
int status = 0;
@@ -255,13 +255,13 @@ int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
/* create, zero, and tag a cmm mgr object */
cmm_obj = kzalloc(sizeof(struct cmm_object), GFP_KERNEL);
if (cmm_obj != NULL) {
- if (pMgrAttrs == NULL)
- pMgrAttrs = &cmm_dfltmgrattrs; /* set defaults */
+ if (mgr_attrts == NULL)
+ mgr_attrts = &cmm_dfltmgrattrs; /* set defaults */

/* 4 bytes minimum */
- DBC_ASSERT(pMgrAttrs->ul_min_block_size >= 4);
+ DBC_ASSERT(mgr_attrts->ul_min_block_size >= 4);
/* save away smallest block allocation for this cmm mgr */
- cmm_obj->ul_min_block_size = pMgrAttrs->ul_min_block_size;
+ cmm_obj->ul_min_block_size = mgr_attrts->ul_min_block_size;
/* save away the systems memory page size */
sys_info.dw_page_size = PAGE_SIZE;
sys_info.dw_allocation_granularity = PAGE_SIZE;
diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c
index 96af2cc..c661e58 100644
--- a/drivers/staging/tidspbridge/pmgr/dmm.c
+++ b/drivers/staging/tidspbridge/pmgr/dmm.c
@@ -119,7 +119,7 @@ int dmm_create_tables(struct dmm_object *dmm_mgr, u32 addr, u32 size)
*/
int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
- IN CONST struct dmm_mgrattrs *pMgrAttrs)
+ IN CONST struct dmm_mgrattrs *mgr_attrts)
{
struct dmm_object *dmm_obj = NULL;
int status = 0;
diff --git a/drivers/staging/tidspbridge/pmgr/io.c b/drivers/staging/tidspbridge/pmgr/io.c
index fdd3390..6585050 100644
--- a/drivers/staging/tidspbridge/pmgr/io.c
+++ b/drivers/staging/tidspbridge/pmgr/io.c
@@ -47,7 +47,7 @@ static u32 refs;
* CHNL and msg_ctrl
*/
int io_create(OUT struct io_mgr **io_man, struct dev_object *hdev_obj,
- IN CONST struct io_attrs *pMgrAttrs)
+ IN CONST struct io_attrs *mgr_attrts)
{
struct bridge_drv_interface *intf_fxns;
struct io_mgr *hio_mgr = NULL;
@@ -56,15 +56,15 @@ int io_create(OUT struct io_mgr **io_man, struct dev_object *hdev_obj,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(io_man != NULL);
- DBC_REQUIRE(pMgrAttrs != NULL);
+ DBC_REQUIRE(mgr_attrts != NULL);

*io_man = NULL;

/* A memory base of 0 implies no memory base: */
- if ((pMgrAttrs->shm_base != 0) && (pMgrAttrs->usm_length == 0))
+ if ((mgr_attrts->shm_base != 0) && (mgr_attrts->usm_length == 0))
status = -EINVAL;

- if (pMgrAttrs->word_size == 0)
+ if (mgr_attrts->word_size == 0)
status = -EINVAL;

if (DSP_SUCCEEDED(status)) {
@@ -72,7 +72,7 @@ int io_create(OUT struct io_mgr **io_man, struct dev_object *hdev_obj,

/* Let Bridge channel module finish the create: */
status = (*intf_fxns->pfn_io_create) (&hio_mgr, hdev_obj,
- pMgrAttrs);
+ mgr_attrts);

if (DSP_SUCCEEDED(status)) {
pio_mgr = (struct io_mgr_ *)hio_mgr;
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 595f9ec..2f32ece 100755
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -69,10 +69,10 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT u16 *pNumLibs,
- OPTIONAL OUT u16 *pNumPersLibs,
+ IN OUT u16 *num_libs,
+ OPTIONAL OUT u16 *num_pers_libs,
OPTIONAL OUT struct dsp_uuid *dep_lib_uuids,
- OPTIONAL OUT bool *pPersistentDepLibs,
+ OPTIONAL OUT bool *prstnt_dep_libs,
IN enum nldr_phase phase);

/*
@@ -328,7 +328,7 @@ void dcd_exit(void)
int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
u16 num_libs, OUT struct dsp_uuid *dep_lib_uuids,
- OUT bool *pPersistentDepLibs,
+ OUT bool *prstnt_dep_libs,
IN enum nldr_phase phase)
{
int status = 0;
@@ -337,11 +337,11 @@ int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
DBC_REQUIRE(hdcd_mgr);
DBC_REQUIRE(uuid_obj != NULL);
DBC_REQUIRE(dep_lib_uuids != NULL);
- DBC_REQUIRE(pPersistentDepLibs != NULL);
+ DBC_REQUIRE(prstnt_dep_libs != NULL);

status =
get_dep_lib_info(hdcd_mgr, uuid_obj, &num_libs, NULL, dep_lib_uuids,
- pPersistentDepLibs, phase);
+ prstnt_dep_libs, phase);

return status;
}
@@ -351,18 +351,18 @@ int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
*/
int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- OUT u16 *pNumLibs, OUT u16 *pNumPersLibs,
+ OUT u16 *num_libs, OUT u16 *num_pers_libs,
IN enum nldr_phase phase)
{
int status = 0;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hdcd_mgr);
- DBC_REQUIRE(pNumLibs != NULL);
- DBC_REQUIRE(pNumPersLibs != NULL);
+ DBC_REQUIRE(num_libs != NULL);
+ DBC_REQUIRE(num_pers_libs != NULL);
DBC_REQUIRE(uuid_obj != NULL);

- status = get_dep_lib_info(hdcd_mgr, uuid_obj, pNumLibs, pNumPersLibs,
+ status = get_dep_lib_info(hdcd_mgr, uuid_obj, num_libs, num_pers_libs,
NULL, NULL, phase);

return status;
@@ -375,9 +375,9 @@ int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* object type.
*/
int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
- IN struct dsp_uuid *pObjUuid,
+ IN struct dsp_uuid *obj_uuid,
IN enum dsp_dcdobjtype obj_type,
- OUT struct dcd_genericobj *pObjDef)
+ OUT struct dcd_genericobj *obj_def)
{
struct dcd_manager *dcd_mgr_obj = hdcd_mgr; /* ptr to DCD mgr */
struct cod_libraryobj *lib = NULL;
@@ -394,8 +394,8 @@ int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
char sz_obj_type[MAX_INT2CHAR_LENGTH]; /* str. rep. of obj_type. */

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pObjDef != NULL);
- DBC_REQUIRE(pObjUuid != NULL);
+ DBC_REQUIRE(obj_def != NULL);
+ DBC_REQUIRE(obj_uuid != NULL);

sz_uuid = kzalloc(MAXUUIDLEN, GFP_KERNEL);
if (!sz_uuid) {
@@ -436,7 +436,7 @@ int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
}

/* Create UUID value to set in registry. */
- uuid_uuid_to_string(pObjUuid, sz_uuid, MAXUUIDLEN);
+ uuid_uuid_to_string(obj_uuid, sz_uuid, MAXUUIDLEN);

if ((strlen(sz_reg_key) + MAXUUIDLEN) < DCD_MAXPATHLENGTH)
strncat(sz_reg_key, sz_uuid, MAXUUIDLEN);
@@ -512,7 +512,7 @@ int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,

/* Parse the content of the COFF buffer. */
status =
- get_attrs_from_buf(psz_coff_buf, ul_len, obj_type, pObjDef);
+ get_attrs_from_buf(psz_coff_buf, ul_len, obj_type, obj_def);
if (DSP_FAILED(status))
status = -EACCES;
} else {
@@ -1393,10 +1393,10 @@ static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size)
*/
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT u16 *pNumLibs,
- OPTIONAL OUT u16 *pNumPersLibs,
+ IN OUT u16 *num_libs,
+ OPTIONAL OUT u16 *num_pers_libs,
OPTIONAL OUT struct dsp_uuid *dep_lib_uuids,
- OPTIONAL OUT bool *pPersistentDepLibs,
+ OPTIONAL OUT bool *prstnt_dep_libs,
enum nldr_phase phase)
{
struct dcd_manager *dcd_mgr_obj = hdcd_mgr;
@@ -1416,14 +1416,14 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
DBC_REQUIRE(refs > 0);

DBC_REQUIRE(hdcd_mgr);
- DBC_REQUIRE(pNumLibs != NULL);
+ DBC_REQUIRE(num_libs != NULL);
DBC_REQUIRE(uuid_obj != NULL);

/* Initialize to 0 dependent libraries, if only counting number of
* dependent libraries */
if (!get_uuids) {
- *pNumLibs = 0;
- *pNumPersLibs = 0;
+ *num_libs = 0;
+ *num_pers_libs = 0;
}

/* Allocate a buffer for file name */
@@ -1472,7 +1472,7 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
psz_cur = psz_coff_buf;
while ((token = strsep(&psz_cur, seps)) && *token != '\0') {
if (get_uuids) {
- if (dep_libs >= *pNumLibs) {
+ if (dep_libs >= *num_libs) {
/* Gone beyond the limit */
break;
} else {
@@ -1482,17 +1482,17 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
[dep_libs]));
/* Is this library persistent? */
token = strsep(&psz_cur, seps);
- pPersistentDepLibs[dep_libs] = atoi(token);
+ prstnt_dep_libs[dep_libs] = atoi(token);
dep_libs++;
}
} else {
/* Advanc to next token */
token = strsep(&psz_cur, seps);
if (atoi(token))
- (*pNumPersLibs)++;
+ (*num_pers_libs)++;

/* Just counting number of dependent libraries */
- (*pNumLibs)++;
+ (*num_libs)++;
}
}
func_cont:
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index 9ebdf1e..d2cb558 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -252,7 +252,7 @@ int disp_node_create(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn,
u32 ul_create_fxn,
IN CONST struct node_createargs *pargs,
- OUT nodeenv *pNodeEnv)
+ OUT nodeenv *node_env)
{
struct node_msgargs node_msg_args;
struct node_taskargs task_arg_obj;
@@ -282,7 +282,7 @@ int disp_node_create(struct disp_object *disp_obj,
DBC_REQUIRE(disp_obj);
DBC_REQUIRE(hnode != NULL);
DBC_REQUIRE(node_get_type(hnode) != NODE_DEVICE);
- DBC_REQUIRE(pNodeEnv != NULL);
+ DBC_REQUIRE(node_env != NULL);

status = dev_get_dev_type(disp_obj->hdev_obj, &dev_type);

@@ -461,7 +461,7 @@ int disp_node_create(struct disp_object *disp_obj,
ul_bytes = total * sizeof(rms_word);
DBC_ASSERT(ul_bytes < (RMS_COMMANDBUFSIZE * sizeof(rms_word)));
status = send_message(disp_obj, node_get_timeout(hnode),
- ul_bytes, pNodeEnv);
+ ul_bytes, node_env);
if (DSP_SUCCEEDED(status)) {
/*
* Message successfully received from RMS.
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 0de7f89..58c6cff 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -936,21 +936,21 @@ int drv_request_bridge_res_dsp(void **phost_resources)
return status;
}

-void mem_ext_phys_pool_init(u32 poolPhysBase, u32 poolSize)
+void mem_ext_phys_pool_init(u32 pool_phys_base, u32 pool_size)
{
u32 pool_virt_base;

/* get the virtual address for the physical memory pool passed */
- pool_virt_base = (u32) ioremap(poolPhysBase, poolSize);
+ pool_virt_base = (u32) ioremap(pool_phys_base, pool_size);

if ((void **)pool_virt_base == NULL) {
pr_err("%s: external physical memory map failed\n", __func__);
ext_phys_mem_pool_enabled = false;
} else {
- ext_mem_pool.phys_mem_base = poolPhysBase;
- ext_mem_pool.phys_mem_size = poolSize;
+ ext_mem_pool.phys_mem_base = pool_phys_base;
+ ext_mem_pool.phys_mem_size = pool_size;
ext_mem_pool.virt_mem_base = pool_virt_base;
- ext_mem_pool.next_phys_alloc_ptr = poolPhysBase;
+ ext_mem_pool.next_phys_alloc_ptr = pool_phys_base;
ext_phys_mem_pool_enabled = true;
}
}
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index f10561b..52cc4ed 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -250,7 +250,7 @@ static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,
u32 uPhase);
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
- CONST struct dsp_uuid *pNodeId,
+ CONST struct dsp_uuid *node_uuid,
struct dcd_genericobj *dcd_prop);
static int get_proc_props(struct node_mgr *hnode_mgr,
struct dev_object *hdev_obj);
@@ -289,7 +289,7 @@ enum node_state node_get_state(void *hnode)
* Allocate GPP resources to manage a node on the DSP.
*/
int node_allocate(struct proc_object *hprocessor,
- IN CONST struct dsp_uuid *pNodeId,
+ IN CONST struct dsp_uuid *node_uuid,
OPTIONAL IN CONST struct dsp_cbdata *pargs,
OPTIONAL IN CONST struct dsp_nodeattrin *attr_in,
OUT struct node_object **ph_node,
@@ -326,7 +326,7 @@ int node_allocate(struct proc_object *hprocessor,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hprocessor != NULL);
DBC_REQUIRE(ph_node != NULL);
- DBC_REQUIRE(pNodeId != NULL);
+ DBC_REQUIRE(node_uuid != NULL);

*ph_node = NULL;

@@ -391,12 +391,12 @@ int node_allocate(struct proc_object *hprocessor,
mutex_lock(&hnode_mgr->node_mgr_lock);

/* Get dsp_ndbprops from node database */
- status = get_node_props(hnode_mgr->hdcd_mgr, pnode, pNodeId,
+ status = get_node_props(hnode_mgr->hdcd_mgr, pnode, node_uuid,
&(pnode->dcd_props));
if (DSP_FAILED(status))
goto func_cont;

- pnode->node_uuid = *pNodeId;
+ pnode->node_uuid = *node_uuid;
pnode->hprocessor = hprocessor;
pnode->ntype = pnode->dcd_props.obj_data.node_obj.ndb_props.ntype;
pnode->utimeout = pnode->dcd_props.obj_data.node_obj.ndb_props.utimeout;
@@ -673,9 +673,9 @@ func_cont:
DBC_ENSURE((DSP_FAILED(status) && (*ph_node == NULL)) ||
(DSP_SUCCEEDED(status) && *ph_node));
func_end:
- dev_dbg(bridge, "%s: hprocessor: %p pNodeId: %p pargs: %p attr_in: %p "
- "ph_node: %p status: 0x%x\n", __func__, hprocessor,
- pNodeId, pargs, attr_in, ph_node, status);
+ dev_dbg(bridge, "%s: hprocessor: %p node_uuid: %p pargs: %p attr_in:"
+ " %p ph_node: %p status: 0x%x\n", __func__, hprocessor,
+ node_uuid, pargs, attr_in, ph_node, status);
return status;
}

@@ -2859,26 +2859,26 @@ static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,
* Purpose:
* Retrieves the node information.
*/
-void get_node_info(struct node_object *hnode, struct dsp_nodeinfo *pNodeInfo)
+void get_node_info(struct node_object *hnode, struct dsp_nodeinfo *node_info)
{
u32 i;

DBC_REQUIRE(hnode);
- DBC_REQUIRE(pNodeInfo != NULL);
+ DBC_REQUIRE(node_info != NULL);

- pNodeInfo->cb_struct = sizeof(struct dsp_nodeinfo);
- pNodeInfo->nb_node_database_props =
+ node_info->cb_struct = sizeof(struct dsp_nodeinfo);
+ node_info->nb_node_database_props =
hnode->dcd_props.obj_data.node_obj.ndb_props;
- pNodeInfo->execution_priority = hnode->prio;
- pNodeInfo->device_owner = hnode->device_owner;
- pNodeInfo->number_streams = hnode->num_inputs + hnode->num_outputs;
- pNodeInfo->node_env = hnode->node_env;
+ node_info->execution_priority = hnode->prio;
+ node_info->device_owner = hnode->device_owner;
+ node_info->number_streams = hnode->num_inputs + hnode->num_outputs;
+ node_info->node_env = hnode->node_env;

- pNodeInfo->ns_execution_state = node_get_state(hnode);
+ node_info->ns_execution_state = node_get_state(hnode);

/* Copy stream connect data */
for (i = 0; i < hnode->num_inputs + hnode->num_outputs; i++)
- pNodeInfo->sc_stream_connection[i] = hnode->stream_connect[i];
+ node_info->sc_stream_connection[i] = hnode->stream_connect[i];

}

@@ -2889,7 +2889,7 @@ void get_node_info(struct node_object *hnode, struct dsp_nodeinfo *pNodeInfo)
*/
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
- CONST struct dsp_uuid *pNodeId,
+ CONST struct dsp_uuid *node_uuid,
struct dcd_genericobj *dcd_prop)
{
u32 len;
@@ -2901,14 +2901,14 @@ static int get_node_props(struct dcd_manager *hdcd_mgr,
int status = 0;
char sz_uuid[MAXUUIDLEN];

- status = dcd_get_object_def(hdcd_mgr, (struct dsp_uuid *)pNodeId,
+ status = dcd_get_object_def(hdcd_mgr, (struct dsp_uuid *)node_uuid,
DSP_DCDNODETYPE, dcd_prop);

if (DSP_SUCCEEDED(status)) {
hnode->ntype = node_type = pndb_props->ntype;

/* Create UUID value to set in registry. */
- uuid_uuid_to_string((struct dsp_uuid *)pNodeId, sz_uuid,
+ uuid_uuid_to_string((struct dsp_uuid *)node_uuid, sz_uuid,
MAXUUIDLEN);
dev_dbg(bridge, "(node) UUID: %s\n", sz_uuid);

@@ -3005,7 +3005,7 @@ static int get_proc_props(struct node_mgr *hnode_mgr,
* Fetch Node UUID properties from DCD/DOF file.
*/
int node_get_uuid_props(void *hprocessor,
- IN CONST struct dsp_uuid *pNodeId,
+ IN CONST struct dsp_uuid *node_uuid,
OUT struct dsp_ndbprops *node_props)
{
struct node_mgr *hnode_mgr = NULL;
@@ -3016,9 +3016,9 @@ int node_get_uuid_props(void *hprocessor,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hprocessor != NULL);
- DBC_REQUIRE(pNodeId != NULL);
+ DBC_REQUIRE(node_uuid != NULL);

- if (hprocessor == NULL || pNodeId == NULL) {
+ if (hprocessor == NULL || node_uuid == NULL) {
status = -EFAULT;
goto func_end;
}
@@ -3056,7 +3056,7 @@ int node_get_uuid_props(void *hprocessor,
dcd_node_props.pstr_i_alg_name = NULL;

status = dcd_get_object_def(hnode_mgr->hdcd_mgr,
- (struct dsp_uuid *)pNodeId, DSP_DCDNODETYPE,
+ (struct dsp_uuid *)node_uuid, DSP_DCDNODETYPE,
(struct dcd_genericobj *)&dcd_node_props);

if (DSP_SUCCEEDED(status)) {
diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c
index 96c61dd..0354b0f 100644
--- a/drivers/staging/tidspbridge/rmgr/rmm.c
+++ b/drivers/staging/tidspbridge/rmgr/rmm.c
@@ -369,7 +369,7 @@ bool rmm_init(void)
* ======== rmm_stat ========
*/
bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,
- struct dsp_memstat *pMemStatBuf)
+ struct dsp_memstat *mem_stat_buf)
{
struct rmm_header *head;
bool ret = false;
@@ -377,7 +377,7 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,
u32 total_free_size = 0;
u32 free_blocks = 0;

- DBC_REQUIRE(pMemStatBuf != NULL);
+ DBC_REQUIRE(mem_stat_buf != NULL);
DBC_ASSERT(target != NULL);

if ((u32) segid < target->num_segs) {
@@ -392,19 +392,19 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,
}

/* ul_size */
- pMemStatBuf->ul_size = target->seg_tab[segid].length;
+ mem_stat_buf->ul_size = target->seg_tab[segid].length;

/* ul_num_free_blocks */
- pMemStatBuf->ul_num_free_blocks = free_blocks;
+ mem_stat_buf->ul_num_free_blocks = free_blocks;

/* ul_total_free_size */
- pMemStatBuf->ul_total_free_size = total_free_size;
+ mem_stat_buf->ul_total_free_size = total_free_size;

/* ul_len_max_free_block */
- pMemStatBuf->ul_len_max_free_block = max_free_size;
+ mem_stat_buf->ul_len_max_free_block = max_free_size;

/* ul_num_alloc_blocks */
- pMemStatBuf->ul_num_alloc_blocks =
+ mem_stat_buf->ul_num_alloc_blocks =
target->seg_tab[segid].number;

ret = true;
--
1.6.3.3

2010-07-08 23:15:19

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 08/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
phNldrObj to nldr_ovlyobj
phNldr to nldr
phNodeMgr to node_man
pHostBuf to host_buf
pHostConfig to host_config
phRmmMgr to rmm_mgr
phStrmMgr to strm_man
phStrm to strm_objct
phXlator to xlator
physicalAddr to physical_addr
pInfo to channel_info
pIOC to chan_ioc
pLib to lib_obj
pList to lst
pMemBuf to mem_buf
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 50 ++++++++--------
drivers/staging/tidspbridge/hw/hw_mmu.c | 24 ++++----
drivers/staging/tidspbridge/hw/hw_mmu.h | 4 +-
.../staging/tidspbridge/include/dspbridge/cmm.h | 6 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 3 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 10 ++--
.../staging/tidspbridge/include/dspbridge/dev.h | 28 +++++-----
.../tidspbridge/include/dspbridge/dspchnl.h | 6 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 42 +++++++-------
.../staging/tidspbridge/include/dspbridge/list.h | 60 ++++++++++----------
.../staging/tidspbridge/include/dspbridge/nldr.h | 4 +-
.../tidspbridge/include/dspbridge/nldrdefs.h | 10 ++--
.../staging/tidspbridge/include/dspbridge/node.h | 14 ++--
.../tidspbridge/include/dspbridge/nodepriv.h | 6 +-
.../staging/tidspbridge/include/dspbridge/strm.h | 20 +++---
drivers/staging/tidspbridge/pmgr/cmm.c | 8 +-
drivers/staging/tidspbridge/pmgr/cod.c | 8 +-
drivers/staging/tidspbridge/pmgr/dbll.c | 16 +++---
drivers/staging/tidspbridge/pmgr/dev.c | 18 +++---
drivers/staging/tidspbridge/rmgr/nldr.c | 34 ++++++------
drivers/staging/tidspbridge/rmgr/node.c | 26 ++++----
drivers/staging/tidspbridge/rmgr/strm.c | 31 +++++-----
23 files changed, 217 insertions(+), 215 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/include/dspbridge/cod.h
mode change 100644 => 100755 drivers/staging/tidspbridge/include/dspbridge/dbll.h
mode change 100644 => 100755 drivers/staging/tidspbridge/rmgr/strm.c

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index cec3bb5..4c61a31 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -75,7 +75,7 @@
/* ----------------------------------- Function Prototypes */
static struct lst_list *create_chirp_list(u32 uChirps);

-static void free_chirp_list(struct lst_list *pList);
+static void free_chirp_list(struct lst_list *lst);

static struct chnl_irp *make_new_chirp(void);

@@ -88,7 +88,7 @@ static int search_free_channel(struct chnl_mgr *chnl_mgr_obj,
* The direction (mode) is specified in the channel object. Note the DSP
* address is specified for channels opened in direct I/O mode.
*/
-int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
+int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *host_buf,
u32 byte_size, u32 buf_size,
OPTIONAL u32 dw_dsp_addr, u32 dw_arg)
{
@@ -107,7 +107,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
is_eos = (byte_size == 0);

/* Validate args */
- if (!pHostBuf || !pchnl) {
+ if (!host_buf || !pchnl) {
status = -EFAULT;
} else if (is_eos && CHNL_IS_INPUT(pchnl->chnl_mode)) {
status = -EPERM;
@@ -137,9 +137,9 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
if (DSP_FAILED(status))
goto func_end;

- if (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1 && pHostBuf) {
- if (!(pHostBuf < (void *)USERMODE_ADDR)) {
- host_sys_buf = pHostBuf;
+ if (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1 && host_buf) {
+ if (!(host_buf < (void *)USERMODE_ADDR)) {
+ host_sys_buf = host_buf;
goto func_cont;
}
/* if addr in user mode, then copy to kernel space */
@@ -149,7 +149,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
goto func_end;
}
if (CHNL_IS_OUTPUT(pchnl->chnl_mode)) {
- status = copy_from_user(host_sys_buf, pHostBuf,
+ status = copy_from_user(host_sys_buf, host_buf,
buf_size);
if (status) {
kfree(host_sys_buf);
@@ -188,7 +188,7 @@ func_cont:
if (DSP_SUCCEEDED(status)) {
/* Enqueue the chirp on the chnl's IORequest queue: */
chnl_packet_obj->host_user_buf = chnl_packet_obj->host_sys_buf =
- pHostBuf;
+ host_buf;
if (pchnl->chnl_type == CHNL_PCPY && pchnl->chnl_id > 1)
chnl_packet_obj->host_sys_buf = host_sys_buf;

@@ -533,23 +533,23 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 timeout)
* Retrieve information related to a channel.
*/
int bridge_chnl_get_info(struct chnl_object *chnl_obj,
- OUT struct chnl_info *pInfo)
+ OUT struct chnl_info *channel_info)
{
int status = 0;
struct chnl_object *pchnl = (struct chnl_object *)chnl_obj;
- if (pInfo != NULL) {
+ if (channel_info != NULL) {
if (pchnl) {
/* Return the requested information: */
- pInfo->hchnl_mgr = pchnl->chnl_mgr_obj;
- pInfo->event_obj = pchnl->user_event;
- pInfo->cnhl_id = pchnl->chnl_id;
- pInfo->dw_mode = pchnl->chnl_mode;
- pInfo->bytes_tx = pchnl->bytes_moved;
- pInfo->process = pchnl->process;
- pInfo->sync_event = pchnl->sync_event;
- pInfo->cio_cs = pchnl->cio_cs;
- pInfo->cio_reqs = pchnl->cio_reqs;
- pInfo->dw_state = pchnl->dw_state;
+ channel_info->hchnl_mgr = pchnl->chnl_mgr_obj;
+ channel_info->event_obj = pchnl->user_event;
+ channel_info->cnhl_id = pchnl->chnl_id;
+ channel_info->dw_mode = pchnl->chnl_mode;
+ channel_info->bytes_tx = pchnl->bytes_moved;
+ channel_info->process = pchnl->process;
+ channel_info->sync_event = pchnl->sync_event;
+ channel_info->cio_cs = pchnl->cio_cs;
+ channel_info->cio_reqs = pchnl->cio_reqs;
+ channel_info->dw_state = pchnl->dw_state;
} else {
status = -EFAULT;
}
@@ -567,7 +567,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj,
* Note: Ensures Channel Invariant (see notes above).
*/
int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
- OUT struct chnl_ioc *pIOC)
+ OUT struct chnl_ioc *chan_ioc)
{
int status = 0;
struct chnl_object *pchnl = (struct chnl_object *)chnl_obj;
@@ -580,7 +580,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
struct dev_object *dev_obj;

/* Check args: */
- if (!pIOC || !pchnl) {
+ if (!chan_ioc || !pchnl) {
status = -EFAULT;
} else if (timeout == CHNL_IOCNOWAIT) {
if (LST_IS_EMPTY(pchnl->pio_completions))
@@ -623,11 +623,11 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
spin_lock_bh(&pchnl->chnl_mgr_obj->chnl_mgr_lock);
omap_mbox_disable_irq(dev_ctxt->mbox, IRQ_RX);
if (dequeue_ioc) {
- /* Dequeue IOC and set pIOC; */
+ /* Dequeue IOC and set chan_ioc; */
DBC_ASSERT(!LST_IS_EMPTY(pchnl->pio_completions));
chnl_packet_obj =
(struct chnl_irp *)lst_get_head(pchnl->pio_completions);
- /* Update pIOC from channel state and chirp: */
+ /* Update chan_ioc from channel state and chirp: */
if (chnl_packet_obj) {
pchnl->cio_cs--;
/* If this is a zero-copy channel, then set IOC's pbuf
@@ -700,7 +700,7 @@ func_cont1:
}
func_cont:
/* Update User's IOC block: */
- *pIOC = ioc;
+ *chan_ioc = ioc;
func_end:
return status;
}
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index b3fb91f..460c490 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -126,7 +126,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,
* Type : const u32
* Description : Base Address of instance of MMU module
*
- * Identifier : physicalAddr
+ * Identifier : physical_addr
* Type : const u32
* Description : Physical Address to which the corresponding
* virtual Address shouldpoint
@@ -157,7 +157,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,
* METHOD: : Check the Input parameters and set the RAM entry.
*/
static hw_status mmu_set_ram_entry(const void __iomem *base_address,
- const u32 physicalAddr,
+ const u32 physical_addr,
enum hw_endianism_t endianism,
enum hw_element_size_t element_size,
enum hw_mmu_mixed_size_t mixed_size);
@@ -331,7 +331,7 @@ hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
}

hw_status hw_mmu_tlb_add(const void __iomem *base_address,
- u32 physicalAddr,
+ u32 physical_addr,
u32 virtualAddr,
u32 page_sz,
u32 entry_num,
@@ -384,7 +384,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,

/* Write the different fields of the RAM Entry Register */
/* endianism of the page,Element Size of the page (8, 16, 32, 64 bit) */
- mmu_set_ram_entry(base_address, physicalAddr, map_attrs->endianism,
+ mmu_set_ram_entry(base_address, physical_addr, map_attrs->endianism,
map_attrs->element_size, map_attrs->mixed_size);

/* Update the MMU Lock Register */
@@ -401,7 +401,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
}

hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
- u32 physicalAddr,
+ u32 physical_addr,
u32 virtualAddr,
u32 page_sz, struct hw_mmu_map_attrs_t *map_attrs)
{
@@ -415,7 +415,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
virtualAddr &
MMU_SMALL_PAGE_MASK);
pte_val =
- ((physicalAddr & MMU_SMALL_PAGE_MASK) |
+ ((physical_addr & MMU_SMALL_PAGE_MASK) |
(map_attrs->endianism << 9) | (map_attrs->
element_size << 4) |
(map_attrs->mixed_size << 11) | 2);
@@ -427,7 +427,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
virtualAddr &
MMU_LARGE_PAGE_MASK);
pte_val =
- ((physicalAddr & MMU_LARGE_PAGE_MASK) |
+ ((physical_addr & MMU_LARGE_PAGE_MASK) |
(map_attrs->endianism << 9) | (map_attrs->
element_size << 4) |
(map_attrs->mixed_size << 11) | 1);
@@ -438,7 +438,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
virtualAddr &
MMU_SECTION_ADDR_MASK);
pte_val =
- ((((physicalAddr & MMU_SECTION_ADDR_MASK) |
+ ((((physical_addr & MMU_SECTION_ADDR_MASK) |
(map_attrs->endianism << 15) | (map_attrs->
element_size << 10) |
(map_attrs->mixed_size << 17)) & ~0x40000) | 0x2);
@@ -450,7 +450,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
virtualAddr &
MMU_SSECTION_ADDR_MASK);
pte_val =
- (((physicalAddr & MMU_SSECTION_ADDR_MASK) |
+ (((physical_addr & MMU_SSECTION_ADDR_MASK) |
(map_attrs->endianism << 15) | (map_attrs->
element_size << 10) |
(map_attrs->mixed_size << 17)
@@ -461,7 +461,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
virtualAddr &
MMU_SECTION_ADDR_MASK);
- pte_val = (physicalAddr & MMU_PAGE_TABLE_MASK) | 1;
+ pte_val = (physical_addr & MMU_PAGE_TABLE_MASK) | 1;
break;

default:
@@ -560,7 +560,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,

/* mmu_set_ram_entry */
static hw_status mmu_set_ram_entry(const void __iomem *base_address,
- const u32 physicalAddr,
+ const u32 physical_addr,
enum hw_endianism_t endianism,
enum hw_element_size_t element_size,
enum hw_mmu_mixed_size_t mixed_size)
@@ -575,7 +575,7 @@ static hw_status mmu_set_ram_entry(const void __iomem *base_address,
RET_PARAM_OUT_OF_RANGE, RES_MMU_BASE +
RES_INVALID_INPUT_PARAM);

- mmu_ram_reg = (physicalAddr & MMU_ADDR_MASK);
+ mmu_ram_reg = (physical_addr & MMU_ADDR_MASK);
mmu_ram_reg = (mmu_ram_reg) | ((endianism << 9) | (element_size << 7) |
(mixed_size << 6));

diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 84d15a2..a4eb12d 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -80,7 +80,7 @@ extern hw_status hw_mmu_tlb_flush(const void __iomem *base_address,
u32 virtualAddr, u32 page_sz);

extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
- u32 physicalAddr,
+ u32 physical_addr,
u32 virtualAddr,
u32 page_sz,
u32 entry_num,
@@ -89,7 +89,7 @@ extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,

/* For PTEs */
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
- u32 physicalAddr,
+ u32 physical_addr,
u32 virtualAddr,
u32 page_sz,
struct hw_mmu_map_attrs_t *map_attrs);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index d36972e..22d053b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -281,7 +281,7 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
* address translation. Node messaging and streams use this to perform
* inter-processor(GPP<->DSP) zero-copy data transfer.
* Parameters:
- * phXlator: Address to place handle to a new Xlator handle.
+ * xlator: Address to place handle to a new Xlator handle.
* hcmm_mgr: Handle to Cmm Mgr associated with this translator.
* pXlatorAttrs: Translator attributes used for the client NODE or STREAM.
* Returns:
@@ -289,13 +289,13 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
* -EINVAL: Bad input Attrs.
* -ENOMEM: Insufficient memory(local) for requested resources.
* Requires:
- * phXlator != NULL
+ * xlator != NULL
* hcmm_mgr != NULL
* pXlatorAttrs != NULL
* Ensures:
*
*/
-extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
+extern int cmm_xlator_create(OUT struct cmm_xlatorobject **xlator,
struct cmm_object *hcmm_mgr,
struct cmm_xlatorattrs *pXlatorAttrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 63bb874..0cc1bd2
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -307,7 +307,7 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj,
* pszCoffPath: Coff file to open.
* flags: COD_NOLOAD (don't load symbols) or COD_SYMB (load
* symbols).
- * pLib: Handle returned that can be used in calls to cod_close
+ * lib_obj: Handle returned that can be used in calls to cod_close
* and cod_get_section.
* Returns:
* S_OK: Success.
@@ -321,7 +321,7 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj,
*/
extern int cod_open(struct cod_manager *hmgr,
IN char *pszCoffPath,
- u32 flags, OUT struct cod_libraryobj **pLib);
+ u32 flags, OUT struct cod_libraryobj **lib_obj);

/*
* ======== cod_open_base ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index c7b5ed1..0891fae
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -45,7 +45,8 @@ extern int dbll_load(struct dbll_library_obj *lib,
extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
- dbll_flags flags, struct dbll_library_obj **pLib);
+ dbll_flags flags,
+ struct dbll_library_obj **lib_obj);
extern int dbll_read_sect(struct dbll_library_obj *lib,
char *name, char *pbuf, u32 size);
extern void dbll_set_attrs(struct dbll_tar_obj *target,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index da8abf4..23eca15 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -379,7 +379,7 @@ typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
* target - Handle returned from dbll_create().
* file - Name of file to open.
* flags - If flags & DBLL_SYMB, load symbols.
- * pLib - Location to store library handle on output.
+ * lib_obj - Location to store library handle on output.
* Returns:
* 0: Success.
* -ENOMEM: Memory allocation failure.
@@ -389,15 +389,15 @@ typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
* DBL initialized.
* Valid target.
* file != NULL.
- * pLib != NULL.
+ * lib_obj != NULL.
* dbll_attrs fopen function non-NULL.
* Ensures:
- * Success: Valid *pLib.
- * Failure: *pLib == NULL.
+ * Success: Valid *lib_obj.
+ * Failure: *lib_obj == NULL.
*/
typedef int(*dbll_open_fxn) (struct dbll_tar_obj *target, char *file,
dbll_flags flags,
- struct dbll_library_obj **pLib);
+ struct dbll_library_obj **lib_obj);

/*
* ======== dbll_read_sect ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 68aa0b1..a646402 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -43,7 +43,7 @@
* arb: Handle to a Device Object.
* dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
- * pHostBuf: Pointer to host buffer (Source).
+ * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* Returns:
@@ -51,12 +51,12 @@
* arb is invalid.
* Requires:
* DEV Initialized.
- * pHostBuf != NULL
+ * host_buf != NULL
* Ensures:
*/
extern u32 dev_brd_write_fxn(void *arb,
u32 ulDspAddr,
- void *pHostBuf, u32 ul_num_bytes, u32 mem_space);
+ void *host_buf, u32 ul_num_bytes, u32 mem_space);

/*
* ======== dev_create_device ========
@@ -68,7 +68,7 @@ extern u32 dev_brd_write_fxn(void *arb,
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
- * pHostConfig: Host configuration information, to be passed down
+ * host_config: Host configuration information, to be passed down
* to the Bridge driver when bridge_dev_create() is called.
* pDspConfig: DSP resources, to be passed down to the Bridge driver
* when bridge_dev_create() is called.
@@ -82,7 +82,7 @@ extern u32 dev_brd_write_fxn(void *arb,
* DEV Initialized.
* device_obj != NULL.
* driver_file_name != NULL.
- * pHostConfig != NULL.
+ * host_config != NULL.
* pDspConfig != NULL.
* Ensures:
* 0: *device_obj will contain handle to the new device object.
@@ -103,7 +103,7 @@ extern int dev_create_device(OUT struct dev_object
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
- * pHostConfig: Host configuration information, to be passed down
+ * host_config: Host configuration information, to be passed down
* to the Bridge driver when bridge_dev_create() is called.
* pDspConfig: DSP resources, to be passed down to the Bridge driver
* when bridge_dev_create() is called.
@@ -117,7 +117,7 @@ extern int dev_create_device(OUT struct dev_object
* DEV Initialized.
* device_obj != NULL.
* driver_file_name != NULL.
- * pHostConfig != NULL.
+ * host_config != NULL.
* pDspConfig != NULL.
* Ensures:
* 0: *device_obj will contain handle to the new device object.
@@ -128,7 +128,7 @@ extern int dev_create_iva_device(OUT struct dev_object
**device_obj,
IN CONST char *driver_file_name,
IN CONST struct cfg_hostres
- *pHostConfig,
+ *host_config,
struct cfg_devnode *dev_node_obj);

/*
@@ -439,7 +439,7 @@ extern struct dev_object *dev_get_next(struct dev_object
* Requires:
* DEV Initialized.
* Valid hdev_obj.
- * phNodeMgr != NULL.
+ * node_man != NULL.
* Ensures:
*/
extern void dev_get_msg_mgr(struct dev_object *hdev_obj,
@@ -452,21 +452,21 @@ extern void dev_get_msg_mgr(struct dev_object *hdev_obj,
* accessor function
* Parameters:
* hdev_obj: Handle to the Dev Object
- * phNodeMgr: Location where Handle to the Node Manager will be
+ * node_man: Location where Handle to the Node Manager will be
* returned..
* Returns:
* 0: Success
* -EFAULT: Invalid Dev Object handle.
* Requires:
* DEV Initialized.
- * phNodeMgr is not null
+ * node_man is not null
* Ensures:
- * 0: *phNodeMgr contains a handle to a Node manager object.
- * else: *phNodeMgr is NULL.
+ * 0: *node_man contains a handle to a Node manager object.
+ * else: *node_man is NULL.
*/
extern int dev_get_node_manager(struct dev_object
*hdev_obj,
- OUT struct node_mgr **phNodeMgr);
+ OUT struct node_mgr **node_man);

/*
* ======== dev_get_symbol ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
index c009204..a4e0c84 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
@@ -41,12 +41,12 @@ extern int bridge_chnl_open(OUT struct chnl_object **chnl,
extern int bridge_chnl_close(struct chnl_object *chnl_obj);

extern int bridge_chnl_add_io_req(struct chnl_object *chnl_obj,
- void *pHostBuf,
+ void *host_buf,
u32 byte_size, u32 buf_size,
OPTIONAL u32 dw_dsp_addr, u32 dw_arg);

extern int bridge_chnl_get_ioc(struct chnl_object *chnl_obj,
- u32 timeout, OUT struct chnl_ioc *pIOC);
+ u32 timeout, OUT struct chnl_ioc *chan_ioc);

extern int bridge_chnl_cancel_io(struct chnl_object *chnl_obj);

@@ -54,7 +54,7 @@ extern int bridge_chnl_flush_io(struct chnl_object *chnl_obj,
u32 timeout);

extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,
- OUT struct chnl_info *pInfo);
+ OUT struct chnl_info *channel_info);

extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
u32 uChnlID, OUT struct chnl_mgrinfo
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index d11ec63..04f00db 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -143,7 +143,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
- * pHostBuf: Pointer to host buffer (Source).
+ * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* Returns:
@@ -152,12 +152,12 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* -EPERM: Other, unspecified error.
* Requires:
* dev_ctxt != NULL;
- * pHostBuf != NULL.
+ * host_buf != NULL.
* Ensures:
*/
typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* dev_ctxt,
- IN u8 *pHostBuf,
+ IN u8 *host_buf,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);

@@ -248,7 +248,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
* buffer.
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
- * pHostBuf: Pointer to host buffer (Destination).
+ * host_buf: Pointer to host buffer (Destination).
* dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP from which to transfer.
@@ -258,12 +258,12 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
* -EPERM: Other, unspecified error.
* Requires:
* dev_ctxt != NULL;
- * pHostBuf != NULL.
+ * host_buf != NULL.
* Ensures:
- * Will not write more than ul_num_bytes bytes into pHostBuf.
+ * Will not write more than ul_num_bytes bytes into host_buf.
*/
typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
- OUT u8 *pHostBuf,
+ OUT u8 *host_buf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

@@ -275,7 +275,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
- * pHostBuf: Pointer to host buffer (Source).
+ * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* Returns:
@@ -284,11 +284,11 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
* -EPERM: Other, unspecified error.
* Requires:
* dev_ctxt != NULL;
- * pHostBuf != NULL.
+ * host_buf != NULL.
* Ensures:
*/
typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
- IN u8 *pHostBuf,
+ IN u8 *host_buf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

@@ -442,7 +442,7 @@ typedef int(*fxn_chnl_close) (struct chnl_object *chnl_obj);
* address is specified for channels opened in direct I/O mode.
* Parameters:
* chnl_obj: Channel object handle.
- * pHostBuf: Host buffer address source.
+ * host_buf: Host buffer address source.
* byte_size: Number of PC bytes to transfer. A zero value indicates
* that this buffer is the last in the output channel.
* A zero value is invalid for an input channel.
@@ -451,7 +451,7 @@ typedef int(*fxn_chnl_close) (struct chnl_object *chnl_obj);
* dw_arg: A user argument that travels with the buffer.
* Returns:
* 0: Success;
- * -EFAULT: Invalid chnl_obj or pHostBuf.
+ * -EFAULT: Invalid chnl_obj or host_buf.
* -EPERM: User cannot mark EOS on an input channel.
* -ECANCELED: I/O has been cancelled on this channel. No further
* I/O is allowed.
@@ -472,7 +472,7 @@ typedef int(*fxn_chnl_close) (struct chnl_object *chnl_obj);
*/
typedef int(*fxn_chnl_addioreq) (struct chnl_object
* chnl_obj,
- void *pHostBuf,
+ void *host_buf,
u32 byte_size,
u32 buf_size,
OPTIONAL u32 dw_dsp_addr, u32 dw_arg);
@@ -486,12 +486,12 @@ typedef int(*fxn_chnl_addioreq) (struct chnl_object
* chnl_obj: Channel object handle.
* timeout: A value of CHNL_IOCNOWAIT will simply dequeue the
* first available IOC.
- * pIOC: On output, contains host buffer address, bytes
+ * chan_ioc: On output, contains host buffer address, bytes
* transferred, and status of I/O completion.
- * pIOC->status: See chnldefs.h.
+ * chan_ioc->status: See chnldefs.h.
* Returns:
* 0: Success.
- * -EFAULT: Invalid chnl_obj or pIOC.
+ * -EFAULT: Invalid chnl_obj or chan_ioc.
* -EREMOTEIO: CHNL_IOCNOWAIT was specified as the timeout parameter
* yet no I/O completions were queued.
* Requires:
@@ -503,7 +503,7 @@ typedef int(*fxn_chnl_addioreq) (struct chnl_object
*/
typedef int(*fxn_chnl_getioc) (struct chnl_object *chnl_obj,
u32 timeout,
- OUT struct chnl_ioc *pIOC);
+ OUT struct chnl_ioc *chan_ioc);

/*
* ======== bridge_chnl_cancel_io ========
@@ -551,14 +551,14 @@ typedef int(*fxn_chnl_flushio) (struct chnl_object *chnl_obj,
* Retrieve information related to a channel.
* Parameters:
* chnl_obj: Handle to a valid channel object, or NULL.
- * pInfo: Location to store channel info.
+ * channel_info: Location to store channel info.
* Returns:
* 0: Success;
- * -EFAULT: Invalid chnl_obj or pInfo.
+ * -EFAULT: Invalid chnl_obj or channel_info.
* Requires:
* Ensures:
- * 0: pInfo points to a filled in chnl_info struct,
- * if (pInfo != NULL).
+ * 0: channel_info points to a filled in chnl_info struct,
+ * if (channel_info != NULL).
*/
typedef int(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
OUT struct chnl_info *channel_info);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/list.h b/drivers/staging/tidspbridge/include/dspbridge/list.h
index 2cf885d..6837b61 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/list.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/list.h
@@ -35,18 +35,18 @@ struct lst_list {
* Returns a pointer to the first element of the list, or NULL if the list
* is empty.
* Parameters:
- * pList: Pointer to list control structure.
+ * lst: Pointer to list control structure.
* Returns:
* Pointer to first list element, or NULL.
* Requires:
* - LST initialized.
- * - pList != NULL.
+ * - lst != NULL.
* Ensures:
*/
-static inline struct list_head *lst_first(struct lst_list *pList)
+static inline struct list_head *lst_first(struct lst_list *lst)
{
- if (pList && !list_empty(&pList->head))
- return pList->head.next;
+ if (lst && !list_empty(&lst->head))
+ return lst->head.next;
return NULL;
}

@@ -64,30 +64,30 @@ static inline struct list_head *lst_first(struct lst_list *pList)
* element. So the next element after the head becomes the new head of
* the list.
* Parameters:
- * pList: Pointer to list control structure of list whose head
+ * lst: Pointer to list control structure of list whose head
* element is to be removed
* Returns:
* Pointer to element that was at the head of the list (success)
* NULL No elements in list
* Requires:
* - LST initialized.
- * - pList != NULL.
+ * - lst != NULL.
* Ensures:
* Notes:
* Because the tail of the list points forward (its "next" pointer) to
* the head of the list, and the head of the list points backward (its
* "prev" pointer) to the tail of the list, this list is circular.
*/
-static inline struct list_head *lst_get_head(struct lst_list *pList)
+static inline struct list_head *lst_get_head(struct lst_list *lst)
{
struct list_head *elem_list;

- if (!pList || list_empty(&pList->head))
+ if (!lst || list_empty(&lst->head))
return NULL;

- elem_list = pList->head.next;
- pList->head.next = elem_list->next;
- elem_list->next->prev = &pList->head;
+ elem_list = lst->head.next;
+ lst->head.next = elem_list->next;
+ elem_list->next->prev = &lst->head;

return elem_list;
}
@@ -121,22 +121,22 @@ static inline void lst_init_elem(struct list_head *elem_list)
* Purpose:
* Insert the element before the existing element.
* Parameters:
- * pList: Pointer to list control structure.
+ * lst: Pointer to list control structure.
* elem_list: Pointer to element in list to insert.
* elem_existing: Pointer to existing list element.
* Returns:
* Requires:
* - LST initialized.
- * - pList != NULL.
+ * - lst != NULL.
* - elem_list != NULL.
* - elem_existing != NULL.
* Ensures:
*/
-static inline void lst_insert_before(struct lst_list *pList,
+static inline void lst_insert_before(struct lst_list *lst,
struct list_head *elem_list,
struct list_head *elem_existing)
{
- if (pList && elem_list && elem_existing)
+ if (lst && elem_list && elem_existing)
list_add_tail(elem_list, elem_existing);
}

@@ -146,21 +146,21 @@ static inline void lst_insert_before(struct lst_list *pList,
* Returns a pointer to the next element of the list, or NULL if the next
* element is the head of the list or the list is empty.
* Parameters:
- * pList: Pointer to list control structure.
+ * lst: Pointer to list control structure.
* cur_elem: Pointer to element in list to remove.
* Returns:
* Pointer to list element, or NULL.
* Requires:
* - LST initialized.
- * - pList != NULL.
+ * - lst != NULL.
* - cur_elem != NULL.
* Ensures:
*/
-static inline struct list_head *lst_next(struct lst_list *pList,
+static inline struct list_head *lst_next(struct lst_list *lst,
struct list_head *cur_elem)
{
- if (pList && !list_empty(&pList->head) && cur_elem &&
- (cur_elem->next != &pList->head))
+ if (lst && !list_empty(&lst->head) && cur_elem &&
+ (cur_elem->next != &lst->head))
return cur_elem->next;
return NULL;
}
@@ -179,13 +179,13 @@ static inline struct list_head *lst_next(struct lst_list *pList,
* Sets new element's next pointer to the address of the head element.
* Sets head's prev pointer to the address of the new element.
* Parameters:
- * pList: Pointer to list control structure to which *elem_list will be
+ * lst: Pointer to list control structure to which *elem_list will be
* added
* elem_list: Pointer to list element to be added
* Returns:
* Void
* Requires:
- * *elem_list and *pList must both exist.
+ * *elem_list and *lst must both exist.
* LST initialized.
* Ensures:
* Notes:
@@ -193,11 +193,11 @@ static inline struct list_head *lst_next(struct lst_list *pList,
* tail's "next" pointer points at the head of the list, and the head's
* "prev" pointer points at the tail of the list), the list is circular.
*/
-static inline void lst_put_tail(struct lst_list *pList,
+static inline void lst_put_tail(struct lst_list *lst,
struct list_head *elem_list)
{
- if (pList && elem_list)
- list_add_tail(elem_list, &pList->head);
+ if (lst && elem_list)
+ list_add_tail(elem_list, &lst->head);
}

/*
@@ -206,19 +206,19 @@ static inline void lst_put_tail(struct lst_list *pList,
* Removes (unlinks) the given element from the list, if the list is not
* empty. Does not free the list element.
* Parameters:
- * pList: Pointer to list control structure.
+ * lst: Pointer to list control structure.
* cur_elem: Pointer to element in list to remove.
* Returns:
* Requires:
* - LST initialized.
- * - pList != NULL.
+ * - lst != NULL.
* - cur_elem != NULL.
* Ensures:
*/
-static inline void lst_remove_elem(struct lst_list *pList,
+static inline void lst_remove_elem(struct lst_list *lst,
struct list_head *cur_elem)
{
- if (pList && !list_empty(&pList->head) && cur_elem)
+ if (lst && !list_empty(&lst->head) && cur_elem)
list_del_init(cur_elem);
}

diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index 51f96d5..2f2d637 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -31,7 +31,7 @@ extern int nldr_allocate(struct nldr_object *nldr_obj,
OUT struct nldr_nodeobject **nldr_nodeobj,
IN bool *pf_phase_split);

-extern int nldr_create(OUT struct nldr_object **phNldr,
+extern int nldr_create(OUT struct nldr_object **nldr,
struct dev_object *hdev_obj,
IN CONST struct nldr_attrs *pattrs);

@@ -42,7 +42,7 @@ extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
char *pstrFxn, u32 * pulAddr);

extern int nldr_get_rmm_manager(struct nldr_object *nldr,
- OUT struct rmm_target_obj **phRmmMgr);
+ OUT struct rmm_target_obj **rmm_mgr);

extern bool nldr_init(void);
extern int nldr_load(struct nldr_nodeobject *nldr_node_obj,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index 17c5d70..e15ef67 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -141,7 +141,7 @@ typedef int(*nldr_allocatefxn) (struct nldr_object *nldr_obj,
* create, delete, and execute phase functions of nodes on the DSP target.
*
* Parameters:
- * phNldr: Location to store loader handle on output.
+ * nldr: Location to store loader handle on output.
* hdev_obj: Device for this processor.
* pattrs: Loader attributes.
* Returns:
@@ -149,14 +149,14 @@ typedef int(*nldr_allocatefxn) (struct nldr_object *nldr_obj,
* -ENOMEM: Insufficient memory for requested resources.
* Requires:
* nldr_init(void) called.
- * phNldr != NULL.
+ * nldr != NULL.
* hdev_obj != NULL.
* pattrs != NULL.
* Ensures:
- * 0: Valid *phNldr.
- * error: *phNldr == NULL.
+ * 0: Valid *nldr.
+ * error: *nldr == NULL.
*/
-typedef int(*nldr_createfxn) (OUT struct nldr_object **phNldr,
+typedef int(*nldr_createfxn) (OUT struct nldr_object **nldr,
struct dev_object *hdev_obj,
IN CONST struct nldr_attrs *pattrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index fc9add2..38d0a7d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -217,7 +217,7 @@ extern int node_create(struct node_object *hnode);
* Each DEV object should have exactly one NODE Manager object.
*
* Parameters:
- * phNodeMgr: Location to store node manager handle on output.
+ * node_man: Location to store node manager handle on output.
* hdev_obj: Device for this processor.
* Returns:
* 0: Success;
@@ -225,13 +225,13 @@ extern int node_create(struct node_object *hnode);
* -EPERM: General failure.
* Requires:
* node_init(void) called.
- * phNodeMgr != NULL.
+ * node_man != NULL.
* hdev_obj != NULL.
* Ensures:
- * 0: Valide *phNodeMgr.
- * error: *phNodeMgr == NULL.
+ * 0: Valide *node_man.
+ * error: *node_man == NULL.
*/
-extern int node_create_mgr(OUT struct node_mgr **phNodeMgr,
+extern int node_create_mgr(OUT struct node_mgr **node_man,
struct dev_object *hdev_obj);

/*
@@ -392,14 +392,14 @@ extern int node_get_message(struct node_object *hnode,
* Retrieve the Nldr manager
* Parameters:
* hnode_mgr: Node Manager
- * phNldrObj: Pointer to a Nldr manager handle
+ * nldr_ovlyobj: Pointer to a Nldr manager handle
* Returns:
* 0: Success.
* -EFAULT: Invalid hnode.
* Ensures:
*/
extern int node_get_nldr_obj(struct node_mgr *hnode_mgr,
- OUT struct nldr_object **phNldrObj);
+ OUT struct nldr_object **nldr_ovlyobj);

/*
* ======== node_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
index 42e1a94..0dc6dc7 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
@@ -110,16 +110,16 @@ extern int node_get_channel_id(struct node_object *hnode,
* Get the STRM manager for a node.
* Parameters:
* hnode: Node allocated with node_allocate().
- * phStrmMgr: Location to store STRM manager on output.
+ * strm_man: Location to store STRM manager on output.
* Returns:
* 0: Success.
* -EFAULT: Invalid hnode.
* Requires:
- * phStrmMgr != NULL.
+ * strm_man != NULL.
* Ensures:
*/
extern int node_get_strm_mgr(struct node_object *hnode,
- struct strm_mgr **phStrmMgr);
+ struct strm_mgr **strm_man);

/*
* ======== node_get_timeout ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/strm.h b/drivers/staging/tidspbridge/include/dspbridge/strm.h
index c4a4d65..6572442 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/strm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/strm.h
@@ -75,7 +75,7 @@ extern int strm_close(struct strm_object *stream_obj,
* Create a STRM manager object. This object holds information about the
* device needed to open streams.
* Parameters:
- * phStrmMgr: Location to store handle to STRM manager object on
+ * strm_man: Location to store handle to STRM manager object on
* output.
* dev_obj: Device for this processor.
* Returns:
@@ -84,13 +84,13 @@ extern int strm_close(struct strm_object *stream_obj,
* -EPERM: General failure.
* Requires:
* strm_init(void) called.
- * phStrmMgr != NULL.
+ * strm_man != NULL.
* dev_obj != NULL.
* Ensures:
- * 0: Valid *phStrmMgr.
- * error: *phStrmMgr == NULL.
+ * 0: Valid *strm_man.
+ * error: *strm_man == NULL.
*/
-extern int strm_create(OUT struct strm_mgr **phStrmMgr,
+extern int strm_create(OUT struct strm_mgr **strm_man,
struct dev_object *dev_obj);

/*
@@ -254,7 +254,7 @@ extern int strm_issue(struct strm_object *stream_obj, IN u8 * pbuf,
* index: Stream index.
* pattr: Pointer to structure containing attributes to be
* applied to stream. Cannot be NULL.
- * phStrm: Location to store stream handle on output.
+ * strm_objct: Location to store stream handle on output.
* Returns:
* 0: Success.
* -EFAULT: Invalid hnode.
@@ -264,15 +264,15 @@ extern int strm_issue(struct strm_object *stream_obj, IN u8 * pbuf,
* -EINVAL: Invalid index.
* Requires:
* strm_init(void) called.
- * phStrm != NULL.
+ * strm_objct != NULL.
* pattr != NULL.
* Ensures:
- * 0: *phStrm is valid.
- * error: *phStrm == NULL.
+ * 0: *strm_objct is valid.
+ * error: *strm_objct == NULL.
*/
extern int strm_open(struct node_object *hnode, u32 dir,
u32 index, IN struct strm_attr *pattr,
- OUT struct strm_object **phStrm,
+ OUT struct strm_object **strm_objct,
struct process_context *pr_ctxt);

/*
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index ff1621c..ffe724a 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -954,7 +954,7 @@ static struct cmm_allocator *get_allocator(struct cmm_object *cmm_mgr_obj,
* Purpose:
* Create an address translator object.
*/
-int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
+int cmm_xlator_create(OUT struct cmm_xlatorobject **xlator,
struct cmm_object *hcmm_mgr,
struct cmm_xlatorattrs *pXlatorAttrs)
{
@@ -962,10 +962,10 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phXlator != NULL);
+ DBC_REQUIRE(xlator != NULL);
DBC_REQUIRE(hcmm_mgr != NULL);

- *phXlator = NULL;
+ *xlator = NULL;
if (pXlatorAttrs == NULL)
pXlatorAttrs = &cmm_dfltxlatorattrs; /* set defaults */

@@ -978,7 +978,7 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
status = -ENOMEM;
}
if (DSP_SUCCEEDED(status))
- *phXlator = (struct cmm_xlatorobject *)xlator_object;
+ *xlator = (struct cmm_xlatorobject *)xlator_object;

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index e8d5b7e..ab54388 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -551,7 +551,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
* Open library for reading sections.
*/
int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
- u32 flags, struct cod_libraryobj **pLib)
+ u32 flags, struct cod_libraryobj **lib_obj)
{
int status = 0;
struct cod_libraryobj *lib = NULL;
@@ -560,9 +560,9 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
DBC_REQUIRE(IS_VALID(hmgr));
DBC_REQUIRE(pszCoffPath != NULL);
DBC_REQUIRE(flags == COD_NOLOAD || flags == COD_SYMB);
- DBC_REQUIRE(pLib != NULL);
+ DBC_REQUIRE(lib_obj != NULL);

- *pLib = NULL;
+ *lib_obj = NULL;

lib = kzalloc(sizeof(struct cod_libraryobj), GFP_KERNEL);
if (lib == NULL)
@@ -573,7 +573,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags,
&lib->dbll_lib);
if (DSP_SUCCEEDED(status))
- *pLib = lib;
+ *lib_obj = lib;
}

if (DSP_FAILED(status))
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index a4b853a..0e9875b 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -585,7 +585,7 @@ int dbll_load_sect(struct dbll_library_obj *zl_lib, char *sectName,
* ======== dbll_open ========
*/
int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,
- struct dbll_library_obj **pLib)
+ struct dbll_library_obj **lib_obj)
{
struct dbll_tar_obj *zl_target = (struct dbll_tar_obj *)target;
struct dbll_library_obj *zl_lib = NULL;
@@ -596,7 +596,7 @@ int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,
DBC_REQUIRE(zl_target);
DBC_REQUIRE(zl_target->attrs.fopen != NULL);
DBC_REQUIRE(file != NULL);
- DBC_REQUIRE(pLib != NULL);
+ DBC_REQUIRE(lib_obj != NULL);

zl_lib = zl_target->head;
while (zl_lib != NULL) {
@@ -707,18 +707,18 @@ func_cont:
zl_lib->next = zl_target->head;
zl_target->head = zl_lib;
}
- *pLib = (struct dbll_library_obj *)zl_lib;
+ *lib_obj = (struct dbll_library_obj *)zl_lib;
} else {
- *pLib = NULL;
+ *lib_obj = NULL;
if (zl_lib != NULL)
dbll_close((struct dbll_library_obj *)zl_lib);

}
- DBC_ENSURE((DSP_SUCCEEDED(status) && (zl_lib->open_ref > 0) && *pLib)
- || (DSP_FAILED(status) && *pLib == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && (zl_lib->open_ref > 0) && *lib_obj)
+ || (DSP_FAILED(status) && *lib_obj == NULL));

- dev_dbg(bridge, "%s: target: %p file: %s pLib: %p, status 0x%x\n",
- __func__, target, file, pLib, status);
+ dev_dbg(bridge, "%s: target: %p file: %s lib_obj: %p, status 0x%x\n",
+ __func__, target, file, lib_obj, status);

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 9a52a40..2344bfd 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -99,7 +99,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* is passed a handle to a DEV_hObject, then calls the
* device's bridge_brd_write() function.
*/
-u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *pHostBuf,
+u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
u32 ul_num_bytes, u32 mem_space)
{
struct dev_object *dev_obj = (struct dev_object *)arb;
@@ -107,12 +107,12 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *pHostBuf,
int status;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pHostBuf != NULL); /* Required of BrdWrite(). */
+ DBC_REQUIRE(host_buf != NULL); /* Required of BrdWrite(). */
if (dev_obj) {
/* Require of BrdWrite() */
DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) (
- dev_obj->hbridge_context, pHostBuf,
+ dev_obj->hbridge_context, host_buf,
ulDspAddr, ul_num_bytes, mem_space);
/* Special case of getting the address only */
if (ul_num_bytes == 0)
@@ -668,23 +668,23 @@ void dev_get_msg_mgr(struct dev_object *hdev_obj, OUT struct msg_mgr **msg_man)
* Retrieve the Node Manager Handle
*/
int dev_get_node_manager(struct dev_object *hdev_obj,
- OUT struct node_mgr **phNodeMgr)
+ OUT struct node_mgr **node_man)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phNodeMgr != NULL);
+ DBC_REQUIRE(node_man != NULL);

if (hdev_obj) {
- *phNodeMgr = dev_obj->hnode_mgr;
+ *node_man = dev_obj->hnode_mgr;
} else {
- *phNodeMgr = NULL;
+ *node_man = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phNodeMgr != NULL) &&
- (*phNodeMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((node_man != NULL) &&
+ (*node_man == NULL)));
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 5ae0f14..875a267 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -288,7 +288,7 @@ static int add_ovly_info(void *handle, struct dbll_sect_info *sect_info,
static int add_ovly_node(struct dsp_uuid *uuid_obj,
enum dsp_dcdobjtype obj_type, IN void *handle);
static int add_ovly_sect(struct nldr_object *nldr_obj,
- struct ovly_sect **pList,
+ struct ovly_sect **lst,
struct dbll_sect_info *pSectInfo,
bool *exists, u32 addr, u32 bytes);
static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
@@ -424,7 +424,7 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,
/*
* ======== nldr_create ========
*/
-int nldr_create(OUT struct nldr_object **phNldr,
+int nldr_create(OUT struct nldr_object **nldr,
struct dev_object *hdev_obj,
IN CONST struct nldr_attrs *pattrs)
{
@@ -444,7 +444,7 @@ int nldr_create(OUT struct nldr_object **phNldr,
u16 i;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phNldr != NULL);
+ DBC_REQUIRE(nldr != NULL);
DBC_REQUIRE(hdev_obj != NULL);
DBC_REQUIRE(pattrs != NULL);
DBC_REQUIRE(pattrs->pfn_ovly != NULL);
@@ -593,16 +593,16 @@ int nldr_create(OUT struct nldr_object **phNldr,
&save_attrs, &ul_entry);
}
if (DSP_SUCCEEDED(status)) {
- *phNldr = (struct nldr_object *)nldr_obj;
+ *nldr = (struct nldr_object *)nldr_obj;
} else {
if (nldr_obj)
nldr_delete((struct nldr_object *)nldr_obj);

- *phNldr = NULL;
+ *nldr = NULL;
}
/* FIXME:Temp. Fix. Must be removed */
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phNldr)
- || (DSP_FAILED(status) && (*phNldr == NULL)));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *nldr)
+ || (DSP_FAILED(status) && (*nldr == NULL)));
return status;
}

@@ -775,21 +775,21 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
* Given a NLDR object, retrieve RMM Manager Handle
*/
int nldr_get_rmm_manager(struct nldr_object *nldr,
- OUT struct rmm_target_obj **phRmmMgr)
+ OUT struct rmm_target_obj **rmm_mgr)
{
int status = 0;
struct nldr_object *nldr_obj = nldr;
- DBC_REQUIRE(phRmmMgr != NULL);
+ DBC_REQUIRE(rmm_mgr != NULL);

if (nldr) {
- *phRmmMgr = nldr_obj->rmm;
+ *rmm_mgr = nldr_obj->rmm;
} else {
- *phRmmMgr = NULL;
+ *rmm_mgr = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phRmmMgr != NULL) &&
- (*phRmmMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((rmm_mgr != NULL) &&
+ (*rmm_mgr == NULL)));

return status;
}
@@ -1071,7 +1071,7 @@ func_end:
* ======== add_ovly_sect ========
*/
static int add_ovly_sect(struct nldr_object *nldr_obj,
- struct ovly_sect **pList,
+ struct ovly_sect **lst,
struct dbll_sect_info *pSectInfo,
bool *exists, u32 addr, u32 bytes)
{
@@ -1080,7 +1080,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect *ovly_section;
int status = 0;

- ovly_section = last_sect = *pList;
+ ovly_section = last_sect = *lst;
*exists = false;
while (ovly_section) {
/*
@@ -1111,9 +1111,9 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,

/* Add to the list */
if (DSP_SUCCEEDED(status)) {
- if (*pList == NULL) {
+ if (*lst == NULL) {
/* First in the list */
- *pList = new_sect;
+ *lst = new_sect;
} else {
last_sect->next_sect = new_sect;
}
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 9c2ea15..f10561b 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -1300,7 +1300,7 @@ func_end:
* Purpose:
* Create a NODE Manager object.
*/
-int node_create_mgr(OUT struct node_mgr **phNodeMgr,
+int node_create_mgr(OUT struct node_mgr **node_man,
struct dev_object *hdev_obj)
{
u32 i;
@@ -1311,10 +1311,10 @@ int node_create_mgr(OUT struct node_mgr **phNodeMgr,
int status = 0;
u8 dev_type;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phNodeMgr != NULL);
+ DBC_REQUIRE(node_man != NULL);
DBC_REQUIRE(hdev_obj != NULL);

- *phNodeMgr = NULL;
+ *node_man = NULL;
/* Allocate Node manager object */
node_mgr_obj = kzalloc(sizeof(struct node_mgr), GFP_KERNEL);
if (node_mgr_obj) {
@@ -1417,12 +1417,12 @@ int node_create_mgr(OUT struct node_mgr **phNodeMgr,
&nldr_attrs_obj);
}
if (DSP_SUCCEEDED(status))
- *phNodeMgr = node_mgr_obj;
+ *node_man = node_mgr_obj;
else
delete_node_mgr(node_mgr_obj);

- DBC_ENSURE((DSP_FAILED(status) && (*phNodeMgr == NULL)) ||
- (DSP_SUCCEEDED(status) && *phNodeMgr));
+ DBC_ENSURE((DSP_FAILED(status) && (*node_man == NULL)) ||
+ (DSP_SUCCEEDED(status) && *node_man));

return status;
}
@@ -1878,19 +1878,19 @@ func_end:
* ======== node_get_nldr_obj ========
*/
int node_get_nldr_obj(struct node_mgr *hnode_mgr,
- struct nldr_object **phNldrObj)
+ struct nldr_object **nldr_ovlyobj)
{
int status = 0;
struct node_mgr *node_mgr_obj = hnode_mgr;
- DBC_REQUIRE(phNldrObj != NULL);
+ DBC_REQUIRE(nldr_ovlyobj != NULL);

if (!hnode_mgr)
status = -EFAULT;
else
- *phNldrObj = node_mgr_obj->nldr_obj;
+ *nldr_ovlyobj = node_mgr_obj->nldr_obj;

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phNldrObj != NULL) &&
- (*phNldrObj == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((nldr_ovlyobj != NULL) &&
+ (*nldr_ovlyobj == NULL)));
return status;
}

@@ -1900,7 +1900,7 @@ int node_get_nldr_obj(struct node_mgr *hnode_mgr,
* Returns the Stream manager.
*/
int node_get_strm_mgr(struct node_object *hnode,
- struct strm_mgr **phStrmMgr)
+ struct strm_mgr **strm_man)
{
int status = 0;

@@ -1909,7 +1909,7 @@ int node_get_strm_mgr(struct node_object *hnode,
if (!hnode)
status = -EFAULT;
else
- *phStrmMgr = hnode->hnode_mgr->strm_mgr_obj;
+ *strm_man = hnode->hnode_mgr->strm_mgr_obj;

return status;
}
diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index 795332e..f6922f4
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -200,17 +200,17 @@ func_end:
* Purpose:
* Create a STRM manager object.
*/
-int strm_create(OUT struct strm_mgr **phStrmMgr,
+int strm_create(OUT struct strm_mgr **strm_man,
struct dev_object *dev_obj)
{
struct strm_mgr *strm_mgr_obj;
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phStrmMgr != NULL);
+ DBC_REQUIRE(strm_man != NULL);
DBC_REQUIRE(dev_obj != NULL);

- *phStrmMgr = NULL;
+ *strm_man = NULL;
/* Allocate STRM manager object */
strm_mgr_obj = kzalloc(sizeof(struct strm_mgr), GFP_KERNEL);
if (strm_mgr_obj == NULL)
@@ -229,12 +229,12 @@ int strm_create(OUT struct strm_mgr **phStrmMgr,
}

if (DSP_SUCCEEDED(status))
- *phStrmMgr = strm_mgr_obj;
+ *strm_man = strm_mgr_obj;
else
delete_strm_mgr(strm_mgr_obj);

- DBC_ENSURE((DSP_SUCCEEDED(status) && *phStrmMgr) ||
- (DSP_FAILED(status) && *phStrmMgr == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *strm_man) ||
+ (DSP_FAILED(status) && *strm_man == NULL));

return status;
}
@@ -468,7 +468,7 @@ int strm_issue(struct strm_object *stream_obj, IN u8 *pbuf, u32 ul_bytes,
*/
int strm_open(struct node_object *hnode, u32 dir, u32 index,
IN struct strm_attr *pattr,
- OUT struct strm_object **phStrm,
+ OUT struct strm_object **strm_objct,
struct process_context *pr_ctxt)
{
struct strm_mgr *strm_mgr_obj;
@@ -483,9 +483,9 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index,
void *hstrm_res;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phStrm != NULL);
+ DBC_REQUIRE(strm_objct != NULL);
DBC_REQUIRE(pattr != NULL);
- *phStrm = NULL;
+ *strm_objct = NULL;
if (dir != DSP_TONODE && dir != DSP_FROMNODE) {
status = -EPERM;
} else {
@@ -595,21 +595,22 @@ func_cont:
}
}
if (DSP_SUCCEEDED(status)) {
- *phStrm = strm_obj;
- drv_proc_insert_strm_res_element(*phStrm, &hstrm_res, pr_ctxt);
+ *strm_objct = strm_obj;
+ drv_proc_insert_strm_res_element(*strm_objct, &hstrm_res,
+ pr_ctxt);
} else {
(void)delete_strm(strm_obj);
}

/* ensure we return a documented error code */
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phStrm) ||
- (*phStrm == NULL && (status == -EFAULT ||
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *strm_objct) ||
+ (*strm_objct == NULL && (status == -EFAULT ||
status == -EPERM
|| status == -EINVAL)));

dev_dbg(bridge, "%s: hnode: %p dir: 0x%x index: 0x%x pattr: %p "
- "phStrm: %p status: 0x%x\n", __func__,
- hnode, dir, index, pattr, phStrm, status);
+ "strm_objct: %p status: 0x%x\n", __func__,
+ hnode, dir, index, pattr, strm_objct, status);
return status;
}

--
1.6.3.3

2010-07-08 23:12:15

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 04/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
hStrm to stream_obj
iMode to io_mode
irqMask to irq_mask
lOffset to offset
memPtr to mem_ptr
moduleId to module_id
msgCallback to msg_callback
msgList to msg_list
nArgc to num_argc
nEntryStart to entry_start
nMemSpace to mem_space
nStatus to node_status
nStrms to strms
numLibs to num_libs
numLockedEntries to num_locked_entries
pageSize to page_sz
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 26 ++--
drivers/staging/tidspbridge/core/msg_sm.c | 24 ++--
drivers/staging/tidspbridge/hw/hw_mmu.c | 42 +++---
drivers/staging/tidspbridge/hw/hw_mmu.h | 16 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 8 +-
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 2 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 8 +-
.../staging/tidspbridge/include/dspbridge/dspmsg.h | 2 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 4 +-
.../staging/tidspbridge/include/dspbridge/msg.h | 6 +-
.../tidspbridge/include/dspbridge/msgdefs.h | 2 +-
.../tidspbridge/include/dspbridge/nldrdefs.h | 8 +-
.../staging/tidspbridge/include/dspbridge/node.h | 4 +-
.../include/dspbridge/resourcecleanup.h | 4 +-
.../staging/tidspbridge/include/dspbridge/strm.h | 72 +++++-----
drivers/staging/tidspbridge/pmgr/cod.c | 16 +-
drivers/staging/tidspbridge/pmgr/dbll.c | 14 +-
drivers/staging/tidspbridge/pmgr/dev.c | 4 +-
drivers/staging/tidspbridge/pmgr/msg.c | 6 +-
drivers/staging/tidspbridge/rmgr/dbdcd.c | 4 +-
drivers/staging/tidspbridge/rmgr/drv.c | 4 +-
drivers/staging/tidspbridge/rmgr/node.c | 18 +-
drivers/staging/tidspbridge/rmgr/strm.c | 156 ++++++++++---------
24 files changed, 231 insertions(+), 223 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 80aecdf..19c4cc7 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -133,16 +133,16 @@ struct io_mgr {

/* Function Prototypes */
static void io_dispatch_chnl(IN struct io_mgr *pio_mgr,
- IN OUT struct chnl_object *pchnl, u8 iMode);
+ IN OUT struct chnl_object *pchnl, u8 io_mode);
static void io_dispatch_msg(IN struct io_mgr *pio_mgr,
struct msg_mgr *hmsg_mgr);
static void io_dispatch_pm(struct io_mgr *pio_mgr);
static void notify_chnl_complete(struct chnl_object *pchnl,
struct chnl_irp *chnl_packet_obj);
static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 iMode);
+ u8 io_mode);
static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 iMode);
+ u8 io_mode);
static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static void output_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
@@ -839,18 +839,18 @@ func_end:
* Proc-copy chanl dispatch.
*/
static void io_dispatch_chnl(IN struct io_mgr *pio_mgr,
- IN OUT struct chnl_object *pchnl, u8 iMode)
+ IN OUT struct chnl_object *pchnl, u8 io_mode)
{
if (!pio_mgr)
goto func_end;

/* See if there is any data available for transfer */
- if (iMode != IO_SERVICE)
+ if (io_mode != IO_SERVICE)
goto func_end;

/* Any channel will do for this mode */
- input_chnl(pio_mgr, pchnl, iMode);
- output_chnl(pio_mgr, pchnl, iMode);
+ input_chnl(pio_mgr, pchnl, io_mode);
+ output_chnl(pio_mgr, pchnl, io_mode);
func_end:
return;
}
@@ -1014,7 +1014,7 @@ void io_mbox_msg(u32 msg)
* interrupts the DSP.
*/
void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 iMode, OUT u16 *pwMbVal)
+ u8 io_mode, OUT u16 *pwMbVal)
{
struct chnl_mgr *chnl_mgr_obj;
struct shm *sm;
@@ -1023,7 +1023,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
goto func_end;
chnl_mgr_obj = pio_mgr->hchnl_mgr;
sm = pio_mgr->shared_mem;
- if (iMode == IO_INPUT) {
+ if (io_mode == IO_INPUT) {
/*
* Assertion fires if CHNL_AddIOReq() called on a stream
* which was cancelled, or attached to a dead board.
@@ -1034,7 +1034,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
IO_OR_VALUE(pio_mgr->hbridge_context, struct shm, sm,
host_free_mask, (1 << pchnl->chnl_id));
*pwMbVal = MBX_PCPY_CLASS;
- } else if (iMode == IO_OUTPUT) {
+ } else if (io_mode == IO_OUTPUT) {
/*
* This assertion fails if CHNL_AddIOReq() was called on a
* stream which was cancelled, or attached to a dead board.
@@ -1047,7 +1047,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
*/
chnl_mgr_obj->dw_output_mask |= (1 << pchnl->chnl_id);
} else {
- DBC_ASSERT(iMode); /* Shouldn't get here. */
+ DBC_ASSERT(io_mode); /* Shouldn't get here. */
}
func_end:
return;
@@ -1116,7 +1116,7 @@ func_end:
* Dispatch a buffer on an input channel.
*/
static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 iMode)
+ u8 io_mode)
{
struct chnl_mgr *chnl_mgr_obj;
struct shm *sm;
@@ -1403,7 +1403,7 @@ func_end:
* Dispatch a buffer on an output channel.
*/
static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 iMode)
+ u8 io_mode)
{
struct chnl_mgr *chnl_mgr_obj;
struct shm *sm;
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c b/drivers/staging/tidspbridge/core/msg_sm.c
index 7c6d6cc..0a68df9 100644
--- a/drivers/staging/tidspbridge/core/msg_sm.c
+++ b/drivers/staging/tidspbridge/core/msg_sm.c
@@ -38,10 +38,10 @@
#include <dspbridge/dspmsg.h>

/* ----------------------------------- Function Prototypes */
-static int add_new_msg(struct lst_list *msgList);
+static int add_new_msg(struct lst_list *msg_list);
static void delete_msg_mgr(struct msg_mgr *hmsg_mgr);
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP);
-static void free_msg_list(struct lst_list *msgList);
+static void free_msg_list(struct lst_list *msg_list);

/*
* ======== bridge_msg_create ========
@@ -50,13 +50,13 @@ static void free_msg_list(struct lst_list *msgList);
*/
int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
struct dev_object *hdev_obj,
- msg_onexit msgCallback)
+ msg_onexit msg_callback)
{
struct msg_mgr *msg_mgr_obj;
struct io_mgr *hio_mgr;
int status = 0;

- if (!phMsgMgr || !msgCallback || !hdev_obj) {
+ if (!phMsgMgr || !msg_callback || !hdev_obj) {
status = -EFAULT;
goto func_end;
}
@@ -70,7 +70,7 @@ int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
msg_mgr_obj = kzalloc(sizeof(struct msg_mgr), GFP_KERNEL);

if (msg_mgr_obj) {
- msg_mgr_obj->on_exit = msgCallback;
+ msg_mgr_obj->on_exit = msg_callback;
msg_mgr_obj->hio_mgr = hio_mgr;
/* List of MSG_QUEUEs */
msg_mgr_obj->queue_list = kzalloc(sizeof(struct lst_list),
@@ -551,7 +551,7 @@ void bridge_msg_set_queue_id(struct msg_queue *msg_queue_obj, u32 msgq_id)
* ======== add_new_msg ========
* Must be called in message manager critical section.
*/
-static int add_new_msg(struct lst_list *msgList)
+static int add_new_msg(struct lst_list *msg_list)
{
struct msg_frame *pmsg;
int status = 0;
@@ -559,7 +559,7 @@ static int add_new_msg(struct lst_list *msgList)
pmsg = kzalloc(sizeof(struct msg_frame), GFP_ATOMIC);
if (pmsg != NULL) {
lst_init_elem((struct list_head *)pmsg);
- lst_put_tail(msgList, (struct list_head *)pmsg);
+ lst_put_tail(msg_list, (struct list_head *)pmsg);
} else {
status = -ENOMEM;
}
@@ -655,19 +655,19 @@ func_end:
/*
* ======== free_msg_list ========
*/
-static void free_msg_list(struct lst_list *msgList)
+static void free_msg_list(struct lst_list *msg_list)
{
struct msg_frame *pmsg;

- if (!msgList)
+ if (!msg_list)
goto func_end;

- while ((pmsg = (struct msg_frame *)lst_get_head(msgList)) != NULL)
+ while ((pmsg = (struct msg_frame *)lst_get_head(msg_list)) != NULL)
kfree(pmsg);

- DBC_ASSERT(LST_IS_EMPTY(msgList));
+ DBC_ASSERT(LST_IS_EMPTY(msg_list));

- kfree(msgList);
+ kfree(msg_list);
func_end:
return;
}
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index d5d562d..b3fb91f 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -80,7 +80,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
* TypE : const u32
* Description : Base Address of instance of MMU module
*
- * Identifier : pageSize
+ * Identifier : page_sz
* TypE : const u32
* Description : It indicates the page size
*
@@ -112,7 +112,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
* METHOD: : Check the Input parameters and set the CAM entry.
*/
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
- const u32 pageSize,
+ const u32 page_sz,
const u32 preservedBit,
const u32 validBit,
const u32 virtual_addr_tag);
@@ -183,11 +183,11 @@ hw_status hw_mmu_disable(const void __iomem *base_address)
}

hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
- u32 numLockedEntries)
+ u32 num_locked_entries)
{
hw_status status = RET_OK;

- MMUMMU_LOCK_BASE_VALUE_WRITE32(base_address, numLockedEntries);
+ MMUMMU_LOCK_BASE_VALUE_WRITE32(base_address, num_locked_entries);

return status;
}
@@ -202,44 +202,44 @@ hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
return status;
}

-hw_status hw_mmu_event_ack(const void __iomem *base_address, u32 irqMask)
+hw_status hw_mmu_event_ack(const void __iomem *base_address, u32 irq_mask)
{
hw_status status = RET_OK;

- MMUMMU_IRQSTATUS_WRITE_REGISTER32(base_address, irqMask);
+ MMUMMU_IRQSTATUS_WRITE_REGISTER32(base_address, irq_mask);

return status;
}

-hw_status hw_mmu_event_disable(const void __iomem *base_address, u32 irqMask)
+hw_status hw_mmu_event_disable(const void __iomem *base_address, u32 irq_mask)
{
hw_status status = RET_OK;
u32 irq_reg;

irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(base_address);

- MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg & ~irqMask);
+ MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg & ~irq_mask);

return status;
}

-hw_status hw_mmu_event_enable(const void __iomem *base_address, u32 irqMask)
+hw_status hw_mmu_event_enable(const void __iomem *base_address, u32 irq_mask)
{
hw_status status = RET_OK;
u32 irq_reg;

irq_reg = MMUMMU_IRQENABLE_READ_REGISTER32(base_address);

- MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg | irqMask);
+ MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, irq_reg | irq_mask);

return status;
}

-hw_status hw_mmu_event_status(const void __iomem *base_address, u32 *irqMask)
+hw_status hw_mmu_event_status(const void __iomem *base_address, u32 *irq_mask)
{
hw_status status = RET_OK;

- *irqMask = MMUMMU_IRQSTATUS_READ_REGISTER32(base_address);
+ *irq_mask = MMUMMU_IRQSTATUS_READ_REGISTER32(base_address);

return status;
}
@@ -293,13 +293,13 @@ hw_status hw_mmu_twl_disable(const void __iomem *base_address)
}

hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
- u32 pageSize)
+ u32 page_sz)
{
hw_status status = RET_OK;
u32 virtual_addr_tag;
enum hw_mmu_page_size_t pg_size_bits;

- switch (pageSize) {
+ switch (page_sz) {
case HW_PAGE_SIZE4KB:
pg_size_bits = HW_MMU_SMALL_PAGE;
break;
@@ -333,7 +333,7 @@ hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
- u32 pageSize,
+ u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
s8 preservedBit, s8 validBit)
@@ -346,13 +346,13 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
/*Check the input Parameters */
CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
- CHECK_INPUT_RANGE_MIN0(pageSize, MMU_PAGE_MAX, RET_PARAM_OUT_OF_RANGE,
+ CHECK_INPUT_RANGE_MIN0(page_sz, MMU_PAGE_MAX, RET_PARAM_OUT_OF_RANGE,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
CHECK_INPUT_RANGE_MIN0(map_attrs->element_size, MMU_ELEMENTSIZE_MAX,
RET_PARAM_OUT_OF_RANGE, RES_MMU_BASE +
RES_INVALID_INPUT_PARAM);

- switch (pageSize) {
+ switch (page_sz) {
case HW_PAGE_SIZE4KB:
mmu_pg_size = HW_MMU_SMALL_PAGE;
break;
@@ -403,13 +403,13 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
u32 physicalAddr,
u32 virtualAddr,
- u32 pageSize, struct hw_mmu_map_attrs_t *map_attrs)
+ u32 page_sz, struct hw_mmu_map_attrs_t *map_attrs)
{
hw_status status = RET_OK;
u32 pte_addr, pte_val;
s32 num_entries = 1;

- switch (pageSize) {
+ switch (page_sz) {
case HW_PAGE_SIZE4KB:
pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
virtualAddr &
@@ -536,7 +536,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address)

/* mmu_set_cam_entry */
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
- const u32 pageSize,
+ const u32 page_sz,
const u32 preservedBit,
const u32 validBit,
const u32 virtual_addr_tag)
@@ -549,7 +549,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

mmu_cam_reg = (virtual_addr_tag << 12);
- mmu_cam_reg = (mmu_cam_reg) | (pageSize) | (validBit << 2) |
+ mmu_cam_reg = (mmu_cam_reg) | (page_sz) | (validBit << 2) |
(preservedBit << 3);

/* write values to register */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 2a75268..84d15a2 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -47,23 +47,23 @@ extern hw_status hw_mmu_enable(const void __iomem *base_address);
extern hw_status hw_mmu_disable(const void __iomem *base_address);

extern hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
- u32 numLockedEntries);
+ u32 num_locked_entries);

extern hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
u32 victimEntryNum);

/* For MMU faults */
extern hw_status hw_mmu_event_ack(const void __iomem *base_address,
- u32 irqMask);
+ u32 irq_mask);

extern hw_status hw_mmu_event_disable(const void __iomem *base_address,
- u32 irqMask);
+ u32 irq_mask);

extern hw_status hw_mmu_event_enable(const void __iomem *base_address,
- u32 irqMask);
+ u32 irq_mask);

extern hw_status hw_mmu_event_status(const void __iomem *base_address,
- u32 *irqMask);
+ u32 *irq_mask);

extern hw_status hw_mmu_fault_addr_read(const void __iomem *base_address,
u32 *addr);
@@ -77,12 +77,12 @@ extern hw_status hw_mmu_twl_enable(const void __iomem *base_address);
extern hw_status hw_mmu_twl_disable(const void __iomem *base_address);

extern hw_status hw_mmu_tlb_flush(const void __iomem *base_address,
- u32 virtualAddr, u32 pageSize);
+ u32 virtualAddr, u32 page_sz);

extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr,
u32 virtualAddr,
- u32 pageSize,
+ u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
s8 preservedBit, s8 validBit);
@@ -91,7 +91,7 @@ extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
u32 physicalAddr,
u32 virtualAddr,
- u32 pageSize,
+ u32 page_sz,
struct hw_mmu_map_attrs_t *map_attrs);

extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 6914247..ae711df 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -50,7 +50,7 @@ struct cod_attrs {
* and freeing DSP memory.
*/
typedef u32(*cod_writefxn) (void *priv_ref, u32 ulDspAddr,
- void *pbuf, u32 ul_num_bytes, u32 nMemSpace);
+ void *pbuf, u32 ul_num_bytes, u32 mem_space);

/*
* ======== cod_close ========
@@ -276,7 +276,7 @@ extern bool cod_init(void);
* qualified pathname.
* Parameters:
* hmgr: manager to load the code with
- * nArgc: number of arguments in the args array
+ * num_argc: number of arguments in the args array
* args: array of strings for arguments to DSP program
* write_fxn: board-specific function to write data to DSP system
* pArb: arbitrary pointer to be passed as first arg to write_fxn
@@ -287,14 +287,14 @@ extern bool cod_init(void);
* Requires:
* COD module initialized.
* hmgr is valid.
- * nArgc > 0.
+ * num_argc > 0.
* args != NULL.
* args[0] != NULL.
* pfn_write != NULL.
* Ensures:
*/
extern int cod_load_base(struct cod_manager *cod_mgr_obj,
- u32 nArgc, char *args[],
+ u32 num_argc, char *args[],
cod_writefxn pfn_write, void *pArb,
char *envp[]);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index 54e8238..6658b74 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -153,7 +153,7 @@ extern void dcd_exit(void);
* Parameters:
* hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid for a library.
- * numLibs: Size of uuid array (number of library uuids).
+ * num_libs: Size of uuid array (number of library uuids).
* pDepLibUuids: Array of dependent library uuids to be filled in.
* pPersistentDepLibs: Array indicating if corresponding lib is persistent.
* phase: phase to obtain correct input library
@@ -171,7 +171,7 @@ extern void dcd_exit(void);
*/
extern int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- u16 numLibs,
+ u16 num_libs,
OUT struct dsp_uuid *pDepLibUuids,
OUT bool *pPersistentDepLibs,
IN enum nldr_phase phase);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 2ee1c41..72d4591 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -56,7 +56,7 @@
*/
extern u32 dev_brd_write_fxn(void *pArb,
u32 ulDspAddr,
- void *pHostBuf, u32 ul_num_bytes, u32 nMemSpace);
+ void *pHostBuf, u32 ul_num_bytes, u32 mem_space);

/*
* ======== dev_create_device ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 4c06107..cc9f520 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -875,19 +875,19 @@ typedef int(*fxn_io_getprocload) (struct io_mgr *hio_mgr,
* Parameters:
* phMsgMgr: Location to store msg_ctrl manager on output.
* hdev_obj: Handle to a device object.
- * msgCallback: Called whenever an RMS_EXIT message is received.
+ * msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* 0: Success.
* -ENOMEM: Insufficient memory.
* Requires:
* phMsgMgr != NULL.
- * msgCallback != NULL.
+ * msg_callback != NULL.
* hdev_obj != NULL.
* Ensures:
*/
typedef int(*fxn_msg_create)
(OUT struct msg_mgr **phMsgMgr,
- struct dev_object *hdev_obj, msg_onexit msgCallback);
+ struct dev_object *hdev_obj, msg_onexit msg_callback);

/*
* ======== bridge_msg_create_queue ========
@@ -900,7 +900,7 @@ typedef int(*fxn_msg_create)
* phMsgQueue: Location to store msg_ctrl queue on output.
* msgq_id: Identifier for messages (node environment pointer).
* max_msgs: Max number of simultaneous messages for the node.
- * h: Handle passed to hmsg_mgr->msgCallback().
+ * h: Handle passed to hmsg_mgr->msg_callback().
* Returns:
* 0: Success.
* -ENOMEM: Insufficient memory.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
index a10634e..18f56e1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
@@ -28,7 +28,7 @@

extern int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
struct dev_object *hdev_obj,
- msg_onexit msgCallback);
+ msg_onexit msg_callback);

extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
OUT struct msg_queue **phMsgQueue,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index a2c76bc..dbbda05 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -108,7 +108,7 @@ void io_mbox_msg(u32 msg);
* Parameters:
* hio_mgr: IO manager handle.
* pchnl: Ptr to the channel requesting I/O.
- * iMode: Mode of channel: {IO_INPUT | IO_OUTPUT}.
+ * io_mode: Mode of channel: {IO_INPUT | IO_OUTPUT}.
* Returns:
* Requires:
* pchnl != NULL
@@ -116,7 +116,7 @@ void io_mbox_msg(u32 msg);
*/
extern void io_request_chnl(struct io_mgr *hio_mgr,
struct chnl_object *pchnl,
- u8 iMode, OUT u16 *pwMbVal);
+ u8 io_mode, OUT u16 *pwMbVal);

/*
* ======== iosm_schedule ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/msg.h b/drivers/staging/tidspbridge/include/dspbridge/msg.h
index baac5f3..973bce2 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/msg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/msg.h
@@ -31,18 +31,18 @@
* Parameters:
* phMsgMgr: Location to store msg_ctrl manager handle on output.
* hdev_obj: The device object.
- * msgCallback: Called whenever an RMS_EXIT message is received.
+ * msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* Requires:
* msg_mod_init(void) called.
* phMsgMgr != NULL.
* hdev_obj != NULL.
- * msgCallback != NULL.
+ * msg_callback != NULL.
* Ensures:
*/
extern int msg_create(OUT struct msg_mgr **phMsgMgr,
struct dev_object *hdev_obj,
- msg_onexit msgCallback);
+ msg_onexit msg_callback);

/*
* ======== msg_delete ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/msgdefs.h b/drivers/staging/tidspbridge/include/dspbridge/msgdefs.h
index fe24656..80a3fa1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/msgdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/msgdefs.h
@@ -24,6 +24,6 @@ struct msg_mgr;
struct msg_queue;

/* Function prototype for callback to be called on RMS_EXIT message received */
-typedef void (*msg_onexit) (void *h, s32 nStatus);
+typedef void (*msg_onexit) (void *h, s32 node_status);

#endif /* MSGDEFS_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index 9be0483..d53b43e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -48,7 +48,7 @@ enum nldr_loadtype {
* ulDspRunAddr: Run address of code or data.
* ulDspLoadAddr: Load address of code or data.
* ul_num_bytes: Number of (GPP) bytes to copy.
- * nMemSpace: RMS_CODE or RMS_DATA.
+ * mem_space: RMS_CODE or RMS_DATA.
* Returns:
* ul_num_bytes: Success.
* 0: Failure.
@@ -56,7 +56,7 @@ enum nldr_loadtype {
* Ensures:
*/
typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
- u32 ulDspLoadAddr, u32 ul_num_bytes, u32 nMemSpace);
+ u32 ulDspLoadAddr, u32 ul_num_bytes, u32 mem_space);

/*
* ======== nldr_writefxn ========
@@ -66,7 +66,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
* ulDspAddr: Address of code or data.
* pbuf: Code or data to be written
* ul_num_bytes: Number of (GPP) bytes to write.
- * nMemSpace: DBLL_DATA or DBLL_CODE.
+ * mem_space: DBLL_DATA or DBLL_CODE.
* Returns:
* ul_num_bytes: Success.
* 0: Failure.
@@ -75,7 +75,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
*/
typedef u32(*nldr_writefxn) (void *priv_ref,
u32 ulDspAddr, void *pbuf,
- u32 ul_num_bytes, u32 nMemSpace);
+ u32 ul_num_bytes, u32 mem_space);

/*
* ======== nldr_attrs ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index 9c64b5a..fc9add2 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -420,11 +420,11 @@ extern bool node_init(void);
* called by the Bridge driver when an exit message for a node is received.
* Parameters:
* hnode: Handle of the node that the exit message is for.
- * nStatus: Return status of the node's execute phase.
+ * node_status: Return status of the node's execute phase.
* Returns:
* Ensures:
*/
-void node_on_exit(struct node_object *hnode, s32 nStatus);
+void node_on_exit(struct node_object *hnode, s32 node_status);

/*
* ======== node_pause ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
index 1fa7d13..6c78f2d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
@@ -48,11 +48,11 @@ extern void drv_proc_node_update_status(void *node_resource, s32 status);

extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_res);

-extern int drv_proc_insert_strm_res_element(void *hStrm,
+extern int drv_proc_insert_strm_res_element(void *stream_obj,
void *strm_res,
void *pPctxt);

-extern int drv_get_strm_res_element(void *hStrm, void *strm_res,
+extern int drv_get_strm_res_element(void *stream_obj, void *strm_res,
void *ctxt);

extern int drv_proc_remove_strm_res_element(void *strm_res,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/strm.h b/drivers/staging/tidspbridge/include/dspbridge/strm.h
index 2ac630d..c4a4d65 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/strm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/strm.h
@@ -29,13 +29,13 @@
* Purpose:
* Allocate data buffer(s) for use with a stream.
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* usize: Size (GPP bytes) of the buffer(s).
* num_bufs: Number of buffers to allocate.
* ap_buffer: Array to hold buffer addresses.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -ENOMEM: Insufficient memory.
* -EPERM: Failure occurred, unable to allocate buffers.
* -EINVAL: usize must be > 0 bytes.
@@ -44,7 +44,7 @@
* ap_buffer != NULL.
* Ensures:
*/
-extern int strm_allocate_buffer(struct strm_object *hStrm,
+extern int strm_allocate_buffer(struct strm_object *stream_obj,
u32 usize,
OUT u8 **ap_buffer,
u32 num_bufs,
@@ -55,10 +55,10 @@ extern int strm_allocate_buffer(struct strm_object *hStrm,
* Purpose:
* Close a stream opened with strm_open().
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -EPIPE: Some data buffers issued to the stream have not
* been reclaimed.
* -EPERM: Failure to close stream.
@@ -66,7 +66,7 @@ extern int strm_allocate_buffer(struct strm_object *hStrm,
* strm_init(void) called.
* Ensures:
*/
-extern int strm_close(struct strm_object *hStrm,
+extern int strm_close(struct strm_object *stream_obj,
struct process_context *pr_ctxt);

/*
@@ -125,7 +125,7 @@ extern void strm_exit(void);
* Purpose:
* Free buffer(s) allocated with strm_allocate_buffer.
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* ap_buffer: Array containing buffer addresses.
* num_bufs: Number of buffers to be freed.
* Returns:
@@ -137,7 +137,7 @@ extern void strm_exit(void);
* ap_buffer != NULL.
* Ensures:
*/
-extern int strm_free_buffer(struct strm_object *hStrm,
+extern int strm_free_buffer(struct strm_object *stream_obj,
u8 **ap_buffer, u32 num_bufs,
struct process_context *pr_ctxt);

@@ -147,17 +147,17 @@ extern int strm_free_buffer(struct strm_object *hStrm,
* Get stream's user event handle. This function is used when closing
* a stream, so the event can be closed.
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* ph_event: Location to store event handle on output.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* Requires:
* strm_init(void) called.
* ph_event != NULL.
* Ensures:
*/
-extern int strm_get_event_handle(struct strm_object *hStrm,
+extern int strm_get_event_handle(struct strm_object *stream_obj,
OUT void **ph_event);

/*
@@ -166,12 +166,12 @@ extern int strm_get_event_handle(struct strm_object *hStrm,
* Get information about a stream. User's dsp_streaminfo is contained
* in stream_info struct. stream_info also contains Bridge private info.
* Parameters:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* stream_info: Location to store stream info on output.
* uSteamInfoSize: Size of user's dsp_streaminfo structure.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -EINVAL: stream_info_size < sizeof(dsp_streaminfo).
* -EPERM: Unable to get stream info.
* Requires:
@@ -179,7 +179,7 @@ extern int strm_get_event_handle(struct strm_object *hStrm,
* stream_info != NULL.
* Ensures:
*/
-extern int strm_get_info(struct strm_object *hStrm,
+extern int strm_get_info(struct strm_object *stream_obj,
OUT struct stream_info *stream_info,
u32 stream_info_size);

@@ -195,18 +195,18 @@ extern int strm_get_info(struct strm_object *hStrm,
* After a successful call to strm_idle(), all buffers can immediately
* be reclaimed.
* Parameters:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* flush_data: If TRUE, discard output buffers.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -ETIME: A timeout occurred before the stream could be idled.
* -EPERM: Unable to idle stream.
* Requires:
* strm_init(void) called.
* Ensures:
*/
-extern int strm_idle(struct strm_object *hStrm, bool flush_data);
+extern int strm_idle(struct strm_object *stream_obj, bool flush_data);

/*
* ======== strm_init ========
@@ -225,14 +225,14 @@ extern bool strm_init(void);
* Purpose:
* Send a buffer of data to a stream.
* Parameters:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* pbuf: Pointer to buffer of data to be sent to the stream.
* ul_bytes: Number of bytes of data in the buffer.
* ul_buf_size: Actual buffer size in bytes.
* dw_arg: A user argument that travels with the buffer.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -ENOSR: The stream is full.
* -EPERM: Failure occurred, unable to issue buffer.
* Requires:
@@ -240,7 +240,7 @@ extern bool strm_init(void);
* pbuf != NULL.
* Ensures:
*/
-extern int strm_issue(struct strm_object *hStrm, IN u8 * pbuf,
+extern int strm_issue(struct strm_object *stream_obj, IN u8 * pbuf,
u32 ul_bytes, u32 ul_buf_size, IN u32 dw_arg);

/*
@@ -281,19 +281,19 @@ extern int strm_open(struct node_object *hnode, u32 dir,
* Prepare a data buffer not allocated by DSPStream_AllocateBuffers()
* for use with a stream.
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* usize: Size (GPP bytes) of the buffer.
* pbuffer: Buffer address.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -EPERM: Failure occurred, unable to prepare buffer.
* Requires:
* strm_init(void) called.
* pbuffer != NULL.
* Ensures:
*/
-extern int strm_prepare_buffer(struct strm_object *hStrm,
+extern int strm_prepare_buffer(struct strm_object *stream_obj,
u32 usize, u8 *pbuffer);

/*
@@ -301,7 +301,7 @@ extern int strm_prepare_buffer(struct strm_object *hStrm,
* Purpose:
* Request a buffer back from a stream.
* Parameters:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* buf_ptr: Location to store pointer to reclaimed buffer.
* pulBytes: Location where number of bytes of data in the
* buffer will be written.
@@ -310,7 +310,7 @@ extern int strm_prepare_buffer(struct strm_object *hStrm,
* the buffer will be written.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -ETIME: A timeout occurred before a buffer could be
* retrieved.
* -EPERM: Failure occurred, unable to reclaim buffer.
@@ -321,7 +321,7 @@ extern int strm_prepare_buffer(struct strm_object *hStrm,
* pdw_arg != NULL.
* Ensures:
*/
-extern int strm_reclaim(struct strm_object *hStrm,
+extern int strm_reclaim(struct strm_object *stream_obj,
OUT u8 **buf_ptr, u32 * pulBytes,
u32 *pulBufSize, u32 *pdw_arg);

@@ -330,13 +330,13 @@ extern int strm_reclaim(struct strm_object *hStrm,
* Purpose:
* Register to be notified on specific events for this stream.
* Parameters:
- * hStrm: Stream handle returned by strm_open().
+ * stream_obj: Stream handle returned by strm_open().
* event_mask: Mask of types of events to be notified about.
* notify_type: Type of notification to be sent.
* hnotification: Handle to be used for notification.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -ENOMEM: Insufficient memory on GPP.
* -EINVAL: event_mask is invalid.
* -ENOSYS: Notification type specified by notify_type is not
@@ -346,7 +346,7 @@ extern int strm_reclaim(struct strm_object *hStrm,
* hnotification != NULL.
* Ensures:
*/
-extern int strm_register_notify(struct strm_object *hStrm,
+extern int strm_register_notify(struct strm_object *stream_obj,
u32 event_mask, u32 notify_type,
struct dsp_notification
*hnotification);
@@ -357,12 +357,12 @@ extern int strm_register_notify(struct strm_object *hStrm,
* Select a ready stream.
* Parameters:
* strm_tab: Array of stream handles returned from strm_open().
- * nStrms: Number of stream handles in array.
+ * strms: Number of stream handles in array.
* pmask: Location to store mask of ready streams on output.
* utimeout: Timeout value (milliseconds).
* Returns:
* 0: Success.
- * -EDOM: nStrms out of range.
+ * -EDOM: strms out of range.

* -EFAULT: Invalid stream handle in array.
* -ETIME: A timeout occurred before a stream became ready.
@@ -370,14 +370,14 @@ extern int strm_register_notify(struct strm_object *hStrm,
* Requires:
* strm_init(void) called.
* strm_tab != NULL.
- * nStrms > 0.
+ * strms > 0.
* pmask != NULL.
* Ensures:
* 0: *pmask != 0 || utimeout == 0.
* Error: *pmask == 0.
*/
extern int strm_select(IN struct strm_object **strm_tab,
- u32 nStrms, OUT u32 *pmask, u32 utimeout);
+ u32 strms, OUT u32 *pmask, u32 utimeout);

/*
* ======== strm_unprepare_buffer ========
@@ -386,19 +386,19 @@ extern int strm_select(IN struct strm_object **strm_tab,
* with DSPStream_PrepareBuffer(), and that will no longer be used with
* the stream.
* Parameter:
- * hStrm: Stream handle returned from strm_open().
+ * stream_obj: Stream handle returned from strm_open().
* usize: Size (GPP bytes) of the buffer.
* pbuffer: Buffer address.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hStrm.
+ * -EFAULT: Invalid stream_obj.
* -EPERM: Failure occurred, unable to unprepare buffer.
* Requires:
* strm_init(void) called.
* pbuffer != NULL.
* Ensures:
*/
-extern int strm_unprepare_buffer(struct strm_object *hStrm,
+extern int strm_unprepare_buffer(struct strm_object *stream_obj,
u32 usize, u8 *pbuffer);

#endif /* STRM_ */
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index a9b0491..7682035 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -155,7 +155,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 count,
return -EINVAL;
}

-static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 origin)
+static s32 cod_f_seek(struct file *filp, s32 offset, s32 origin)
{
loff_t dw_cur_pos;

@@ -164,7 +164,7 @@ static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 origin)
return -EFAULT;

/* based on the origin flag, move the internal pointer */
- dw_cur_pos = filp->f_op->llseek(filp, lOffset, origin);
+ dw_cur_pos = filp->f_op->llseek(filp, offset, origin);

if ((s32) dw_cur_pos < 0)
return -EPERM;
@@ -487,12 +487,12 @@ bool cod_init(void)
* loaded must be the first element of the args array and must be a fully
* qualified pathname.
* Details:
- * if nArgc doesn't match the number of arguments in the args array, the
+ * if num_argc doesn't match the number of arguments in the args array, the
* args array is searched for a NULL terminating entry, and argc is
* recalculated to reflect this. In this way, we can support NULL
- * terminating args arrays, if nArgc is very large.
+ * terminating args arrays, if num_argc is very large.
*/
-int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *args[],
+int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
cod_writefxn pfn_write, void *pArb, char *envp[])
{
dbll_flags flags;
@@ -503,7 +503,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *args[],

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(nArgc > 0);
+ DBC_REQUIRE(num_argc > 0);
DBC_REQUIRE(args != NULL);
DBC_REQUIRE(args[0] != NULL);
DBC_REQUIRE(pfn_write != NULL);
@@ -513,9 +513,9 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *args[],
* Make sure every argv[] stated in argc has a value, or change argc to
* reflect true number in NULL terminated argv array.
*/
- for (i = 0; i < nArgc; i++) {
+ for (i = 0; i < num_argc; i++) {
if (args[i] == NULL) {
- nArgc = i;
+ num_argc = i;
break;
}
}
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 3619d53..6a65bde 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -156,14 +156,14 @@ static struct dynload_symbol *dbll_find_symbol(struct dynamic_loader_sym *this,
const char *name);
static struct dynload_symbol *dbll_add_to_symbol_table(struct dynamic_loader_sym
*this, const char *name,
- unsigned moduleId);
+ unsigned module_id);
static struct dynload_symbol *find_in_symbol_table(struct dynamic_loader_sym
*this, const char *name,
unsigned moduleid);
static void dbll_purge_symbol_table(struct dynamic_loader_sym *this,
- unsigned moduleId);
+ unsigned module_id);
static void *allocate(struct dynamic_loader_sym *this, unsigned memsize);
-static void deallocate(struct dynamic_loader_sym *this, void *memPtr);
+static void deallocate(struct dynamic_loader_sym *this, void *mem_ptr);
static void dbll_err_report(struct dynamic_loader_sym *this, const char *errstr,
va_list args);
/* dynamic_loader_allocate */
@@ -1094,7 +1094,7 @@ static struct dynload_symbol *find_in_symbol_table(struct dynamic_loader_sym
*/
static struct dynload_symbol *dbll_add_to_symbol_table(struct dynamic_loader_sym
*this, const char *name,
- unsigned moduleId)
+ unsigned module_id)
{
struct dbll_symbol *sym_ptr = NULL;
struct dbll_symbol symbol;
@@ -1150,7 +1150,7 @@ static struct dynload_symbol *dbll_add_to_symbol_table(struct dynamic_loader_sym
* ======== dbll_purge_symbol_table ========
*/
static void dbll_purge_symbol_table(struct dynamic_loader_sym *this,
- unsigned moduleId)
+ unsigned module_id)
{
struct ldr_symbol *ldr_sym = (struct ldr_symbol *)this;
struct dbll_library_obj *lib;
@@ -1183,7 +1183,7 @@ static void *allocate(struct dynamic_loader_sym *this, unsigned memsize)
/*
* ======== deallocate ========
*/
-static void deallocate(struct dynamic_loader_sym *this, void *memPtr)
+static void deallocate(struct dynamic_loader_sym *this, void *mem_ptr)
{
struct ldr_symbol *ldr_sym = (struct ldr_symbol *)this;
struct dbll_library_obj *lib;
@@ -1192,7 +1192,7 @@ static void deallocate(struct dynamic_loader_sym *this, void *memPtr)
lib = ldr_sym->lib;
DBC_REQUIRE(lib);

- kfree(memPtr);
+ kfree(mem_ptr);
}

/*
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 1f70605..c90de57 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -100,7 +100,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* device's bridge_brd_write() function.
*/
u32 dev_brd_write_fxn(void *pArb, u32 ulDspAddr, void *pHostBuf,
- u32 ul_num_bytes, u32 nMemSpace)
+ u32 ul_num_bytes, u32 mem_space)
{
struct dev_object *dev_obj = (struct dev_object *)pArb;
u32 ul_written = 0;
@@ -113,7 +113,7 @@ u32 dev_brd_write_fxn(void *pArb, u32 ulDspAddr, void *pHostBuf,
DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) (
dev_obj->hbridge_context, pHostBuf,
- ulDspAddr, ul_num_bytes, nMemSpace);
+ ulDspAddr, ul_num_bytes, mem_space);
/* Special case of getting the address only */
if (ul_num_bytes == 0)
ul_num_bytes = 1;
diff --git a/drivers/staging/tidspbridge/pmgr/msg.c b/drivers/staging/tidspbridge/pmgr/msg.c
index 64f1cb4..6122cd4 100644
--- a/drivers/staging/tidspbridge/pmgr/msg.c
+++ b/drivers/staging/tidspbridge/pmgr/msg.c
@@ -46,7 +46,7 @@ static u32 refs; /* module reference count */
* can exist per device object.
*/
int msg_create(OUT struct msg_mgr **phMsgMgr,
- struct dev_object *hdev_obj, msg_onexit msgCallback)
+ struct dev_object *hdev_obj, msg_onexit msg_callback)
{
struct bridge_drv_interface *intf_fxns;
struct msg_mgr_ *msg_mgr_obj;
@@ -55,7 +55,7 @@ int msg_create(OUT struct msg_mgr **phMsgMgr,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phMsgMgr != NULL);
- DBC_REQUIRE(msgCallback != NULL);
+ DBC_REQUIRE(msg_callback != NULL);
DBC_REQUIRE(hdev_obj != NULL);

*phMsgMgr = NULL;
@@ -64,7 +64,7 @@ int msg_create(OUT struct msg_mgr **phMsgMgr,

/* Let Bridge message module finish the create: */
status =
- (*intf_fxns->pfn_msg_create) (&hmsg_mgr, hdev_obj, msgCallback);
+ (*intf_fxns->pfn_msg_create) (&hmsg_mgr, hdev_obj, msg_callback);

if (DSP_SUCCEEDED(status)) {
/* Fill in DSP API message module's fields of the msg_mgr
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 4fe96bf..9d05166 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -327,7 +327,7 @@ void dcd_exit(void)
*/
int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- u16 numLibs, OUT struct dsp_uuid *pDepLibUuids,
+ u16 num_libs, OUT struct dsp_uuid *pDepLibUuids,
OUT bool *pPersistentDepLibs,
IN enum nldr_phase phase)
{
@@ -340,7 +340,7 @@ int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
DBC_REQUIRE(pPersistentDepLibs != NULL);

status =
- get_dep_lib_info(hdcd_mgr, uuid_obj, &numLibs, NULL, pDepLibUuids,
+ get_dep_lib_info(hdcd_mgr, uuid_obj, &num_libs, NULL, pDepLibUuids,
pPersistentDepLibs, phase);

return status;
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 2c06f82..2cd2a6f 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -375,7 +375,7 @@ int drv_remove_all_strm_res_elements(void *process_ctxt)
}

/* Getting the stream resource element */
-int drv_get_strm_res_element(void *hStrm, void *hstrm_res,
+int drv_get_strm_res_element(void *stream_obj, void *hstrm_res,
void *process_ctxt)
{
struct strm_res_object **strm_res =
@@ -389,7 +389,7 @@ int drv_get_strm_res_element(void *hStrm, void *hstrm_res,
return -EPERM;

temp_strm = ctxt->pstrm_list;
- while ((temp_strm != NULL) && (temp_strm->hstream != hStrm)) {
+ while ((temp_strm != NULL) && (temp_strm->hstream != stream_obj)) {
temp_strm2 = temp_strm;
temp_strm = temp_strm->next;
}
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 8b3cbd2..69c1284 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -256,9 +256,9 @@ static int get_proc_props(struct node_mgr *hnode_mgr,
struct dev_object *hdev_obj);
static int get_rms_fxns(struct node_mgr *hnode_mgr);
static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
- u32 ul_num_bytes, u32 nMemSpace);
+ u32 ul_num_bytes, u32 mem_space);
static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
- u32 ul_num_bytes, u32 nMemSpace);
+ u32 ul_num_bytes, u32 mem_space);

static u32 refs; /* module reference count */

@@ -1985,14 +1985,14 @@ bool node_init(void)
* Purpose:
* Gets called when RMS_EXIT is received for a node.
*/
-void node_on_exit(struct node_object *hnode, s32 nStatus)
+void node_on_exit(struct node_object *hnode, s32 node_status)
{
if (!hnode)
return;

/* Set node state to done */
NODE_SET_STATE(hnode, NODE_DONE);
- hnode->exit_status = nStatus;
+ hnode->exit_status = node_status;
if (hnode->loaded && hnode->phase_split) {
(void)hnode->hnode_mgr->nldr_fxns.pfn_unload(hnode->
nldr_node_obj,
@@ -3127,7 +3127,7 @@ static int get_rms_fxns(struct node_mgr *hnode_mgr)
* Called during overlay.Sends command to RMS to copy a block of data.
*/
static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
- u32 ul_num_bytes, u32 nMemSpace)
+ u32 ul_num_bytes, u32 mem_space)
{
struct node_object *hnode = (struct node_object *)priv_ref;
struct node_mgr *hnode_mgr;
@@ -3153,7 +3153,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
status =
(*intf_fxns->pfn_brd_mem_copy) (hbridge_context,
ulDspRunAddr, ulDspLoadAddr,
- ul_num_bytes, (u32) nMemSpace);
+ ul_num_bytes, (u32) mem_space);
if (DSP_SUCCEEDED(status))
ul_bytes = ul_num_bytes;
else
@@ -3171,7 +3171,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
* ======== mem_write ========
*/
static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
- u32 ul_num_bytes, u32 nMemSpace)
+ u32 ul_num_bytes, u32 mem_space)
{
struct node_object *hnode = (struct node_object *)priv_ref;
struct node_mgr *hnode_mgr;
@@ -3183,12 +3183,12 @@ static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
struct bridge_drv_interface *intf_fxns;

DBC_REQUIRE(hnode);
- DBC_REQUIRE(nMemSpace & DBLL_CODE || nMemSpace & DBLL_DATA);
+ DBC_REQUIRE(mem_space & DBLL_CODE || mem_space & DBLL_DATA);

hnode_mgr = hnode->hnode_mgr;

ul_timeout = hnode->utimeout;
- mem_sect_type = (nMemSpace & DBLL_CODE) ? RMS_CODE : RMS_DATA;
+ mem_sect_type = (mem_space & DBLL_CODE) ? RMS_CODE : RMS_DATA;

/* Call new MemWrite function */
intf_fxns = hnode_mgr->intf_fxns;
diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index ffacfd4..795332e 100644
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -88,7 +88,7 @@ struct strm_object {
static u32 refs; /* module reference count */

/* ----------------------------------- Function Prototypes */
-static int delete_strm(struct strm_object *hStrm);
+static int delete_strm(struct strm_object *stream_obj);
static void delete_strm_mgr(struct strm_mgr *strm_mgr_obj);

/*
@@ -96,7 +96,7 @@ static void delete_strm_mgr(struct strm_mgr *strm_mgr_obj);
* Purpose:
* Allocates buffers for a stream.
*/
-int strm_allocate_buffer(struct strm_object *hStrm, u32 usize,
+int strm_allocate_buffer(struct strm_object *stream_obj, u32 usize,
OUT u8 **ap_buffer, u32 num_bufs,
struct process_context *pr_ctxt)
{
@@ -109,7 +109,7 @@ int strm_allocate_buffer(struct strm_object *hStrm, u32 usize,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(ap_buffer != NULL);

- if (hStrm) {
+ if (stream_obj) {
/*
* Allocate from segment specified at time of stream open.
*/
@@ -124,8 +124,9 @@ int strm_allocate_buffer(struct strm_object *hStrm, u32 usize,
goto func_end;

for (i = 0; i < num_bufs; i++) {
- DBC_ASSERT(hStrm->xlator != NULL);
- (void)cmm_xlator_alloc_buf(hStrm->xlator, &ap_buffer[i], usize);
+ DBC_ASSERT(stream_obj->xlator != NULL);
+ (void)cmm_xlator_alloc_buf(stream_obj->xlator, &ap_buffer[i],
+ usize);
if (ap_buffer[i] == NULL) {
status = -ENOMEM;
alloc_cnt = i;
@@ -133,12 +134,12 @@ int strm_allocate_buffer(struct strm_object *hStrm, u32 usize,
}
}
if (DSP_FAILED(status))
- strm_free_buffer(hStrm, ap_buffer, alloc_cnt, pr_ctxt);
+ strm_free_buffer(stream_obj, ap_buffer, alloc_cnt, pr_ctxt);

if (DSP_FAILED(status))
goto func_end;

- if (drv_get_strm_res_element(hStrm, &hstrm_res, pr_ctxt) !=
+ if (drv_get_strm_res_element(stream_obj, &hstrm_res, pr_ctxt) !=
-ENOENT)
drv_proc_update_strm_res(num_bufs, hstrm_res);

@@ -151,7 +152,7 @@ func_end:
* Purpose:
* Close a stream opened with strm_open().
*/
-int strm_close(struct strm_object *hStrm,
+int strm_close(struct strm_object *stream_obj,
struct process_context *pr_ctxt)
{
struct bridge_drv_interface *intf_fxns;
@@ -162,35 +163,35 @@ int strm_close(struct strm_object *hStrm,

DBC_REQUIRE(refs > 0);

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
} else {
/* Have all buffers been reclaimed? If not, return
* -EPIPE */
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status =
- (*intf_fxns->pfn_chnl_get_info) (hStrm->chnl_obj,
+ (*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj,
&chnl_info_obj);
DBC_ASSERT(DSP_SUCCEEDED(status));

if (chnl_info_obj.cio_cs > 0 || chnl_info_obj.cio_reqs > 0)
status = -EPIPE;
else
- status = delete_strm(hStrm);
+ status = delete_strm(stream_obj);
}

if (DSP_FAILED(status))
goto func_end;

- if (drv_get_strm_res_element(hStrm, &hstrm_res, pr_ctxt) !=
+ if (drv_get_strm_res_element(stream_obj, &hstrm_res, pr_ctxt) !=
-ENOENT)
drv_proc_remove_strm_res_element(hstrm_res, pr_ctxt);
func_end:
DBC_ENSURE(status == 0 || status == -EFAULT ||
status == -EPIPE || status == -EPERM);

- dev_dbg(bridge, "%s: hStrm: %p, status 0x%x\n", __func__,
- hStrm, status);
+ dev_dbg(bridge, "%s: stream_obj: %p, status 0x%x\n", __func__,
+ stream_obj, status);
return status;
}

@@ -270,7 +271,7 @@ void strm_exit(void)
* Purpose:
* Frees the buffers allocated for a stream.
*/
-int strm_free_buffer(struct strm_object *hStrm, u8 ** ap_buffer,
+int strm_free_buffer(struct strm_object *stream_obj, u8 ** ap_buffer,
u32 num_bufs, struct process_context *pr_ctxt)
{
int status = 0;
@@ -281,20 +282,21 @@ int strm_free_buffer(struct strm_object *hStrm, u8 ** ap_buffer,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(ap_buffer != NULL);

- if (!hStrm)
+ if (!stream_obj)
status = -EFAULT;

if (DSP_SUCCEEDED(status)) {
for (i = 0; i < num_bufs; i++) {
- DBC_ASSERT(hStrm->xlator != NULL);
+ DBC_ASSERT(stream_obj->xlator != NULL);
status =
- cmm_xlator_free_buf(hStrm->xlator, ap_buffer[i]);
+ cmm_xlator_free_buf(stream_obj->xlator,
+ ap_buffer[i]);
if (DSP_FAILED(status))
break;
ap_buffer[i] = NULL;
}
}
- if (drv_get_strm_res_element(hStrm, hstrm_res, pr_ctxt) !=
+ if (drv_get_strm_res_element(stream_obj, hstrm_res, pr_ctxt) !=
-ENOENT)
drv_proc_update_strm_res(num_bufs - i, hstrm_res);

@@ -306,7 +308,7 @@ int strm_free_buffer(struct strm_object *hStrm, u8 ** ap_buffer,
* Purpose:
* Retrieves information about a stream.
*/
-int strm_get_info(struct strm_object *hStrm,
+int strm_get_info(struct strm_object *stream_obj,
OUT struct stream_info *stream_info,
u32 stream_info_size)
{
@@ -319,7 +321,7 @@ int strm_get_info(struct strm_object *hStrm,
DBC_REQUIRE(stream_info != NULL);
DBC_REQUIRE(stream_info_size >= sizeof(struct stream_info));

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
} else {
if (stream_info_size < sizeof(struct stream_info)) {
@@ -330,22 +332,23 @@ int strm_get_info(struct strm_object *hStrm,
if (DSP_FAILED(status))
goto func_end;

- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status =
- (*intf_fxns->pfn_chnl_get_info) (hStrm->chnl_obj, &chnl_info_obj);
+ (*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj,
+ &chnl_info_obj);
if (DSP_FAILED(status))
goto func_end;

- if (hStrm->xlator) {
+ if (stream_obj->xlator) {
/* We have a translator */
- DBC_ASSERT(hStrm->segment_id > 0);
- cmm_xlator_info(hStrm->xlator, (u8 **) &virt_base, 0,
- hStrm->segment_id, false);
+ DBC_ASSERT(stream_obj->segment_id > 0);
+ cmm_xlator_info(stream_obj->xlator, (u8 **) &virt_base, 0,
+ stream_obj->segment_id, false);
}
- stream_info->segment_id = hStrm->segment_id;
- stream_info->strm_mode = hStrm->strm_mode;
+ stream_info->segment_id = stream_obj->segment_id;
+ stream_info->strm_mode = stream_obj->strm_mode;
stream_info->virt_base = virt_base;
- stream_info->user_strm->number_bufs_allowed = hStrm->num_bufs;
+ stream_info->user_strm->number_bufs_allowed = stream_obj->num_bufs;
stream_info->user_strm->number_bufs_in_stream = chnl_info_obj.cio_cs +
chnl_info_obj.cio_reqs;
/* # of bytes transferred since last call to DSPStream_Idle() */
@@ -373,25 +376,25 @@ func_end:
* Purpose:
* Idles a particular stream.
*/
-int strm_idle(struct strm_object *hStrm, bool flush_data)
+int strm_idle(struct strm_object *stream_obj, bool flush_data)
{
struct bridge_drv_interface *intf_fxns;
int status = 0;

DBC_REQUIRE(refs > 0);

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
} else {
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;

- status = (*intf_fxns->pfn_chnl_idle) (hStrm->chnl_obj,
- hStrm->utimeout,
+ status = (*intf_fxns->pfn_chnl_idle) (stream_obj->chnl_obj,
+ stream_obj->utimeout,
flush_data);
}

- dev_dbg(bridge, "%s: hStrm: %p flush_data: 0x%x status: 0x%x\n",
- __func__, hStrm, flush_data, status);
+ dev_dbg(bridge, "%s: stream_obj: %p flush_data: 0x%x status: 0x%x\n",
+ __func__, stream_obj, flush_data, status);
return status;
}

@@ -419,7 +422,7 @@ bool strm_init(void)
* Purpose:
* Issues a buffer on a stream
*/
-int strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes,
+int strm_issue(struct strm_object *stream_obj, IN u8 *pbuf, u32 ul_bytes,
u32 ul_buf_size, u32 dw_arg)
{
struct bridge_drv_interface *intf_fxns;
@@ -429,13 +432,13 @@ int strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(pbuf != NULL);

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
} else {
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;

- if (hStrm->segment_id != 0) {
- tmp_buf = cmm_xlator_translate(hStrm->xlator,
+ if (stream_obj->segment_id != 0) {
+ tmp_buf = cmm_xlator_translate(stream_obj->xlator,
(void *)pbuf,
CMM_VA2DSPPA);
if (tmp_buf == NULL)
@@ -444,15 +447,15 @@ int strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes,
}
if (DSP_SUCCEEDED(status)) {
status = (*intf_fxns->pfn_chnl_add_io_req)
- (hStrm->chnl_obj, pbuf, ul_bytes, ul_buf_size,
+ (stream_obj->chnl_obj, pbuf, ul_bytes, ul_buf_size,
(u32) tmp_buf, dw_arg);
}
if (status == -EIO)
status = -ENOSR;
}

- dev_dbg(bridge, "%s: hStrm: %p pbuf: %p ul_bytes: 0x%x dw_arg: 0x%x "
- "status: 0x%x\n", __func__, hStrm, pbuf,
+ dev_dbg(bridge, "%s: stream_obj: %p pbuf: %p ul_bytes: 0x%x dw_arg:"
+ " 0x%x status: 0x%x\n", __func__, stream_obj, pbuf,
ul_bytes, dw_arg, status);
return status;
}
@@ -615,7 +618,7 @@ func_cont:
* Purpose:
* Relcaims a buffer from a stream.
*/
-int strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
+int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
u32 *pulBytes, u32 *pulBufSize, u32 *pdw_arg)
{
struct bridge_drv_interface *intf_fxns;
@@ -628,14 +631,15 @@ int strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
DBC_REQUIRE(pulBytes != NULL);
DBC_REQUIRE(pdw_arg != NULL);

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
goto func_end;
}
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;

status =
- (*intf_fxns->pfn_chnl_get_ioc) (hStrm->chnl_obj, hStrm->utimeout,
+ (*intf_fxns->pfn_chnl_get_ioc) (stream_obj->chnl_obj,
+ stream_obj->utimeout,
&chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) {
*pulBytes = chnl_ioc_obj.byte_size;
@@ -656,7 +660,7 @@ int strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
/* Translate zerocopy buffer if channel not canceled. */
if (DSP_SUCCEEDED(status)
&& (!CHNL_IS_IO_CANCELLED(chnl_ioc_obj))
- && (hStrm->strm_mode == STRMMODE_ZEROCOPY)) {
+ && (stream_obj->strm_mode == STRMMODE_ZEROCOPY)) {
/*
* This is a zero-copy channel so chnl_ioc_obj.pbuf
* contains the DSP address of SM. We need to
@@ -664,12 +668,13 @@ int strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr,
* thread to access.
* Note: Could add CMM_DSPPA2VA to CMM in the future.
*/
- tmp_buf = cmm_xlator_translate(hStrm->xlator,
+ tmp_buf = cmm_xlator_translate(stream_obj->xlator,
chnl_ioc_obj.pbuf,
CMM_DSPPA2PA);
if (tmp_buf != NULL) {
/* now convert this GPP Pa to Va */
- tmp_buf = cmm_xlator_translate(hStrm->xlator,
+ tmp_buf = cmm_xlator_translate(stream_obj->
+ xlator,
tmp_buf,
CMM_PA2VA);
}
@@ -686,8 +691,8 @@ func_end:
status == -ETIME || status == -ESRCH ||
status == -EPERM);

- dev_dbg(bridge, "%s: hStrm: %p buf_ptr: %p pulBytes: %p pdw_arg: %p "
- "status 0x%x\n", __func__, hStrm,
+ dev_dbg(bridge, "%s: stream_obj: %p buf_ptr: %p pulBytes: %p "
+ "pdw_arg: %p status 0x%x\n", __func__, stream_obj,
buf_ptr, pulBytes, pdw_arg, status);
return status;
}
@@ -697,7 +702,7 @@ func_end:
* Purpose:
* Register to be notified on specific events for this stream.
*/
-int strm_register_notify(struct strm_object *hStrm, u32 event_mask,
+int strm_register_notify(struct strm_object *stream_obj, u32 event_mask,
u32 notify_type, struct dsp_notification
* hnotification)
{
@@ -707,7 +712,7 @@ int strm_register_notify(struct strm_object *hStrm, u32 event_mask,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hnotification != NULL);

- if (!hStrm) {
+ if (!stream_obj) {
status = -EFAULT;
} else if ((event_mask & ~((DSP_STREAMIOCOMPLETION) |
DSP_STREAMDONE)) != 0) {
@@ -718,10 +723,11 @@ int strm_register_notify(struct strm_object *hStrm, u32 event_mask,

}
if (DSP_SUCCEEDED(status)) {
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;

status =
- (*intf_fxns->pfn_chnl_register_notify) (hStrm->chnl_obj,
+ (*intf_fxns->pfn_chnl_register_notify) (stream_obj->
+ chnl_obj,
event_mask,
notify_type,
hnotification);
@@ -738,7 +744,7 @@ int strm_register_notify(struct strm_object *hStrm, u32 event_mask,
* Purpose:
* Selects a ready stream.
*/
-int strm_select(IN struct strm_object **strm_tab, u32 nStrms,
+int strm_select(IN struct strm_object **strm_tab, u32 strms,
OUT u32 *pmask, u32 utimeout)
{
u32 index;
@@ -751,10 +757,10 @@ int strm_select(IN struct strm_object **strm_tab, u32 nStrms,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(strm_tab != NULL);
DBC_REQUIRE(pmask != NULL);
- DBC_REQUIRE(nStrms > 0);
+ DBC_REQUIRE(strms > 0);

*pmask = 0;
- for (i = 0; i < nStrms; i++) {
+ for (i = 0; i < strms; i++) {
if (!strm_tab[i]) {
status = -EFAULT;
break;
@@ -764,7 +770,7 @@ int strm_select(IN struct strm_object **strm_tab, u32 nStrms,
goto func_end;

/* Determine which channels have IO ready */
- for (i = 0; i < nStrms; i++) {
+ for (i = 0; i < strms; i++) {
intf_fxns = strm_tab[i]->strm_mgr_obj->intf_fxns;
status = (*intf_fxns->pfn_chnl_get_info) (strm_tab[i]->chnl_obj,
&chnl_info_obj);
@@ -778,13 +784,13 @@ int strm_select(IN struct strm_object **strm_tab, u32 nStrms,
}
if (DSP_SUCCEEDED(status) && utimeout > 0 && *pmask == 0) {
/* Non-zero timeout */
- sync_events = kmalloc(nStrms * sizeof(struct sync_object *),
+ sync_events = kmalloc(strms * sizeof(struct sync_object *),
GFP_KERNEL);

if (sync_events == NULL) {
status = -ENOMEM;
} else {
- for (i = 0; i < nStrms; i++) {
+ for (i = 0; i < strms; i++) {
intf_fxns =
strm_tab[i]->strm_mgr_obj->intf_fxns;
status = (*intf_fxns->pfn_chnl_get_info)
@@ -799,7 +805,7 @@ int strm_select(IN struct strm_object **strm_tab, u32 nStrms,
}
if (DSP_SUCCEEDED(status)) {
status =
- sync_wait_on_multiple_events(sync_events, nStrms,
+ sync_wait_on_multiple_events(sync_events, strms,
utimeout, &index);
if (DSP_SUCCEEDED(status)) {
/* Since we waited on the event, we have to
@@ -823,27 +829,29 @@ func_end:
* Purpose:
* Frees the resources allocated for a stream.
*/
-static int delete_strm(struct strm_object *hStrm)
+static int delete_strm(struct strm_object *stream_obj)
{
struct bridge_drv_interface *intf_fxns;
int status = 0;

- if (hStrm) {
- if (hStrm->chnl_obj) {
- intf_fxns = hStrm->strm_mgr_obj->intf_fxns;
+ if (stream_obj) {
+ if (stream_obj->chnl_obj) {
+ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
/* Channel close can fail only if the channel handle
* is invalid. */
- status = (*intf_fxns->pfn_chnl_close) (hStrm->chnl_obj);
+ status = (*intf_fxns->pfn_chnl_close)
+ (stream_obj->chnl_obj);
/* Free all SM address translator resources */
if (DSP_SUCCEEDED(status)) {
- if (hStrm->xlator) {
+ if (stream_obj->xlator) {
/* force free */
- (void)cmm_xlator_delete(hStrm->xlator,
+ (void)cmm_xlator_delete(stream_obj->
+ xlator,
true);
}
}
}
- kfree(hStrm);
+ kfree(stream_obj);
} else {
status = -EFAULT;
}
--
1.6.3.3

2010-07-08 23:12:55

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 14/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
ulBrdState to brd_state
ulChnl to chnl
ulDspAddr to dsp_add
ulDspDestAddr to dsp_dest_addr
ulDspLoadAddr to dsp_load_addr
ulDspRunAddr to dsp_run_addr
ulDspSrcAddr to dsp_src_addr
ulEventMask to evnt_mask
ulMapAttrs to map_attr
ulMemType to mem_type
ulRMSFxn to rms_fxn
ulStatus to ret
ulVirtAddr to virt_addr
uNumDesc to num_desc
uNumToDSP to num_to_dsp
uPaSize to pa_size
uPhase to phase
uSegId to segm_id
uStream1 to stream1
uStream2 to stream2
uZId to zid
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 4 +-
drivers/staging/tidspbridge/core/msg_sm.c | 8 +-
drivers/staging/tidspbridge/core/tiomap3430.c | 74 +++++++++---------
drivers/staging/tidspbridge/core/tiomap_io.c | 6 +-
drivers/staging/tidspbridge/core/tiomap_io.h | 6 +-
drivers/staging/tidspbridge/core/ue_deh.c | 6 +-
.../staging/tidspbridge/include/dspbridge/cmm.h | 12 ++--
.../staging/tidspbridge/include/dspbridge/cod.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 8 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 48 ++++++------
.../staging/tidspbridge/include/dspbridge/dspdeh.h | 2 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 14 ++--
.../tidspbridge/include/dspbridge/nldrdefs.h | 12 ++--
.../staging/tidspbridge/include/dspbridge/node.h | 14 ++--
drivers/staging/tidspbridge/pmgr/cmm.c | 10 +-
drivers/staging/tidspbridge/pmgr/dev.c | 8 +-
drivers/staging/tidspbridge/rmgr/disp.c | 16 ++--
drivers/staging/tidspbridge/rmgr/node.c | 80 ++++++++++----------
18 files changed, 165 insertions(+), 165 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index c7f5d2d..eb9a927 100755
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -816,7 +816,7 @@ u32 io_buf_size(struct io_mgr *hio_mgr)
* ======== io_cancel_chnl ========
* Cancel IO on a given PCPY channel.
*/
-void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)
+void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl)
{
struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr;
struct shm *sm;
@@ -827,7 +827,7 @@ void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)

/* Inform DSP that we have no more buffers on this channel */
IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask,
- (~(1 << ulChnl)));
+ (~(1 << chnl)));

sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS);
func_end:
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c b/drivers/staging/tidspbridge/core/msg_sm.c
index 22e1898..888d32d 100644
--- a/drivers/staging/tidspbridge/core/msg_sm.c
+++ b/drivers/staging/tidspbridge/core/msg_sm.c
@@ -40,7 +40,7 @@
/* ----------------------------------- Function Prototypes */
static int add_new_msg(struct lst_list *msg_list);
static void delete_msg_mgr(struct msg_mgr *hmsg_mgr);
-static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP);
+static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp);
static void free_msg_list(struct lst_list *msg_list);

/*
@@ -602,7 +602,7 @@ func_end:
/*
* ======== delete_msg_queue ========
*/
-static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)
+static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp)
{
struct msg_mgr *hmsg_mgr;
struct msg_frame *pmsg;
@@ -614,8 +614,8 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)

hmsg_mgr = msg_queue_obj->hmsg_mgr;

- /* Pull off uNumToDSP message frames from Msg manager and free */
- for (i = 0; i < uNumToDSP; i++) {
+ /* Pull off num_to_dsp message frames from Msg manager and free */
+ for (i = 0; i < num_to_dsp; i++) {

if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) {
pmsg = (struct msg_frame *)
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 0cc61a5..b0e6e5d 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -80,7 +80,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
static int bridge_brd_read(struct bridge_dev_context *dev_context,
OUT u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
- u32 ulMemType);
+ u32 mem_type);
static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context,
@@ -89,21 +89,21 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
- u32 ulMemType);
+ u32 mem_type);
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
- u32 ulBrdState);
+ u32 brd_state);
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
- u32 ulDspDestAddr, u32 ulDspSrcAddr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 dsp_dest_addr, u32 dsp_src_addr,
+ u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
- u32 ul_mpu_addr, u32 ulVirtAddr,
+ u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages);
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
- u32 ulVirtAddr, u32 ul_num_bytes);
+ u32 virt_addr, u32 ul_num_bytes);
static int bridge_dev_create(OUT struct bridge_dev_context
**dev_cntxt,
struct dev_object *hdev_obj,
@@ -118,7 +118,7 @@ static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
u32 size, struct hw_mmu_map_attrs_t *attrs);
static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
- u32 ul_mpu_addr, u32 ulVirtAddr,
+ u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs);

@@ -318,7 +318,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
*/
static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType)
+ u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
@@ -335,7 +335,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
offset = dsp_addr - dev_context->dw_dsp_start_add;
} else {
status = read_ext_dsp_data(dev_context, host_buff, dsp_addr,
- ul_num_bytes, ulMemType);
+ ul_num_bytes, mem_type);
return status;
}
/* copy the data from DSP memory, */
@@ -349,12 +349,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
* This routine updates the Board status.
*/
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
- u32 ulBrdState)
+ u32 brd_state)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;

- dev_context->dw_brd_state = ulBrdState;
+ dev_context->dw_brd_state = brd_state;
return status;
}

@@ -779,7 +779,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
*/
static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType)
+ u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
@@ -791,10 +791,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
status = write_dsp_data(dev_ctxt, host_buff, dsp_addr,
- ul_num_bytes, ulMemType);
+ ul_num_bytes, mem_type);
} else {
status = write_ext_dsp_data(dev_context, host_buff, dsp_addr,
- ul_num_bytes, ulMemType, false);
+ ul_num_bytes, mem_type, false);
}

return status;
@@ -1122,12 +1122,12 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
}

static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
- u32 ulDspDestAddr, u32 ulDspSrcAddr,
- u32 ul_num_bytes, u32 ulMemType)
+ u32 dsp_dest_addr, u32 dsp_src_addr,
+ u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
- u32 src_addr = ulDspSrcAddr;
- u32 dest_addr = ulDspDestAddr;
+ u32 src_addr = dsp_src_addr;
+ u32 dest_addr = dsp_dest_addr;
u32 copy_bytes = 0;
u32 total_bytes = ul_num_bytes;
u8 host_buf[BUFFERSIZE];
@@ -1137,20 +1137,20 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
/* Read from External memory */
status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr,
- copy_bytes, ulMemType);
+ copy_bytes, mem_type);
if (DSP_SUCCEEDED(status)) {
if (dest_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
/* Write to Internal memory */
status = write_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
- ulMemType);
+ mem_type);
} else {
/* Write to External memory */
status =
write_ext_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
- ulMemType, false);
+ mem_type, false);
}
}
total_bytes -= copy_bytes;
@@ -1163,7 +1163,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType)
+ u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
@@ -1177,11 +1177,11 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
dev_context->dw_internal_size)) {
status =
write_dsp_data(dev_ctxt, host_buff, dsp_addr,
- ul_bytes, ulMemType);
+ ul_bytes, mem_type);
} else {
status = write_ext_dsp_data(dev_ctxt, host_buff,
dsp_addr, ul_bytes,
- ulMemType, true);
+ mem_type, true);
}
ul_remain_bytes -= ul_bytes;
dsp_addr += ul_bytes;
@@ -1200,7 +1200,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
* TODO: Disable MMU while updating the page tables (but that'll stall DSP)
*/
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
- u32 ul_mpu_addr, u32 ulVirtAddr,
+ u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages)
{
@@ -1214,14 +1214,14 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 num_usr_pgs = 0;
struct page *mapped_page, *pg;
s32 pg_num;
- u32 va = ulVirtAddr;
+ u32 va = virt_addr;
struct task_struct *curr_task = current;
u32 pg_i = 0;
u32 mpu_addr, pa;

dev_dbg(bridge,
"%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n",
- __func__, dev_ctxt, ul_mpu_addr, ulVirtAddr, ul_num_bytes,
+ __func__, dev_ctxt, ul_mpu_addr, virt_addr, ul_num_bytes,
ul_map_attr);
if (ul_num_bytes == 0)
return -EINVAL;
@@ -1268,7 +1268,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
hw_attrs.donotlockmpupage = 0;

if (attrs & DSP_MAPVMALLOCADDR) {
- return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, ulVirtAddr,
+ return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs);
}
/*
@@ -1277,7 +1277,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* Pass the translated pa to pte_update.
*/
if ((attrs & DSP_MAPPHYSICALADDR)) {
- status = pte_update(dev_context, ul_mpu_addr, ulVirtAddr,
+ status = pte_update(dev_context, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs);
goto func_cont;
}
@@ -1398,7 +1398,7 @@ func_cont:
* mapping
*/
if (pg_i) {
- bridge_brd_mem_un_map(dev_context, ulVirtAddr,
+ bridge_brd_mem_un_map(dev_context, virt_addr,
(pg_i * PG_SIZE4K));
}
status = -EPERM;
@@ -1423,7 +1423,7 @@ func_cont:
* we clear consecutive PTEs until we unmap all the bytes
*/
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
- u32 ulVirtAddr, u32 ul_num_bytes)
+ u32 virt_addr, u32 ul_num_bytes)
{
u32 l1_base_va;
u32 l2_base_va;
@@ -1445,13 +1445,13 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 paddr;
u32 numof4k_pages = 0;

- va_curr = ulVirtAddr;
+ va_curr = virt_addr;
rem_bytes = ul_num_bytes;
rem_bytes_l2 = 0;
l1_base_va = pt->l1_base_va;
pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr);
dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, "
- "pte_addr_l1 %x\n", __func__, dev_ctxt, ulVirtAddr,
+ "pte_addr_l1 %x\n", __func__, dev_ctxt, virt_addr,
ul_num_bytes, l1_base_va, pte_addr_l1);

while (rem_bytes && (DSP_SUCCEEDED(status))) {
@@ -1786,7 +1786,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,

/* Memory map kernel VA -- memory allocated with vmalloc */
static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
- u32 ul_mpu_addr, u32 ulVirtAddr,
+ u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs)
{
@@ -1845,7 +1845,7 @@ static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
get_page(PHYS_TO_PAGE(pa));
pa += HW_PAGE_SIZE4KB;
}
- status = pte_update(dev_context, pa_curr, ulVirtAddr +
+ status = pte_update(dev_context, pa_curr, virt_addr +
(va_curr - ul_mpu_addr), size_curr,
hw_attrs);
va_curr += size_curr;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index a314302..27be5a3 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -52,7 +52,7 @@ bool symbols_reloaded = true;
*/
int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType)
+ u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
@@ -180,7 +180,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
*/
int write_dsp_data(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
- u32 ulMemType)
+ u32 mem_type)
{
u32 offset;
u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr;
@@ -226,7 +226,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
*/
int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType,
+ u32 ul_num_bytes, u32 mem_type,
bool dynamic_load)
{
u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index cff8691..8f9d072 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -49,14 +49,14 @@
*/
extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 ul_num_bytes, u32 mem_type);

/*
* ======== write_dsp_data ========
*/
extern int write_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 ul_num_bytes, u32 mem_type);

/*
* ======== write_ext_dsp_data ========
@@ -66,7 +66,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
*/
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType,
+ u32 ul_num_bytes, u32 mem_type,
bool dynamic_load);

/*
diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index c53eb02..1a61cb3 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -161,7 +161,7 @@ int bridge_deh_register_notify(struct deh_mgr *deh_mgr, u32 event_mask,
return status;
}

-void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 error_info)
+void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 evnt_mask, u32 error_info)
{
struct bridge_dev_context *dev_context;
int status = 0;
@@ -176,7 +176,7 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 error_info)
dev_context = (struct bridge_dev_context *)deh_mgr->hbridge_context;
resources = dev_context->resources;

- switch (ulEventMask) {
+ switch (evnt_mask) {
case DSP_SYSERROR:
/* reset err_info structure before use */
deh_mgr->err_info.dw_err_mask = DSP_SYSERROR;
@@ -261,7 +261,7 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 error_info)

/* Filter subsequent notifications when an error occurs */
if (dev_context->dw_brd_state != BRD_ERROR) {
- ntfy_notify(deh_mgr->ntfy_obj, ulEventMask);
+ ntfy_notify(deh_mgr->ntfy_obj, evnt_mask);
#ifdef CONFIG_BRIDGE_RECOVERY
bridge_recover_schedule();
#endif
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 78cc12a..3944a1e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -262,17 +262,17 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
* Parameters:
* xlator: Handle to a Xlator object.
* va_buf: Virtual address ptr(client context)
- * uPaSize: Size of SM memory to allocate.
+ * pa_size: Size of SM memory to allocate.
* Returns:
- * Ptr to valid physical address(Pa) of uPaSize bytes, NULL if failed.
+ * Ptr to valid physical address(Pa) of pa_size bytes, NULL if failed.
* Requires:
* va_buf != 0.
- * uPaSize != 0.
+ * pa_size != 0.
* Ensures:
*
*/
extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
- void *va_buf, u32 uPaSize);
+ void *va_buf, u32 pa_size);

/*
* ======== cmm_xlator_create ========
@@ -346,7 +346,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
* xlator: handle to translator.
* paddr: Virtual base address of segment.
* ul_size: Size in bytes.
- * uSegId: Segment identifier of SM segment(s)
+ * segm_id: Segment identifier of SM segment(s)
* set_info Set xlator fields if TRUE, else return base addr
* Returns:
* 0: Success.
@@ -360,7 +360,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
*/
extern int cmm_xlator_info(struct cmm_xlatorobject *xlator,
IN OUT u8 **paddr,
- u32 ul_size, u32 uSegId, bool set_info);
+ u32 ul_size, u32 segm_id, bool set_info);

/*
* ======== cmm_xlator_translate ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 2d5f41a..3827646 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -49,7 +49,7 @@ struct cod_attrs {
* Function prototypes for writing memory to a DSP system, allocating
* and freeing DSP memory.
*/
-typedef u32(*cod_writefxn) (void *priv_ref, u32 ulDspAddr,
+typedef u32(*cod_writefxn) (void *priv_ref, u32 dsp_add,
void *pbuf, u32 ul_num_bytes, u32 mem_space);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 0cdbcb2..aa89419 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -45,7 +45,7 @@
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
- * ulMemType: Memory space on DSP to which to transfer.
+ * mem_type: Memory space on DSP to which to transfer.
* Returns:
* Number of bytes written. Returns 0 if the DEV_hObject passed in via
* arb is invalid.
@@ -55,7 +55,7 @@
* Ensures:
*/
extern u32 dev_brd_write_fxn(void *arb,
- u32 ulDspAddr,
+ u32 dsp_add,
void *host_buf, u32 ul_num_bytes, u32 mem_space);

/*
@@ -622,7 +622,7 @@ extern int dev_remove_proc_object(struct dev_object
* set up by a watchdog timer.
* Parameters:
* hdev_obj: Handle to device object created with dev_create_device().
- * ulStatus: A status word, most likely a BRD_STATUS.
+ * ret: A status word, most likely a BRD_STATUS.
* Returns:
* 0: All registered clients were asynchronously notified.
* -EINVAL: Invalid hdev_obj.
@@ -633,7 +633,7 @@ extern int dev_remove_proc_object(struct dev_object
* delivered to clients. This function does not ensure that
* the notifications will ever be delivered.
*/
-extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus);
+extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ret);

/*
* ======== dev_remove_device ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 64ab068..be6d46d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -74,19 +74,19 @@ typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt);
* Sets the Bridge driver state
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
- * ulBrdState: Board state
+ * brd_state: Board state
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
* Requires:
* dev_ctxt != NULL;
- * ulBrdState <= BRD_LASTSTATE.
+ * brd_state <= BRD_LASTSTATE.
* Ensures:
- * ulBrdState <= BRD_LASTSTATE.
+ * brd_state <= BRD_LASTSTATE.
* Update the Board state to the specified state.
*/
typedef int(*fxn_brd_setstate) (struct bridge_dev_context
- * dev_ctxt, u32 ulBrdState);
+ * dev_ctxt, u32 brd_state);

/*
* ======== bridge_brd_start ========
@@ -116,10 +116,10 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
* Copy memory from one DSP address to another
* Parameters:
* dev_context: Pointer to context handle
- * ulDspDestAddr: DSP address to copy to
- * ulDspSrcAddr: DSP address to copy from
+ * dsp_dest_addr: DSP address to copy to
+ * dsp_src_addr: DSP address to copy from
* ul_num_bytes: Number of bytes to copy
- * ulMemType: What section of memory to copy to
+ * mem_type: What section of memory to copy to
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
@@ -132,9 +132,9 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dev_ctxt,
- u32 ulDspDestAddr,
- u32 ulDspSrcAddr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 dsp_dest_addr,
+ u32 dsp_src_addr,
+ u32 ul_num_bytes, u32 mem_type);
/*
* ======== bridge_brd_mem_write ========
* Purpose:
@@ -145,7 +145,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
- * ulMemType: Memory space on DSP to which to transfer.
+ * mem_type: Memory space on DSP to which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -159,7 +159,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* dev_ctxt,
IN u8 *host_buf,
u32 dsp_addr, u32 ul_num_bytes,
- u32 ulMemType);
+ u32 mem_type);

/*
* ======== bridge_brd_mem_map ========
@@ -168,7 +168,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* ul_mpu_addr: MPU memory region start address.
- * ulVirtAddr: DSP/IVA memory region u8 address.
+ * virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to map.
* map_attrs: Mapping attributes (e.g. endianness).
* Returns:
@@ -180,8 +180,8 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* dev_ctxt, u32 ul_mpu_addr,
- u32 ulVirtAddr, u32 ul_num_bytes,
- u32 ulMapAttrs,
+ u32 virt_addr, u32 ul_num_bytes,
+ u32 map_attr,
struct page **mapped_pages);

/*
@@ -190,7 +190,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* UnMap an MPU memory region from DSP/IVA memory space
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
- * ulVirtAddr: DSP/IVA memory region u8 address.
+ * virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to unmap.
* Returns:
* 0: Success.
@@ -201,7 +201,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
* dev_ctxt,
- u32 ulVirtAddr, u32 ul_num_bytes);
+ u32 virt_addr, u32 ul_num_bytes);

/*
* ======== bridge_brd_stop ========
@@ -251,7 +251,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
* host_buf: Pointer to host buffer (Destination).
* dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer.
- * ulMemType: Memory space on DSP from which to transfer.
+ * mem_type: Memory space on DSP from which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -265,7 +265,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buf,
u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 ul_num_bytes, u32 mem_type);

/*
* ======== bridge_brd_write ========
@@ -277,7 +277,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
- * ulMemType: Memory space on DSP to which to transfer.
+ * mem_type: Memory space on DSP to which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -290,7 +290,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
IN u8 *host_buf,
u32 dsp_addr,
- u32 ul_num_bytes, u32 ulMemType);
+ u32 ul_num_bytes, u32 mem_type);

/*
* ======== bridge_chnl_create ========
@@ -351,17 +351,17 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
* When notified of DSP error, take appropriate action.
* Parameters:
* hdeh_mgr: Handle to DEH manager object.
- * ulEventMask: Indicate the type of exception
+ * evnt_mask: Indicate the type of exception
* error_info: Error information
* Returns:
*
* Requires:
* hdeh_mgr != NULL;
- * ulEventMask with a valid exception
+ * evnt_mask with a valid exception
* Ensures:
*/
typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
- u32 ulEventMask, u32 error_info);
+ u32 evnt_mask, u32 error_info);

/*
* ======== bridge_chnl_open ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
index 38c8eba..9e01b75 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
@@ -41,7 +41,7 @@ extern int bridge_deh_register_notify(struct deh_mgr *deh_mgr,
struct dsp_notification *hnotification);

extern void bridge_deh_notify(struct deh_mgr *deh_mgr,
- u32 ulEventMask, u32 error_info);
+ u32 evnt_mask, u32 error_info);

extern void bridge_deh_release_dummy_mem(void);
#endif /* DSPDEH_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index bf3590c..bdff9fb 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -54,13 +54,13 @@ extern u32 vdd1_dsp_freq[6][4];
* Cancel IO on a given channel.
* Parameters:
* hio_mgr: IO Manager.
- * ulChnl: Index of channel to cancel IO on.
+ * chnl: Index of channel to cancel IO on.
* Returns:
* Requires:
* Valid hio_mgr.
* Ensures:
*/
-extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl);
+extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl);

/*
* ======== io_dpc ========
@@ -142,20 +142,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* Parameters:
* hio_mgr: Handle to a I/O manager.
* ddma_chnl_id: DDMA channel identifier.
- * uNumDesc: Number of buffer descriptors(equals # of IOReqs &
+ * num_desc: Number of buffer descriptors(equals # of IOReqs &
* Chirps)
* dsp: Dsp address;
* Returns:
* Requires:
* ddma_chnl_id < DDMA_MAXDDMACHNLS
- * uNumDesc > 0
+ * num_desc > 0
* pVa != NULL
* pDspPa != NULL
*
* Ensures:
*/
extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
- u32 uNumDesc, void *dsp);
+ u32 num_desc, void *dsp);

/*
* ======== io_ddma_clear_chnl_desc ========
@@ -202,14 +202,14 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
* Initialize ZCPY channel descriptor.
* Parameters:
* hio_mgr: Handle to a I/O manager.
- * uZId: zero-copy channel identifier.
+ * zid: zero-copy channel identifier.
* Returns:
* Requires:
* ddma_chnl_id < DDMA_MAXZCPYCHNLS
* hio_mgr != Null
* Ensures:
*/
-extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 uZId);
+extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 zid);

/*
* ======== io_ddzc_clear_chnl_desc ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index ed20dc0..9d35114 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -45,8 +45,8 @@ enum nldr_loadtype {
*
* Parameters:
* priv_ref: Handle to identify the node.
- * ulDspRunAddr: Run address of code or data.
- * ulDspLoadAddr: Load address of code or data.
+ * dsp_run_addr: Run address of code or data.
+ * dsp_load_addr: Load address of code or data.
* ul_num_bytes: Number of (GPP) bytes to copy.
* mem_space: RMS_CODE or RMS_DATA.
* Returns:
@@ -55,15 +55,15 @@ enum nldr_loadtype {
* Requires:
* Ensures:
*/
-typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
- u32 ulDspLoadAddr, u32 ul_num_bytes, u32 mem_space);
+typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 dsp_run_addr,
+ u32 dsp_load_addr, u32 ul_num_bytes, u32 mem_space);

/*
* ======== nldr_writefxn ========
* Write memory function. Used for dynamic load writes.
* Parameters:
* priv_ref: Handle to identify the node.
- * ulDspAddr: Address of code or data.
+ * dsp_add: Address of code or data.
* pbuf: Code or data to be written
* ul_num_bytes: Number of (GPP) bytes to write.
* mem_space: DBLL_DATA or DBLL_CODE.
@@ -74,7 +74,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
* Ensures:
*/
typedef u32(*nldr_writefxn) (void *priv_ref,
- u32 ulDspAddr, void *pbuf,
+ u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index 68bef9e..8b480ae 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -147,11 +147,11 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* if this is a connection from DSP node to GPP, or a
* node handle returned from a successful call to
* node_allocate().
- * uStream1: Output stream index on first node, to be connected
+ * stream1: Output stream index on first node, to be connected
* to second node's input stream. Value must range from
- * 0 <= uStream1 < number of output streams.
- * uStream2: Input stream index on second node. Value must range
- * from 0 <= uStream2 < number of input streams.
+ * 0 <= stream1 < number of output streams.
+ * stream2: Input stream index on second node. Value must range
+ * from 0 <= stream2 < number of input streams.
* pattrs: Stream attributes (NULL ==> use defaults).
* conn_param: A pointer to a dsp_cbdata structure that defines
* connection parameter for device nodes to pass to DSP
@@ -167,7 +167,7 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* -ENOMEM: Insufficient host memory.
* -EINVAL: A stream index parameter is invalid.
* -EISCONN: A connection already exists for one of the
- * indices uStream1 or uStream2.
+ * indices stream1 or stream2.
* -EBADR: Either node1 or node2 is not in the
* NODE_ALLOCATED state.
* -ECONNREFUSED: No more connections available.
@@ -179,9 +179,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* Ensures:
*/
extern int node_connect(struct node_object *node1,
- u32 uStream1,
+ u32 stream1,
struct node_object *node2,
- u32 uStream2,
+ u32 stream2,
OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata
*conn_param);
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 0a36085..2381984 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1008,7 +1008,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
* ======== cmm_xlator_alloc_buf ========
*/
void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
- u32 uPaSize)
+ u32 pa_size)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
void *pbuf = NULL;
@@ -1018,7 +1018,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
DBC_REQUIRE(xlator != NULL);
DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL);
DBC_REQUIRE(va_buf != NULL);
- DBC_REQUIRE(uPaSize > 0);
+ DBC_REQUIRE(pa_size > 0);
DBC_REQUIRE(xlator_obj->ul_seg_id > 0);

if (xlator_obj) {
@@ -1026,7 +1026,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
*(volatile u32 *)va_buf = 0;
/* Alloc SM */
pbuf =
- cmm_calloc_buf(xlator_obj->hcmm_mgr, uPaSize, &attrs, NULL);
+ cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
if (pbuf) {
/* convert to translator(node/strm) process Virtual
* address */
@@ -1076,14 +1076,14 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
* Set/Get translator info.
*/
int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr,
- u32 ul_size, u32 uSegId, bool set_info)
+ u32 ul_size, u32 segm_id, bool set_info)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = 0;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(paddr != NULL);
- DBC_REQUIRE((uSegId > 0) && (uSegId <= CMM_MAXGPPSEGS));
+ DBC_REQUIRE((segm_id > 0) && (segm_id <= CMM_MAXGPPSEGS));

if (xlator_obj) {
if (set_info) {
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index fb5e0d7..1a9f065 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -99,7 +99,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* is passed a handle to a DEV_hObject, then calls the
* device's bridge_brd_write() function.
*/
-u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
+u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
u32 ul_num_bytes, u32 mem_space)
{
struct dev_object *dev_obj = (struct dev_object *)arb;
@@ -113,7 +113,7 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) (
dev_obj->hbridge_context, host_buf,
- ulDspAddr, ul_num_bytes, mem_space);
+ dsp_add, ul_num_bytes, mem_space);
/* Special case of getting the address only */
if (ul_num_bytes == 0)
ul_num_bytes = 1;
@@ -799,7 +799,7 @@ bool dev_init(void)
* Purpose:
* Notify all clients of this device of a change in device status.
*/
-int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
+int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
{
int status = 0;

@@ -810,7 +810,7 @@ int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
proc_obj != NULL;
proc_obj = (void *)lst_next(dev_obj->proc_list,
(struct list_head *)proc_obj))
- proc_notify_clients(proc_obj, (u32) ulStatus);
+ proc_notify_clients(proc_obj, (u32) ret);

return status;
}
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index d2cb558..13cfdfb 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -223,7 +223,7 @@ bool disp_init(void)
*/
int disp_node_change_priority(struct disp_object *disp_obj,
struct node_object *hnode,
- u32 ulRMSFxn, nodeenv node_env, s32 prio)
+ u32 rms_fxn, nodeenv node_env, s32 prio)
{
u32 dw_arg;
struct rms_command *rms_cmd;
@@ -235,7 +235,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,

/* Send message to RMS to change priority */
rms_cmd = (struct rms_command *)(disp_obj->pbuf);
- rms_cmd->fxn = (rms_word) (ulRMSFxn);
+ rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = prio;
status = send_message(disp_obj, node_get_timeout(hnode),
@@ -249,7 +249,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
* Create a node on the DSP by remotely calling the node's create function.
*/
int disp_node_create(struct disp_object *disp_obj,
- struct node_object *hnode, u32 ulRMSFxn,
+ struct node_object *hnode, u32 rms_fxn,
u32 ul_create_fxn,
IN CONST struct node_createargs *pargs,
OUT nodeenv *node_env)
@@ -351,7 +351,7 @@ int disp_node_create(struct disp_object *disp_obj,
total = 0; /* Total number of words in buffer so far */
pdw_buf = (rms_word *) disp_obj->pbuf;
rms_cmd = (struct rms_command *)pdw_buf;
- rms_cmd->fxn = (rms_word) (ulRMSFxn);
+ rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) (ul_create_fxn);
if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) {
/* Flush ICACHE on Load */
@@ -485,7 +485,7 @@ func_end:
*
*/
int disp_node_delete(struct disp_object *disp_obj,
- struct node_object *hnode, u32 ulRMSFxn,
+ struct node_object *hnode, u32 rms_fxn,
u32 ul_delete_fxn, nodeenv node_env)
{
u32 dw_arg;
@@ -507,7 +507,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* Fill in buffer to send to RMS
*/
rms_cmd = (struct rms_command *)disp_obj->pbuf;
- rms_cmd->fxn = (rms_word) (ulRMSFxn);
+ rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
rms_cmd->data = node_get_type(hnode);
@@ -539,7 +539,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* that has been suspended (via DISP_NodePause()) on the DSP.
*/
int disp_node_run(struct disp_object *disp_obj,
- struct node_object *hnode, u32 ulRMSFxn,
+ struct node_object *hnode, u32 rms_fxn,
u32 ul_execute_fxn, nodeenv node_env)
{
u32 dw_arg;
@@ -560,7 +560,7 @@ int disp_node_run(struct disp_object *disp_obj,
* Fill in buffer to send to RMS.
*/
rms_cmd = (struct rms_command *)disp_obj->pbuf;
- rms_cmd->fxn = (rms_word) (ulRMSFxn);
+ rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
rms_cmd->data = node_get_type(hnode);
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 922381f..3271c1a 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -240,14 +240,14 @@ static void delete_node(struct node_object *hnode,
struct process_context *pr_ctxt);
static void delete_node_mgr(struct node_mgr *hnode_mgr);
static void fill_stream_connect(struct node_object *node1,
- struct node_object *node2, u32 uStream1,
- u32 uStream2);
+ struct node_object *node2, u32 stream1,
+ u32 stream2);
static void fill_stream_def(struct node_object *hnode,
struct node_strmdef *pstrm_def,
struct dsp_strmattr *pattrs);
static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream);
static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
- u32 uPhase);
+ u32 phase);
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
CONST struct dsp_uuid *node_uuid,
@@ -255,9 +255,9 @@ static int get_node_props(struct dcd_manager *hdcd_mgr,
static int get_proc_props(struct node_mgr *hnode_mgr,
struct dev_object *hdev_obj);
static int get_rms_fxns(struct node_mgr *hnode_mgr);
-static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
+static u32 ovly(void *priv_ref, u32 dsp_run_addr, u32 dsp_load_addr,
u32 ul_num_bytes, u32 mem_space);
-static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
+static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space);

static u32 refs; /* module reference count */
@@ -831,9 +831,9 @@ func_end:
* Purpose:
* Connect two nodes on the DSP, or a node on the DSP to the GPP.
*/
-int node_connect(struct node_object *node1, u32 uStream1,
+int node_connect(struct node_object *node1, u32 stream1,
struct node_object *node2,
- u32 uStream2, OPTIONAL IN struct dsp_strmattr *pattrs,
+ u32 stream2, OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata *conn_param)
{
struct node_mgr *hnode_mgr;
@@ -875,10 +875,10 @@ int node_connect(struct node_object *node1, u32 uStream1,
node2_type = node_get_type(node2);
/* Check stream indices ranges */
if ((node1_type != NODE_GPP && node1_type != NODE_DEVICE &&
- uStream1 >= MAX_OUTPUTS(node1)) || (node2_type != NODE_GPP
+ stream1 >= MAX_OUTPUTS(node1)) || (node2_type != NODE_GPP
&& node2_type !=
NODE_DEVICE
- && uStream2 >=
+ && stream2 >=
MAX_INPUTS(node2)))
status = -EINVAL;
}
@@ -930,7 +930,7 @@ int node_connect(struct node_object *node1, u32 uStream1,
if (node1_type == NODE_TASK || node1_type == NODE_DAISSOCKET) {
output =
&(node1->create_args.asa.
- task_arg_obj.strm_out_def[uStream1]);
+ task_arg_obj.strm_out_def[stream1]);
if (output->sz_device != NULL)
status = -EISCONN;

@@ -938,7 +938,7 @@ int node_connect(struct node_object *node1, u32 uStream1,
if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
input =
&(node2->create_args.asa.
- task_arg_obj.strm_in_def[uStream2]);
+ task_arg_obj.strm_in_def[stream2]);
if (input->sz_device != NULL)
status = -EISCONN;

@@ -954,10 +954,10 @@ int node_connect(struct node_object *node1, u32 uStream1,
if (pipe_id == GB_NOBITS) {
status = -ECONNREFUSED;
} else {
- node1->outputs[uStream1].type = NODECONNECT;
- node2->inputs[uStream2].type = NODECONNECT;
- node1->outputs[uStream1].dev_id = pipe_id;
- node2->inputs[uStream2].dev_id = pipe_id;
+ node1->outputs[stream1].type = NODECONNECT;
+ node2->inputs[stream2].type = NODECONNECT;
+ node1->outputs[stream1].dev_id = pipe_id;
+ node2->inputs[stream2].dev_id = pipe_id;
output->sz_device = kzalloc(PIPENAMELEN + 1,
GFP_KERNEL);
input->sz_device = kzalloc(PIPENAMELEN + 1, GFP_KERNEL);
@@ -1049,12 +1049,12 @@ int node_connect(struct node_object *node1, u32 uStream1,
func_cont2:
if (DSP_SUCCEEDED(status)) {
if (node1 == (struct node_object *)DSP_HGPPNODE) {
- node2->inputs[uStream2].type = HOSTCONNECT;
- node2->inputs[uStream2].dev_id = chnl_id;
+ node2->inputs[stream2].type = HOSTCONNECT;
+ node2->inputs[stream2].dev_id = chnl_id;
input->sz_device = pstr_dev_name;
} else {
- node1->outputs[uStream1].type = HOSTCONNECT;
- node1->outputs[uStream1].dev_id = chnl_id;
+ node1->outputs[stream1].type = HOSTCONNECT;
+ node1->outputs[stream1].dev_id = chnl_id;
output->sz_device = pstr_dev_name;
}
sprintf(pstr_dev_name, "%s%d", HOSTPREFIX, chnl_id);
@@ -1067,13 +1067,13 @@ func_cont2:
/* node1 == > device */
dev_node_obj = node2;
hnode = node1;
- pstream = &(node1->outputs[uStream1]);
+ pstream = &(node1->outputs[stream1]);
pstrm_def = output;
} else {
/* device == > node2 */
dev_node_obj = node1;
hnode = node2;
- pstream = &(node2->inputs[uStream2]);
+ pstream = &(node2->inputs[stream2]);
pstrm_def = input;
}
/* Set up create args */
@@ -1114,25 +1114,25 @@ func_cont2:
/* Update node1 and node2 stream_connect */
if (node1_type != NODE_GPP && node1_type != NODE_DEVICE) {
node1->num_outputs++;
- if (uStream1 > node1->max_output_index)
- node1->max_output_index = uStream1;
+ if (stream1 > node1->max_output_index)
+ node1->max_output_index = stream1;

}
if (node2_type != NODE_GPP && node2_type != NODE_DEVICE) {
node2->num_inputs++;
- if (uStream2 > node2->max_input_index)
- node2->max_input_index = uStream2;
+ if (stream2 > node2->max_input_index)
+ node2->max_input_index = stream2;

}
- fill_stream_connect(node1, node2, uStream1, uStream2);
+ fill_stream_connect(node1, node2, stream1, stream2);
}
/* end of sync_enter_cs */
/* Exit critical section */
mutex_unlock(&hnode_mgr->node_mgr_lock);
func_end:
- dev_dbg(bridge, "%s: node1: %p uStream1: %d node2: %p uStream2: %d"
+ dev_dbg(bridge, "%s: node1: %p stream1: %d node2: %p stream2: %d"
"pattrs: %p status: 0x%x\n", __func__, node1,
- uStream1, node2, uStream2, pattrs, status);
+ stream1, node2, stream2, pattrs, status);
return status;
}

@@ -2700,7 +2700,7 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)
*/
static void fill_stream_connect(struct node_object *node1,
struct node_object *node2,
- u32 uStream1, u32 uStream2)
+ u32 stream1, u32 stream2)
{
u32 strm_index;
struct dsp_streamconnect *strm1 = NULL;
@@ -2717,7 +2717,7 @@ static void fill_stream_connect(struct node_object *node1,
node1->num_outputs - 1;
strm1 = &(node1->stream_connect[strm_index]);
strm1->cb_struct = sizeof(struct dsp_streamconnect);
- strm1->this_node_stream_index = uStream1;
+ strm1->this_node_stream_index = stream1;
}

if (node2 != (struct node_object *)DSP_HGPPNODE) {
@@ -2725,7 +2725,7 @@ static void fill_stream_connect(struct node_object *node1,
if (node1_type != NODE_DEVICE) {
strm1->connected_node = node2;
strm1->ui_connected_node_id = node2->node_uuid;
- strm1->connected_node_stream_index = uStream2;
+ strm1->connected_node_stream_index = stream2;
strm1->connect_type = CONNECTTYPE_NODEOUTPUT;
}
if (node2_type != NODE_DEVICE) {
@@ -2734,10 +2734,10 @@ static void fill_stream_connect(struct node_object *node1,
strm2 = &(node2->stream_connect[strm_index]);
strm2->cb_struct =
sizeof(struct dsp_streamconnect);
- strm2->this_node_stream_index = uStream2;
+ strm2->this_node_stream_index = stream2;
strm2->connected_node = node1;
strm2->ui_connected_node_id = node1->node_uuid;
- strm2->connected_node_stream_index = uStream1;
+ strm2->connected_node_stream_index = stream1;
strm2->connect_type = CONNECTTYPE_NODEINPUT;
}
} else if (node1_type != NODE_DEVICE)
@@ -2748,7 +2748,7 @@ static void fill_stream_connect(struct node_object *node1,
strm_index = node2->num_inputs + node2->num_outputs - 1;
strm2 = &(node2->stream_connect[strm_index]);
strm2->cb_struct = sizeof(struct dsp_streamconnect);
- strm2->this_node_stream_index = uStream2;
+ strm2->this_node_stream_index = stream2;
strm2->connect_type = CONNECTTYPE_GPPINPUT;
}
}
@@ -2819,7 +2819,7 @@ static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream)
* Retrieves the address for create, execute or delete phase for a node.
*/
static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
- u32 uPhase)
+ u32 phase)
{
char *pstr_fxn_name = NULL;
struct node_mgr *hnode_mgr = hnode->hnode_mgr;
@@ -2828,7 +2828,7 @@ static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
node_get_type(hnode) == NODE_DAISSOCKET ||
node_get_type(hnode) == NODE_MESSAGE);

- switch (uPhase) {
+ switch (phase) {
case CREATEPHASE:
pstr_fxn_name =
hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn;
@@ -3126,7 +3126,7 @@ static int get_rms_fxns(struct node_mgr *hnode_mgr)
* Purpose:
* Called during overlay.Sends command to RMS to copy a block of data.
*/
-static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
+static u32 ovly(void *priv_ref, u32 dsp_run_addr, u32 dsp_load_addr,
u32 ul_num_bytes, u32 mem_space)
{
struct node_object *hnode = (struct node_object *)priv_ref;
@@ -3152,7 +3152,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
if (DSP_SUCCEEDED(status)) {
status =
(*intf_fxns->pfn_brd_mem_copy) (hbridge_context,
- ulDspRunAddr, ulDspLoadAddr,
+ dsp_run_addr, dsp_load_addr,
ul_num_bytes, (u32) mem_space);
if (DSP_SUCCEEDED(status))
ul_bytes = ul_num_bytes;
@@ -3170,7 +3170,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
/*
* ======== mem_write ========
*/
-static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
+static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space)
{
struct node_object *hnode = (struct node_object *)priv_ref;
@@ -3194,7 +3194,7 @@ static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
intf_fxns = hnode_mgr->intf_fxns;
status = dev_get_bridge_context(hnode_mgr->hdev_obj, &hbridge_context);
status = (*intf_fxns->pfn_brd_mem_write) (hbridge_context, pbuf,
- ulDspAddr, ul_num_bytes, mem_sect_type);
+ dsp_add, ul_num_bytes, mem_sect_type);

return ul_num_bytes;
}
--
1.6.3.3

2010-07-08 23:15:27

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 03/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
hDevContext to dev_ctxt
hDevExtension to dev_extension
hdevObject to device_obj
hDispObject to disp_obj
hDrVObject to driver_obj
hDRVObject to driver_obj
hMGRHandle to mgr_handle
hNldrObject to nldr
hNode1 to node1
hNode2 to node2
hNodeRes to node_resource
hPCtxt to process_ctxt
hProc to proc
hStreamHandle to stream_handle
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 8 +-
drivers/staging/tidspbridge/core/tiomap3430.c | 94 +++++++-------
drivers/staging/tidspbridge/core/tiomap_io.c | 12 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 4 +-
.../staging/tidspbridge/include/dspbridge/disp.h | 32 +++---
.../staging/tidspbridge/include/dspbridge/drv.h | 6 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 72 +++++-----
.../staging/tidspbridge/include/dspbridge/io_sm.h | 12 +-
.../staging/tidspbridge/include/dspbridge/mgr.h | 4 +-
.../staging/tidspbridge/include/dspbridge/nldr.h | 2 +-
.../staging/tidspbridge/include/dspbridge/node.h | 26 ++--
.../staging/tidspbridge/include/dspbridge/proc.h | 12 +-
.../include/dspbridge/resourcecleanup.h | 10 +-
drivers/staging/tidspbridge/pmgr/dev.c | 4 +-
drivers/staging/tidspbridge/rmgr/drv.c | 87 ++++++------
drivers/staging/tidspbridge/rmgr/drv_interface.c | 4 +-
drivers/staging/tidspbridge/rmgr/mgr.c | 4 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 6 +-
drivers/staging/tidspbridge/rmgr/node.c | 140 ++++++++++----------
drivers/staging/tidspbridge/rmgr/proc.c | 12 +-
20 files changed, 276 insertions(+), 275 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/rmgr/drv.c

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 01564a5..80aecdf 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -147,9 +147,9 @@ static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static void output_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
struct chnl_object *pchnl, u32 mask);
-static u32 read_data(struct bridge_dev_context *hDevContext, void *dest,
+static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
void *pSrc, u32 usize);
-static u32 write_data(struct bridge_dev_context *hDevContext, void *dest,
+static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
void *pSrc, u32 usize);

/* Bus Addr (cached kernel) */
@@ -1701,7 +1701,7 @@ func_end:
* ======== read_data ========
* Copies buffers from the shared memory to the host buffer.
*/
-static u32 read_data(struct bridge_dev_context *hDevContext, void *dest,
+static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
void *pSrc, u32 usize)
{
memcpy(dest, pSrc, usize);
@@ -1712,7 +1712,7 @@ static u32 read_data(struct bridge_dev_context *hDevContext, void *dest,
* ======== write_data ========
* Copies buffers from the host side buffer to the shared memory.
*/
-static u32 write_data(struct bridge_dev_context *hDevContext, void *dest,
+static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
void *pSrc, u32 usize)
{
memcpy(dest, pSrc, usize);
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 1555af7..31a7ff6 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -90,19 +90,19 @@ static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
-static int bridge_brd_set_state(struct bridge_dev_context *hDevContext,
+static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState);
-static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
-static int bridge_brd_mem_map(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages);
-static int bridge_brd_mem_un_map(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes);
static int bridge_dev_create(OUT struct bridge_dev_context
**ppDevContext,
@@ -112,12 +112,12 @@ static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
u32 dw_cmd, IN OUT void *pargs);
static int bridge_dev_destroy(struct bridge_dev_context *dev_context);
static u32 user_va2_pa(struct mm_struct *mm, u32 address);
-static int pte_update(struct bridge_dev_context *hDevContext, u32 pa,
+static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
u32 va, u32 size,
struct hw_mmu_map_attrs_t *map_attrs);
static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
u32 size, struct hw_mmu_map_attrs_t *attrs);
-static int mem_map_vmalloc(struct bridge_dev_context *hDevContext,
+static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs);
@@ -273,10 +273,10 @@ void bridge_drv_entry(OUT struct bridge_drv_interface **ppDrvInterface,
* Preconditions:
* Device in 'OFF' state.
*/
-static int bridge_brd_monitor(struct bridge_dev_context *hDevContext)
+static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
u32 temp;
struct dspbridge_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data;
@@ -316,14 +316,14 @@ static int bridge_brd_monitor(struct bridge_dev_context *hDevContext)
* purpose:
* Reads buffers for DSP memory.
*/
-static int bridge_brd_read(struct bridge_dev_context *hDevContext,
+static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
u32 offset;
- u32 dsp_base_addr = hDevContext->dw_dsp_base_addr;
+ u32 dsp_base_addr = dev_ctxt->dw_dsp_base_addr;

if (dsp_addr < dev_context->dw_dsp_start_add) {
status = -EPERM;
@@ -348,11 +348,11 @@ static int bridge_brd_read(struct bridge_dev_context *hDevContext,
* purpose:
* This routine updates the Board status.
*/
-static int bridge_brd_set_state(struct bridge_dev_context *hDevContext,
+static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;

dev_context->dw_brd_state = ulBrdState;
return status;
@@ -368,11 +368,11 @@ static int bridge_brd_set_state(struct bridge_dev_context *hDevContext,
* b) DSP_RST1 is asserted.
* b) DSP_RST2 is released.
*/
-static int bridge_brd_start(struct bridge_dev_context *hDevContext,
+static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
u32 dw_sync_addr = 0;
u32 ul_shm_base; /* Gpp Phys SM base addr(byte) */
u32 ul_shm_base_virt; /* Dsp Virt SM base addr */
@@ -641,10 +641,10 @@ static int bridge_brd_start(struct bridge_dev_context *hDevContext,
* Preconditions :
* a) None
*/
-static int bridge_brd_stop(struct bridge_dev_context *hDevContext)
+static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
struct pg_table_attrs *pt_attrs;
u32 dsp_pwr_state;
int clk_status;
@@ -714,10 +714,10 @@ static int bridge_brd_stop(struct bridge_dev_context *hDevContext)
* Preconditions :
* a) None
*/
-static int bridge_brd_delete(struct bridge_dev_context *hDevContext)
+static int bridge_brd_delete(struct bridge_dev_context *dev_ctxt)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
struct pg_table_attrs *pt_attrs;
int clk_status;
struct dspbridge_platform_data *pdata =
@@ -765,10 +765,10 @@ static int bridge_brd_delete(struct bridge_dev_context *hDevContext)
* ======== bridge_brd_status ========
* Returns the board status.
*/
-static int bridge_brd_status(struct bridge_dev_context *hDevContext,
+static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
int *pdwState)
{
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
*pdwState = dev_context->dw_brd_state;
return 0;
}
@@ -777,12 +777,12 @@ static int bridge_brd_status(struct bridge_dev_context *hDevContext,
* ======== bridge_brd_write ========
* Copies the buffers to DSP internal or external memory.
*/
-static int bridge_brd_write(struct bridge_dev_context *hDevContext,
+static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;

if (dsp_addr < dev_context->dw_dsp_start_add) {
status = -EPERM;
@@ -790,7 +790,7 @@ static int bridge_brd_write(struct bridge_dev_context *hDevContext,
}
if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
- status = write_dsp_data(hDevContext, pbHostBuf, dsp_addr,
+ status = write_dsp_data(dev_ctxt, pbHostBuf, dsp_addr,
ul_num_bytes, ulMemType);
} else {
status = write_ext_dsp_data(dev_context, pbHostBuf, dsp_addr,
@@ -1029,18 +1029,18 @@ static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
* ======== bridge_dev_destroy ========
* Destroys the driver object.
*/
-static int bridge_dev_destroy(struct bridge_dev_context *hDevContext)
+static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
{
struct pg_table_attrs *pt_attrs;
int status = 0;
struct bridge_dev_context *dev_context = (struct bridge_dev_context *)
- hDevContext;
+ dev_ctxt;
struct cfg_hostres *host_res;
u32 shm_size;
struct drv_data *drv_datap = dev_get_drvdata(bridge);

/* It should never happen */
- if (!hDevContext)
+ if (!dev_ctxt)
return -EFAULT;

/* first put the device to stop state */
@@ -1117,11 +1117,11 @@ static int bridge_dev_destroy(struct bridge_dev_context *hDevContext)
kfree(drv_datap->base_img);
kfree(drv_datap);
dev_set_drvdata(bridge, NULL);
- kfree((void *)hDevContext);
+ kfree((void *)dev_ctxt);
return status;
}

-static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType)
{
@@ -1131,24 +1131,24 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,
u32 copy_bytes = 0;
u32 total_bytes = ul_num_bytes;
u8 host_buf[BUFFERSIZE];
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
while ((total_bytes > 0) && DSP_SUCCEEDED(status)) {
copy_bytes =
total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
/* Read from External memory */
- status = read_ext_dsp_data(hDevContext, host_buf, src_addr,
+ status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr,
copy_bytes, ulMemType);
if (DSP_SUCCEEDED(status)) {
if (dest_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
/* Write to Internal memory */
- status = write_dsp_data(hDevContext, host_buf,
+ status = write_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
ulMemType);
} else {
/* Write to External memory */
status =
- write_ext_dsp_data(hDevContext, host_buf,
+ write_ext_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
ulMemType, false);
}
@@ -1161,12 +1161,12 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *hDevContext,
}

/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
-static int bridge_brd_mem_write(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
IN u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
u32 ul_remain_bytes = 0;
u32 ul_bytes = 0;
ul_remain_bytes = ul_num_bytes;
@@ -1176,10 +1176,10 @@ static int bridge_brd_mem_write(struct bridge_dev_context *hDevContext,
if (dsp_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
status =
- write_dsp_data(hDevContext, pbHostBuf, dsp_addr,
+ write_dsp_data(dev_ctxt, pbHostBuf, dsp_addr,
ul_bytes, ulMemType);
} else {
- status = write_ext_dsp_data(hDevContext, pbHostBuf,
+ status = write_ext_dsp_data(dev_ctxt, pbHostBuf,
dsp_addr, ul_bytes,
ulMemType, true);
}
@@ -1199,14 +1199,14 @@ static int bridge_brd_mem_write(struct bridge_dev_context *hDevContext,
*
* TODO: Disable MMU while updating the page tables (but that'll stall DSP)
*/
-static int bridge_brd_mem_map(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages)
{
u32 attrs;
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
struct hw_mmu_map_attrs_t hw_attrs;
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
@@ -1221,7 +1221,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *hDevContext,

dev_dbg(bridge,
"%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n",
- __func__, hDevContext, ul_mpu_addr, ulVirtAddr, ul_num_bytes,
+ __func__, dev_ctxt, ul_mpu_addr, ulVirtAddr, ul_num_bytes,
ul_map_attr);
if (ul_num_bytes == 0)
return -EINVAL;
@@ -1268,7 +1268,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *hDevContext,
hw_attrs.donotlockmpupage = 0;

if (attrs & DSP_MAPVMALLOCADDR) {
- return mem_map_vmalloc(hDevContext, ul_mpu_addr, ulVirtAddr,
+ return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, ulVirtAddr,
ul_num_bytes, &hw_attrs);
}
/*
@@ -1422,7 +1422,7 @@ func_cont:
* So, instead of looking up the PTE address for every 4K block,
* we clear consecutive PTEs until we unmap all the bytes
*/
-static int bridge_brd_mem_un_map(struct bridge_dev_context *hDevContext,
+static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes)
{
u32 l1_base_va;
@@ -1439,7 +1439,7 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *hDevContext,
u32 va_curr;
struct page *pg = NULL;
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
struct pg_table_attrs *pt = dev_context->pt_attrs;
u32 temp;
u32 paddr;
@@ -1450,8 +1450,8 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *hDevContext,
rem_bytes_l2 = 0;
l1_base_va = pt->l1_base_va;
pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr);
- dev_dbg(bridge, "%s hDevContext %p, va %x, NumBytes %x l1_base_va %x, "
- "pte_addr_l1 %x\n", __func__, hDevContext, ulVirtAddr,
+ dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, "
+ "pte_addr_l1 %x\n", __func__, dev_ctxt, ulVirtAddr,
ul_num_bytes, l1_base_va, pte_addr_l1);

while (rem_bytes && (DSP_SUCCEEDED(status))) {
@@ -1647,7 +1647,7 @@ static u32 user_va2_pa(struct mm_struct *mm, u32 address)
* This function calculates the optimum page-aligned addresses and sizes
* Caller must pass page-aligned values
*/
-static int pte_update(struct bridge_dev_context *hDevContext, u32 pa,
+static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
u32 va, u32 size,
struct hw_mmu_map_attrs_t *map_attrs)
{
@@ -1656,7 +1656,7 @@ static int pte_update(struct bridge_dev_context *hDevContext, u32 pa,
u32 pa_curr = pa;
u32 va_curr = va;
u32 num_bytes = size;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
int status = 0;
u32 page_size[] = { HW_PAGE_SIZE16MB, HW_PAGE_SIZE1MB,
HW_PAGE_SIZE64KB, HW_PAGE_SIZE4KB
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 3952dcb..09daeaa 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -50,12 +50,12 @@ bool symbols_reloaded = true;
* ======== read_ext_dsp_data ========
* Copies DSP external memory buffers to the host side buffers.
*/
-int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
+int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
OUT u8 *pbHostBuf, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
- struct bridge_dev_context *dev_context = hDevContext;
+ struct bridge_dev_context *dev_context = dev_ctxt;
u32 offset;
u32 ul_tlb_base_virt = 0;
u32 ul_shm_offset_virt = 0;
@@ -178,13 +178,13 @@ int read_ext_dsp_data(struct bridge_dev_context *hDevContext,
* purpose:
* Copies buffers to the DSP internal/external memory.
*/
-int write_dsp_data(struct bridge_dev_context *hDevContext,
+int write_dsp_data(struct bridge_dev_context *dev_ctxt,
IN u8 *pbHostBuf, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType)
{
u32 offset;
- u32 dw_base_addr = hDevContext->dw_dsp_base_addr;
- struct cfg_hostres *resources = hDevContext->resources;
+ u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr;
+ struct cfg_hostres *resources = dev_ctxt->resources;
int status = 0;
u32 base1, base2, base3;
base1 = OMAP_DSP_MEM1_SIZE;
@@ -194,7 +194,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext,
if (!resources)
return -EPERM;

- offset = dsp_addr - hDevContext->dw_dsp_start_add;
+ offset = dsp_addr - dev_ctxt->dw_dsp_start_add;
if (offset < base1) {
dw_base_addr = MEM_LINEAR_ADDRESS(resources->dw_mem_base[2],
resources->dw_mem_length[2]);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 87c1681..2ee1c41 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -41,7 +41,7 @@
* device's bridge_brd_write() function.
* Parameters:
* pArb: Handle to a Device Object.
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
@@ -336,7 +336,7 @@ extern int dev_get_dev_node(struct dev_object *hdev_obj,
* 0: *phDevNode contains a platform specific device ID;
* else: *phDevNode is NULL.
*/
-extern int dev_get_dev_type(struct dev_object *hdevObject,
+extern int dev_get_dev_type(struct dev_object *device_obj,
u8 *dev_type);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 2fd14b0..2c63db9 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -57,15 +57,15 @@ extern int disp_create(OUT struct disp_object **phDispObject,
* Delete the NODE Dispatcher.
*
* Parameters:
- * hDispObject: Node Dispatcher object.
+ * disp_obj: Node Dispatcher object.
* Returns:
* Requires:
* disp_init(void) called.
- * Valid hDispObject.
+ * Valid disp_obj.
* Ensures:
- * hDispObject is invalid.
+ * disp_obj is invalid.
*/
-extern void disp_delete(struct disp_object *hDispObject);
+extern void disp_delete(struct disp_object *disp_obj);

/*
* ======== disp_exit ========
@@ -97,7 +97,7 @@ extern bool disp_init(void);
* Change the priority of a node currently running on the target.
*
* Parameters:
- * hDispObject: Node Dispatcher object.
+ * disp_obj: Node Dispatcher object.
* hnode: Node object representing a node currently
* allocated or running on the DSP.
* ulFxnAddress: Address of RMS function for changing priority.
@@ -108,12 +108,12 @@ extern bool disp_init(void);
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
- * Valid hDispObject.
+ * Valid disp_obj.
* hnode != NULL.
* Ensures:
*/
extern int disp_node_change_priority(struct disp_object
- *hDispObject,
+ *disp_obj,
struct node_object *hnode,
u32 ul_fxn_addr,
nodeenv node_env, s32 prio);
@@ -123,7 +123,7 @@ extern int disp_node_change_priority(struct disp_object
* Create a node on the DSP by remotely calling the node's create function.
*
* Parameters:
- * hDispObject: Node Dispatcher object.
+ * disp_obj: Node Dispatcher object.
* hnode: Node handle obtained from node_allocate().
* ul_fxn_addr: Address or RMS create node function.
* ul_create_fxn: Address of node's create function.
@@ -136,14 +136,14 @@ extern int disp_node_change_priority(struct disp_object
* -EPERM: A failure occurred, unable to create node.
* Requires:
* disp_init(void) called.
- * Valid hDispObject.
+ * Valid disp_obj.
* pargs != NULL.
* hnode != NULL.
* pNodeEnv != NULL.
* node_get_type(hnode) != NODE_DEVICE.
* Ensures:
*/
-extern int disp_node_create(struct disp_object *hDispObject,
+extern int disp_node_create(struct disp_object *disp_obj,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_create_fxn,
@@ -155,7 +155,7 @@ extern int disp_node_create(struct disp_object *hDispObject,
* Delete a node on the DSP by remotely calling the node's delete function.
*
* Parameters:
- * hDispObject: Node Dispatcher object.
+ * disp_obj: Node Dispatcher object.
* hnode: Node object representing a node currently
* loaded on the DSP.
* ul_fxn_addr: Address or RMS delete node function.
@@ -166,11 +166,11 @@ extern int disp_node_create(struct disp_object *hDispObject,
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
- * Valid hDispObject.
+ * Valid disp_obj.
* hnode != NULL.
* Ensures:
*/
-extern int disp_node_delete(struct disp_object *hDispObject,
+extern int disp_node_delete(struct disp_object *disp_obj,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_delete_fxn, nodeenv node_env);
@@ -181,7 +181,7 @@ extern int disp_node_delete(struct disp_object *hDispObject,
* that has been suspended (via DISP_NodePause()) on the DSP.
*
* Parameters:
- * hDispObject: Node Dispatcher object.
+ * disp_obj: Node Dispatcher object.
* hnode: Node object representing a node to be executed
* on the DSP.
* ul_fxn_addr: Address or RMS node execute function.
@@ -192,11 +192,11 @@ extern int disp_node_delete(struct disp_object *hDispObject,
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
- * Valid hDispObject.
+ * Valid disp_obj.
* hnode != NULL.
* Ensures:
*/
-extern int disp_node_run(struct disp_object *hDispObject,
+extern int disp_node_run(struct disp_object *disp_obj,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_execute_fxn, nodeenv node_env);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 66f12ef..8289664 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -313,16 +313,16 @@ extern u32 drv_get_next_dev_object(u32 hdev_obj);
* Purpose:
* Returns the Ptr to the Next Device Extension from the the List
* Parameters:
- * hDevExtension: Handle to the Device Extension
+ * dev_extension: Handle to the Device Extension
* Requires:
* DRV Initialized
- * hDevExtension != 0.
+ * dev_extension != 0.
* Returns:
* dw_dev_extension: Ptr to the Next Dev Extension
* 0: If it fail to Get the next Dev Extension
* Ensures:
*/
-extern u32 drv_get_next_dev_extension(u32 hDevExtension);
+extern u32 drv_get_next_dev_extension(u32 dev_extension);

/*
* ======== drv_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index fe3abab..4c06107 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -55,52 +55,52 @@ struct bridge_dev_context;
* Purpose:
* Bring the board to the BRD_IDLE (monitor) state.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device context.
+ * dev_ctxt: Handle to Bridge driver defined device context.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL
+ * dev_ctxt != NULL
* Ensures:
* 0: Board is in BRD_IDLE state;
* else: Board state is indeterminate.
*/
-typedef int(*fxn_brd_monitor) (struct bridge_dev_context *hDevContext);
+typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt);

/*
* ======== fxn_brd_setstate ========
* Purpose:
* Sets the Bridge driver state
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* ulBrdState: Board state
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* ulBrdState <= BRD_LASTSTATE.
* Ensures:
* ulBrdState <= BRD_LASTSTATE.
* Update the Board state to the specified state.
*/
typedef int(*fxn_brd_setstate) (struct bridge_dev_context
- * hDevContext, u32 ulBrdState);
+ * dev_ctxt, u32 ulBrdState);

/*
* ======== bridge_brd_start ========
* Purpose:
* Bring board to the BRD_RUNNING (start) state.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device context.
+ * dev_ctxt: Handle to Bridge driver defined device context.
* dsp_addr: DSP address at which to start execution.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL
+ * dev_ctxt != NULL
* Board is in monitor (BRD_IDLE) state.
* Ensures:
* 0: Board is in BRD_RUNNING state.
@@ -108,7 +108,7 @@ typedef int(*fxn_brd_setstate) (struct bridge_dev_context
* else: Board state is indeterminate.
*/
typedef int(*fxn_brd_start) (struct bridge_dev_context
- * hDevContext, u32 dsp_addr);
+ * dev_ctxt, u32 dsp_addr);

/*
* ======== bridge_brd_mem_copy ========
@@ -131,7 +131,7 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
* else: Board state is indeterminate.
*/
typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
- * hDevContext,
+ * dev_ctxt,
u32 ulDspDestAddr,
u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
@@ -141,7 +141,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* Write a block of host memory into a DSP address, into a given memory
* space. Unlike bridge_brd_write, this API does reset the DSP
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
@@ -151,12 +151,12 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* pHostBuf != NULL.
* Ensures:
*/
typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
- * hDevContext,
+ * dev_ctxt,
IN u8 *pHostBuf,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
@@ -166,7 +166,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* Purpose:
* Map a MPU memory region to a DSP/IVA memory space
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* ul_mpu_addr: MPU memory region start address.
* ulVirtAddr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to map.
@@ -175,11 +175,11 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* 0: Success.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* Ensures:
*/
typedef int(*fxn_brd_memmap) (struct bridge_dev_context
- * hDevContext, u32 ul_mpu_addr,
+ * dev_ctxt, u32 ul_mpu_addr,
u32 ulVirtAddr, u32 ul_num_bytes,
u32 ulMapAttrs,
struct page **mapped_pages);
@@ -189,18 +189,18 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* Purpose:
* UnMap an MPU memory region from DSP/IVA memory space
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* ulVirtAddr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to unmap.
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* Ensures:
*/
typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
- * hDevContext,
+ * dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes);

/*
@@ -208,36 +208,36 @@ typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
* Purpose:
* Bring board to the BRD_STOPPED state.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device context.
+ * dev_ctxt: Handle to Bridge driver defined device context.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL
+ * dev_ctxt != NULL
* Ensures:
* 0: Board is in BRD_STOPPED (stop) state;
* Interrupts to the PC are disabled.
* else: Board state is indeterminate.
*/
-typedef int(*fxn_brd_stop) (struct bridge_dev_context *hDevContext);
+typedef int(*fxn_brd_stop) (struct bridge_dev_context *dev_ctxt);

/*
* ======== bridge_brd_status ========
* Purpose:
* Report the current state of the board.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device context.
+ * dev_ctxt: Handle to Bridge driver defined device context.
* pdwState: Ptr to BRD status variable.
* Returns:
* 0:
* Requires:
* pdwState != NULL;
- * hDevContext != NULL
+ * dev_ctxt != NULL
* Ensures:
* *pdwState is one of {BRD_STOPPED, BRD_IDLE, BRD_RUNNING, BRD_UNKNOWN};
*/
-typedef int(*fxn_brd_status) (struct bridge_dev_context *hDevContext,
+typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
int *pdwState);

/*
@@ -246,7 +246,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *hDevContext,
* Read a block of DSP memory, from a given memory space, into a host
* buffer.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* pHostBuf: Pointer to host buffer (Destination).
* dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer.
@@ -256,12 +256,12 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *hDevContext,
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* pHostBuf != NULL.
* Ensures:
* Will not write more than ul_num_bytes bytes into pHostBuf.
*/
-typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
+typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
OUT u8 *pHostBuf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
@@ -272,7 +272,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
* Write a block of host memory into a DSP address, into a given memory
* space.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
@@ -282,11 +282,11 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *hDevContext,
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
* -EPERM: Other, unspecified error.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* pHostBuf != NULL.
* Ensures:
*/
-typedef int(*fxn_brd_write) (struct bridge_dev_context *hDevContext,
+typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
IN u8 *pHostBuf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
@@ -690,7 +690,7 @@ typedef int(*fxn_dev_create) (OUT struct bridge_dev_context
* Purpose:
* Bridge driver specific interface.
* Parameters:
- * hDevContext: Handle to Bridge driver defined device info.
+ * dev_ctxt: Handle to Bridge driver defined device info.
* dw_cmd: Bridge driver defined command code.
* pargs: Pointer to an arbitrary argument structure.
* Returns:
@@ -701,7 +701,7 @@ typedef int(*fxn_dev_create) (OUT struct bridge_dev_context
* IOCTL completion routines provided.
* Ensures:
*/
-typedef int(*fxn_dev_ctrl) (struct bridge_dev_context *hDevContext,
+typedef int(*fxn_dev_ctrl) (struct bridge_dev_context *dev_ctxt,
u32 dw_cmd, IN OUT void *pargs);

/*
@@ -712,16 +712,16 @@ typedef int(*fxn_dev_ctrl) (struct bridge_dev_context *hDevContext,
* No calls to other Bridge driver functions may subsequently
* occur, except for bridge_dev_create().
* Parameters:
- * hDevContext: Handle to Bridge driver defined device information.
+ * dev_ctxt: Handle to Bridge driver defined device information.
* Returns:
* 0: Success.
* -EPERM: Failed to release a resource previously acquired.
* Requires:
- * hDevContext != NULL;
+ * dev_ctxt != NULL;
* Ensures:
* 0: Device context is freed.
*/
-typedef int(*fxn_dev_destroy) (struct bridge_dev_context *hDevContext);
+typedef int(*fxn_dev_destroy) (struct bridge_dev_context *dev_ctxt);

/*
* ======== bridge_deh_create ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index fa63820..a2c76bc 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -270,21 +270,21 @@ extern int io_sh_msetting(struct io_mgr *hio_mgr, u8 desc, void *pargs);
/* Maximum channel bufsize that can be used. */
extern u32 io_buf_size(struct io_mgr *hio_mgr);

-extern u32 io_read_value(struct bridge_dev_context *hDevContext, u32 dsp_addr);
+extern u32 io_read_value(struct bridge_dev_context *dev_ctxt, u32 dsp_addr);

-extern void io_write_value(struct bridge_dev_context *hDevContext,
+extern void io_write_value(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr, u32 value);

-extern u32 io_read_value_long(struct bridge_dev_context *hDevContext,
+extern u32 io_read_value_long(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr);

-extern void io_write_value_long(struct bridge_dev_context *hDevContext,
+extern void io_write_value_long(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr, u32 value);

-extern void io_or_set_value(struct bridge_dev_context *hDevContext,
+extern void io_or_set_value(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr, u32 value);

-extern void io_and_set_value(struct bridge_dev_context *hDevContext,
+extern void io_and_set_value(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr, u32 value);

extern void io_intr_dsp2(IN struct io_mgr *pio_mgr, IN u16 mb_val);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
index ce418ae..e225845 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
@@ -173,7 +173,7 @@ extern void mgr_exit(void);
* Purpose:
* Retrieves the MGR handle. Accessor Function
* Parameters:
- * hMGRHandle: Handle to the Manager Object
+ * mgr_handle: Handle to the Manager Object
* phDCDHandle: Ptr to receive the DCD Handle.
* Returns:
* 0: Sucess
@@ -186,7 +186,7 @@ extern void mgr_exit(void);
* -EPERM and *phDCDHandle == NULL
*/
extern int mgr_get_dcd_handle(IN struct mgr_object
- *hMGRHandle, OUT u32 *phDCDHandle);
+ *mgr_handle, OUT u32 *phDCDHandle);

/*
* ======== mgr_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index 073aa9f..505740f 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -41,7 +41,7 @@ extern void nldr_exit(void);
extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
char *pstrFxn, u32 * pulAddr);

-extern int nldr_get_rmm_manager(struct nldr_object *hNldrObject,
+extern int nldr_get_rmm_manager(struct nldr_object *nldr,
OUT struct rmm_target_obj **phRmmMgr);

extern bool nldr_init(void);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index 7587213..9c64b5a 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -118,32 +118,32 @@ extern int node_change_priority(struct node_object *hnode, s32 prio);
* Delete all nodes whose owning processor is being destroyed.
* Parameters:
* hnode_mgr: Node manager object.
- * hProc: Handle to processor object being destroyed.
+ * proc: Handle to processor object being destroyed.
* Returns:
* 0: Success.
- * -EPERM: Unable to delete all nodes belonging to hProc.
+ * -EPERM: Unable to delete all nodes belonging to proc.
* Requires:
* Valid hnode_mgr.
- * hProc != NULL.
+ * proc != NULL.
* Ensures:
*/
extern int node_close_orphans(struct node_mgr *hnode_mgr,
- struct proc_object *hProc);
+ struct proc_object *proc);

/*
* ======== node_connect ========
* Purpose:
* Connect two nodes on the DSP, or a node on the DSP to the GPP. In the
* case that the connnection is being made between a node on the DSP and
- * the GPP, one of the node handles (either hNode1 or hNode2) must be
+ * the GPP, one of the node handles (either node1 or node2) must be
* the constant NODE_HGPPNODE.
* Parameters:
- * hNode1: Handle of first node to connect to second node. If
- * this is a connection from the GPP to hNode2, hNode1
- * must be the constant NODE_HGPPNODE. Otherwise, hNode1
+ * node1: Handle of first node to connect to second node. If
+ * this is a connection from the GPP to node2, node1
+ * must be the constant NODE_HGPPNODE. Otherwise, node1
* must be a node handle returned from a successful call
* to Node_Allocate().
- * hNode2: Handle of second node. Must be either NODE_HGPPNODE
+ * node2: Handle of second node. Must be either NODE_HGPPNODE
* if this is a connection from DSP node to GPP, or a
* node handle returned from a successful call to
* node_allocate().
@@ -163,12 +163,12 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* pass binary data.
* Returns:
* 0: Success.
- * -EFAULT: Invalid hNode1 or hNode2.
+ * -EFAULT: Invalid node1 or node2.
* -ENOMEM: Insufficient host memory.
* -EINVAL: A stream index parameter is invalid.
* -EISCONN: A connection already exists for one of the
* indices uStream1 or uStream2.
- * -EBADR: Either hNode1 or hNode2 is not in the
+ * -EBADR: Either node1 or node2 is not in the
* NODE_ALLOCATED state.
* -ECONNREFUSED: No more connections available.
* -EPERM: Attempt to make an illegal connection (eg,
@@ -178,9 +178,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* node_init(void) called.
* Ensures:
*/
-extern int node_connect(struct node_object *hNode1,
+extern int node_connect(struct node_object *node1,
u32 uStream1,
- struct node_object *hNode2,
+ struct node_object *node2,
u32 uStream2,
OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index 230828c..11fdc97 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -364,7 +364,7 @@ extern int proc_register_notify(void *hprocessor,
* Purpose:
* Notify the Processor Clients
* Parameters:
- * hProc : The processor handle.
+ * proc : The processor handle.
* uEvents : Event to be notified about.
* Returns:
* 0 : Success.
@@ -372,18 +372,18 @@ extern int proc_register_notify(void *hprocessor,
* -EPERM : Failure to Set or Reset the Event
* Requires:
* uEvents is Supported or Valid type of Event
- * hProc is a valid handle
+ * proc is a valid handle
* PROC Initialized.
* Ensures:
*/
-extern int proc_notify_clients(void *hProc, u32 uEvents);
+extern int proc_notify_clients(void *proc, u32 uEvents);

/*
* ======== proc_notify_all_clients ========
* Purpose:
* Notify the Processor Clients
* Parameters:
- * hProc : The processor handle.
+ * proc : The processor handle.
* uEvents : Event to be notified about.
* Returns:
* 0 : Success.
@@ -391,14 +391,14 @@ extern int proc_notify_clients(void *hProc, u32 uEvents);
* -EPERM : Failure to Set or Reset the Event
* Requires:
* uEvents is Supported or Valid type of Event
- * hProc is a valid handle
+ * proc is a valid handle
* PROC Initialized.
* Ensures:
* Details:
* NODE And STRM would use this function to notify their clients
* about the state changes in NODE or STRM.
*/
-extern int proc_notify_all_clients(void *hProc, u32 uEvents);
+extern int proc_notify_all_clients(void *proc, u32 uEvents);

/*
* ======== proc_start ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
index b452a71..1fa7d13 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
@@ -20,8 +20,8 @@
extern int drv_get_proc_ctxt_list(struct process_context **pPctxt,
struct drv_object *hdrv_obj);

-extern int drv_insert_proc_context(struct drv_object *hDrVObject,
- void *hPCtxt);
+extern int drv_insert_proc_context(struct drv_object *driver_obj,
+ void *process_ctxt);

extern int drv_remove_all_dmm_res_elements(void *ctxt);

@@ -31,7 +31,7 @@ extern int drv_proc_set_pid(void *ctxt, s32 process);

extern int drv_remove_all_resources(void *pPctxt);

-extern int drv_remove_proc_context(struct drv_object *hDRVObject,
+extern int drv_remove_proc_context(struct drv_object *driver_obj,
void *pr_ctxt);

extern int drv_get_node_res_element(void *hnode, void *node_res,
@@ -40,11 +40,11 @@ extern int drv_get_node_res_element(void *hnode, void *node_res,
extern int drv_insert_node_res_element(void *hnode, void *node_res,
void *ctxt);

-extern void drv_proc_node_update_heap_status(void *hNodeRes, s32 status);
+extern void drv_proc_node_update_heap_status(void *node_resource, s32 status);

extern int drv_remove_node_res_element(void *node_res, void *status);

-extern void drv_proc_node_update_status(void *hNodeRes, s32 status);
+extern void drv_proc_node_update_status(void *node_resource, s32 status);

extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_res);

diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 50a5d97..1f70605 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -1039,10 +1039,10 @@ int dev_remove_proc_object(struct dev_object *hdev_obj, u32 proc_obj)
return status;
}

-int dev_get_dev_type(struct dev_object *hdevObject, u8 *dev_type)
+int dev_get_dev_type(struct dev_object *device_obj, u8 *dev_type)
{
int status = 0;
- struct dev_object *dev_obj = (struct dev_object *)hdevObject;
+ struct dev_object *dev_obj = (struct dev_object *)device_obj;

*dev_type = dev_obj->dev_type;

diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index c6e38e5..2c06f82
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -73,16 +73,16 @@ static int request_bridge_resources(struct cfg_hostres *res);

/* GPP PROCESS CLEANUP CODE */

-static int drv_proc_free_node_res(void *hPCtxt);
+static int drv_proc_free_node_res(void *process_ctxt);

/* Allocate and add a node resource element
* This function is called from .Node_Allocate. */
-int drv_insert_node_res_element(void *hnode, void *hNodeRes,
- void *hPCtxt)
+int drv_insert_node_res_element(void *hnode, void *node_resource,
+ void *process_ctxt)
{
struct node_res_object **node_res_obj =
- (struct node_res_object **)hNodeRes;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ (struct node_res_object **)node_resource;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct node_res_object *temp_node_res = NULL;

@@ -113,11 +113,11 @@ int drv_insert_node_res_element(void *hnode, void *hNodeRes,

/* Release all Node resources and its context
* This is called from .Node_Delete. */
-int drv_remove_node_res_element(void *hNodeRes, void *hPCtxt)
+int drv_remove_node_res_element(void *node_resource, void *process_ctxt)
{
struct node_res_object *node_res_obj =
- (struct node_res_object *)hNodeRes;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ (struct node_res_object *)node_resource;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
struct node_res_object *temp_node;
int status = 0;

@@ -140,9 +140,9 @@ int drv_remove_node_res_element(void *hNodeRes, void *hPCtxt)
}

/* Actual Node De-Allocation */
-static int drv_proc_free_node_res(void *hPCtxt)
+static int drv_proc_free_node_res(void *process_ctxt)
{
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct node_res_object *node_list = NULL;
struct node_res_object *node_res_obj = NULL;
@@ -169,9 +169,9 @@ static int drv_proc_free_node_res(void *hPCtxt)
}

/* Release all Mapped and Reserved DMM resources */
-int drv_remove_all_dmm_res_elements(void *hPCtxt)
+int drv_remove_all_dmm_res_elements(void *process_ctxt)
{
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct dmm_map_object *temp_map, *map_obj;
struct dmm_rsv_object *temp_rsv, *rsv_obj;
@@ -198,29 +198,29 @@ int drv_remove_all_dmm_res_elements(void *hPCtxt)
}

/* Update Node allocation status */
-void drv_proc_node_update_status(void *hNodeRes, s32 status)
+void drv_proc_node_update_status(void *node_resource, s32 status)
{
struct node_res_object *node_res_obj =
- (struct node_res_object *)hNodeRes;
- DBC_ASSERT(hNodeRes != NULL);
+ (struct node_res_object *)node_resource;
+ DBC_ASSERT(node_resource != NULL);
node_res_obj->node_allocated = status;
}

/* Update Node Heap status */
-void drv_proc_node_update_heap_status(void *hNodeRes, s32 status)
+void drv_proc_node_update_heap_status(void *node_resource, s32 status)
{
struct node_res_object *node_res_obj =
- (struct node_res_object *)hNodeRes;
- DBC_ASSERT(hNodeRes != NULL);
+ (struct node_res_object *)node_resource;
+ DBC_ASSERT(node_resource != NULL);
node_res_obj->heap_allocated = status;
}

/* Release all Node resources and its context
* This is called from .bridge_release.
*/
-int drv_remove_all_node_res_elements(void *hPCtxt)
+int drv_remove_all_node_res_elements(void *process_ctxt)
{
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct node_res_object *temp_node2 = NULL;
struct node_res_object *temp_node = NULL;
@@ -237,11 +237,12 @@ int drv_remove_all_node_res_elements(void *hPCtxt)
}

/* Getting the node resource element */
-int drv_get_node_res_element(void *hnode, void *hNodeRes,
- void *hPCtxt)
+int drv_get_node_res_element(void *hnode, void *node_resource,
+ void *process_ctxt)
{
- struct node_res_object **node_res = (struct node_res_object **)hNodeRes;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct node_res_object **node_res =
+ (struct node_res_object **)node_resource;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct node_res_object *temp_node2 = NULL;
struct node_res_object *temp_node = NULL;
@@ -268,12 +269,12 @@ int drv_get_node_res_element(void *hnode, void *hNodeRes,
/* Allocate the STRM resource element
* This is called after the actual resource is allocated
*/
-int drv_proc_insert_strm_res_element(void *hStreamHandle,
- void *hstrm_res, void *hPCtxt)
+int drv_proc_insert_strm_res_element(void *stream_handle,
+ void *hstrm_res, void *process_ctxt)
{
struct strm_res_object **pstrm_res =
(struct strm_res_object **)hstrm_res;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct strm_res_object *temp_strm_res = NULL;

@@ -286,7 +287,7 @@ int drv_proc_insert_strm_res_element(void *hStreamHandle,
kfree(*pstrm_res);
return -EPERM;
}
- (*pstrm_res)->hstream = hStreamHandle;
+ (*pstrm_res)->hstream = stream_handle;
if (ctxt->pstrm_list != NULL) {
temp_strm_res = ctxt->pstrm_list;
while (temp_strm_res->next != NULL)
@@ -304,10 +305,10 @@ int drv_proc_insert_strm_res_element(void *hStreamHandle,
/* Release Stream resource element context
* This function called after the actual resource is freed
*/
-int drv_proc_remove_strm_res_element(void *hstrm_res, void *hPCtxt)
+int drv_proc_remove_strm_res_element(void *hstrm_res, void *process_ctxt)
{
struct strm_res_object *pstrm_res = (struct strm_res_object *)hstrm_res;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
struct strm_res_object *temp_strm_res;
int status = 0;

@@ -333,9 +334,9 @@ int drv_proc_remove_strm_res_element(void *hstrm_res, void *hPCtxt)
/* Release all Stream resources and its context
* This is called from .bridge_release.
*/
-int drv_remove_all_strm_res_elements(void *hPCtxt)
+int drv_remove_all_strm_res_elements(void *process_ctxt)
{
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct strm_res_object *strm_res = NULL;
struct strm_res_object *strm_tmp = NULL;
@@ -375,11 +376,11 @@ int drv_remove_all_strm_res_elements(void *hPCtxt)

/* Getting the stream resource element */
int drv_get_strm_res_element(void *hStrm, void *hstrm_res,
- void *hPCtxt)
+ void *process_ctxt)
{
struct strm_res_object **strm_res =
(struct strm_res_object **)hstrm_res;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct strm_res_object *temp_strm2 = NULL;
struct strm_res_object *temp_strm;
@@ -486,10 +487,10 @@ void drv_exit(void)
* purpose:
* Invoked during bridge de-initialization
*/
-int drv_destroy(struct drv_object *hDRVObject)
+int drv_destroy(struct drv_object *driver_obj)
{
int status = 0;
- struct drv_object *pdrv_object = (struct drv_object *)hDRVObject;
+ struct drv_object *pdrv_object = (struct drv_object *)driver_obj;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(pdrv_object);
@@ -621,19 +622,19 @@ u32 drv_get_next_dev_object(u32 hdev_obj)
* called drv_get_first_dev_extension() and zero or more
* drv_get_next_dev_extension().
*/
-u32 drv_get_next_dev_extension(u32 hDevExtension)
+u32 drv_get_next_dev_extension(u32 dev_extension)
{
u32 dw_dev_extension = 0;
struct drv_object *pdrv_obj;

- DBC_REQUIRE(hDevExtension != 0);
+ DBC_REQUIRE(dev_extension != 0);

if (DSP_SUCCEEDED(cfg_get_object((u32 *) &pdrv_obj, REG_DRV_OBJECT))) {
if ((pdrv_obj->dev_node_string != NULL) &&
!LST_IS_EMPTY(pdrv_obj->dev_node_string)) {
dw_dev_extension =
(u32) lst_next(pdrv_obj->dev_node_string,
- (struct list_head *)hDevExtension);
+ (struct list_head *)dev_extension);
}
}

@@ -664,11 +665,11 @@ int drv_init(void)
* Purpose:
* Insert a DevObject into the list of Manager object.
*/
-int drv_insert_dev_object(struct drv_object *hDRVObject,
+int drv_insert_dev_object(struct drv_object *driver_obj,
struct dev_object *hdev_obj)
{
int status = 0;
- struct drv_object *pdrv_object = (struct drv_object *)hDRVObject;
+ struct drv_object *pdrv_object = (struct drv_object *)driver_obj;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hdev_obj != NULL);
@@ -689,11 +690,11 @@ int drv_insert_dev_object(struct drv_object *hDRVObject,
* Search for and remove a DeviceObject from the given list of DRV
* objects.
*/
-int drv_remove_dev_object(struct drv_object *hDRVObject,
+int drv_remove_dev_object(struct drv_object *driver_obj,
struct dev_object *hdev_obj)
{
int status = -EPERM;
- struct drv_object *pdrv_object = (struct drv_object *)hDRVObject;
+ struct drv_object *pdrv_object = (struct drv_object *)driver_obj;
struct list_head *cur_elem;

DBC_REQUIRE(refs > 0);
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index f0f089b..eb6f00f 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -628,10 +628,10 @@ static int bridge_mmap(struct file *filp, struct vm_area_struct *vma)

/* To remove all process resources before removing the process from the
* process context list */
-int drv_remove_all_resources(void *hPCtxt)
+int drv_remove_all_resources(void *process_ctxt)
{
int status = 0;
- struct process_context *ctxt = (struct process_context *)hPCtxt;
+ struct process_context *ctxt = (struct process_context *)process_ctxt;
drv_remove_all_strm_res_elements(ctxt);
drv_remove_all_node_res_elements(ctxt);
drv_remove_all_dmm_res_elements(ctxt);
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index b1a68ac..52d7865 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -303,11 +303,11 @@ void mgr_exit(void)
* ======== mgr_get_dcd_handle ========
* Retrieves the MGR handle. Accessor Function.
*/
-int mgr_get_dcd_handle(struct mgr_object *hMGRHandle,
+int mgr_get_dcd_handle(struct mgr_object *mgr_handle,
OUT u32 *phDCDHandle)
{
int status = -EPERM;
- struct mgr_object *pmgr_obj = (struct mgr_object *)hMGRHandle;
+ struct mgr_object *pmgr_obj = (struct mgr_object *)mgr_handle;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phDCDHandle != NULL);
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 4a55e84..ca2b85b 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -774,14 +774,14 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
* ======== nldr_get_rmm_manager ========
* Given a NLDR object, retrieve RMM Manager Handle
*/
-int nldr_get_rmm_manager(struct nldr_object *hNldrObject,
+int nldr_get_rmm_manager(struct nldr_object *nldr,
OUT struct rmm_target_obj **phRmmMgr)
{
int status = 0;
- struct nldr_object *nldr_obj = hNldrObject;
+ struct nldr_object *nldr_obj = nldr;
DBC_REQUIRE(phRmmMgr != NULL);

- if (hNldrObject) {
+ if (nldr) {
*phRmmMgr = nldr_obj->rmm;
} else {
*phRmmMgr = NULL;
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 3d2cf96..8b3cbd2 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -239,8 +239,8 @@ static struct dsp_bufferattr node_dfltbufattrs = {
static void delete_node(struct node_object *hnode,
struct process_context *pr_ctxt);
static void delete_node_mgr(struct node_mgr *hnode_mgr);
-static void fill_stream_connect(struct node_object *hNode1,
- struct node_object *hNode2, u32 uStream1,
+static void fill_stream_connect(struct node_object *node1,
+ struct node_object *node2, u32 uStream1,
u32 uStream2);
static void fill_stream_def(struct node_object *hnode,
struct node_strmdef *pstrm_def,
@@ -831,8 +831,8 @@ func_end:
* Purpose:
* Connect two nodes on the DSP, or a node on the DSP to the GPP.
*/
-int node_connect(struct node_object *hNode1, u32 uStream1,
- struct node_object *hNode2,
+int node_connect(struct node_object *node1, u32 uStream1,
+ struct node_object *node2,
u32 uStream2, OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata *conn_param)
{
@@ -853,33 +853,33 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
int status = 0;
DBC_REQUIRE(refs > 0);

- if ((hNode1 != (struct node_object *)DSP_HGPPNODE && !hNode1) ||
- (hNode2 != (struct node_object *)DSP_HGPPNODE && !hNode2))
+ if ((node1 != (struct node_object *)DSP_HGPPNODE && !node1) ||
+ (node2 != (struct node_object *)DSP_HGPPNODE && !node2))
status = -EFAULT;

if (DSP_SUCCEEDED(status)) {
/* The two nodes must be on the same processor */
- if (hNode1 != (struct node_object *)DSP_HGPPNODE &&
- hNode2 != (struct node_object *)DSP_HGPPNODE &&
- hNode1->hnode_mgr != hNode2->hnode_mgr)
+ if (node1 != (struct node_object *)DSP_HGPPNODE &&
+ node2 != (struct node_object *)DSP_HGPPNODE &&
+ node1->hnode_mgr != node2->hnode_mgr)
status = -EPERM;
/* Cannot connect a node to itself */
- if (hNode1 == hNode2)
+ if (node1 == node2)
status = -EPERM;

}
if (DSP_SUCCEEDED(status)) {
/* node_get_type() will return NODE_GPP if hnode =
* DSP_HGPPNODE. */
- node1_type = node_get_type(hNode1);
- node2_type = node_get_type(hNode2);
+ node1_type = node_get_type(node1);
+ node2_type = node_get_type(node2);
/* Check stream indices ranges */
if ((node1_type != NODE_GPP && node1_type != NODE_DEVICE &&
- uStream1 >= MAX_OUTPUTS(hNode1)) || (node2_type != NODE_GPP
+ uStream1 >= MAX_OUTPUTS(node1)) || (node2_type != NODE_GPP
&& node2_type !=
NODE_DEVICE
&& uStream2 >=
- MAX_INPUTS(hNode2)))
+ MAX_INPUTS(node2)))
status = -EINVAL;
}
if (DSP_SUCCEEDED(status)) {
@@ -909,19 +909,19 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
goto func_end;

if (node1_type != NODE_GPP) {
- hnode_mgr = hNode1->hnode_mgr;
+ hnode_mgr = node1->hnode_mgr;
} else {
- DBC_ASSERT(hNode2 != (struct node_object *)DSP_HGPPNODE);
- hnode_mgr = hNode2->hnode_mgr;
+ DBC_ASSERT(node2 != (struct node_object *)DSP_HGPPNODE);
+ hnode_mgr = node2->hnode_mgr;
}
/* Enter critical section */
mutex_lock(&hnode_mgr->node_mgr_lock);

/* Nodes must be in the allocated state */
- if (node1_type != NODE_GPP && node_get_state(hNode1) != NODE_ALLOCATED)
+ if (node1_type != NODE_GPP && node_get_state(node1) != NODE_ALLOCATED)
status = -EBADR;

- if (node2_type != NODE_GPP && node_get_state(hNode2) != NODE_ALLOCATED)
+ if (node2_type != NODE_GPP && node_get_state(node2) != NODE_ALLOCATED)
status = -EBADR;

if (DSP_SUCCEEDED(status)) {
@@ -929,7 +929,7 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
* are not already be used. (Device nodes checked later) */
if (node1_type == NODE_TASK || node1_type == NODE_DAISSOCKET) {
output =
- &(hNode1->create_args.asa.
+ &(node1->create_args.asa.
task_arg_obj.strm_out_def[uStream1]);
if (output->sz_device != NULL)
status = -EISCONN;
@@ -937,7 +937,7 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
}
if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
input =
- &(hNode2->create_args.asa.
+ &(node2->create_args.asa.
task_arg_obj.strm_in_def[uStream2]);
if (input->sz_device != NULL)
status = -EISCONN;
@@ -954,10 +954,10 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
if (pipe_id == GB_NOBITS) {
status = -ECONNREFUSED;
} else {
- hNode1->outputs[uStream1].type = NODECONNECT;
- hNode2->inputs[uStream2].type = NODECONNECT;
- hNode1->outputs[uStream1].dev_id = pipe_id;
- hNode2->inputs[uStream2].dev_id = pipe_id;
+ node1->outputs[uStream1].type = NODECONNECT;
+ node2->inputs[uStream2].type = NODECONNECT;
+ node1->outputs[uStream1].dev_id = pipe_id;
+ node2->inputs[uStream2].dev_id = pipe_id;
output->sz_device = kzalloc(PIPENAMELEN + 1,
GFP_KERNEL);
input->sz_device = kzalloc(PIPENAMELEN + 1, GFP_KERNEL);
@@ -1048,13 +1048,13 @@ int node_connect(struct node_object *hNode1, u32 uStream1,
status = -ENOMEM;
func_cont2:
if (DSP_SUCCEEDED(status)) {
- if (hNode1 == (struct node_object *)DSP_HGPPNODE) {
- hNode2->inputs[uStream2].type = HOSTCONNECT;
- hNode2->inputs[uStream2].dev_id = chnl_id;
+ if (node1 == (struct node_object *)DSP_HGPPNODE) {
+ node2->inputs[uStream2].type = HOSTCONNECT;
+ node2->inputs[uStream2].dev_id = chnl_id;
input->sz_device = pstr_dev_name;
} else {
- hNode1->outputs[uStream1].type = HOSTCONNECT;
- hNode1->outputs[uStream1].dev_id = chnl_id;
+ node1->outputs[uStream1].type = HOSTCONNECT;
+ node1->outputs[uStream1].dev_id = chnl_id;
output->sz_device = pstr_dev_name;
}
sprintf(pstr_dev_name, "%s%d", HOSTPREFIX, chnl_id);
@@ -1065,15 +1065,15 @@ func_cont2:
(node2_type == NODE_DEVICE))) {
if (node2_type == NODE_DEVICE) {
/* node1 == > device */
- dev_node_obj = hNode2;
- hnode = hNode1;
- pstream = &(hNode1->outputs[uStream1]);
+ dev_node_obj = node2;
+ hnode = node1;
+ pstream = &(node1->outputs[uStream1]);
pstrm_def = output;
} else {
/* device == > node2 */
- dev_node_obj = hNode1;
- hnode = hNode2;
- pstream = &(hNode2->inputs[uStream2]);
+ dev_node_obj = node1;
+ hnode = node2;
+ pstream = &(node2->inputs[uStream2]);
pstrm_def = input;
}
/* Set up create args */
@@ -1104,35 +1104,35 @@ func_cont2:
if (DSP_SUCCEEDED(status)) {
/* Fill in create args */
if (node1_type == NODE_TASK || node1_type == NODE_DAISSOCKET) {
- hNode1->create_args.asa.task_arg_obj.num_outputs++;
- fill_stream_def(hNode1, output, pattrs);
+ node1->create_args.asa.task_arg_obj.num_outputs++;
+ fill_stream_def(node1, output, pattrs);
}
if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
- hNode2->create_args.asa.task_arg_obj.num_inputs++;
- fill_stream_def(hNode2, input, pattrs);
+ node2->create_args.asa.task_arg_obj.num_inputs++;
+ fill_stream_def(node2, input, pattrs);
}
- /* Update hNode1 and hNode2 stream_connect */
+ /* Update node1 and node2 stream_connect */
if (node1_type != NODE_GPP && node1_type != NODE_DEVICE) {
- hNode1->num_outputs++;
- if (uStream1 > hNode1->max_output_index)
- hNode1->max_output_index = uStream1;
+ node1->num_outputs++;
+ if (uStream1 > node1->max_output_index)
+ node1->max_output_index = uStream1;

}
if (node2_type != NODE_GPP && node2_type != NODE_DEVICE) {
- hNode2->num_inputs++;
- if (uStream2 > hNode2->max_input_index)
- hNode2->max_input_index = uStream2;
+ node2->num_inputs++;
+ if (uStream2 > node2->max_input_index)
+ node2->max_input_index = uStream2;

}
- fill_stream_connect(hNode1, hNode2, uStream1, uStream2);
+ fill_stream_connect(node1, node2, uStream1, uStream2);
}
/* end of sync_enter_cs */
/* Exit critical section */
mutex_unlock(&hnode_mgr->node_mgr_lock);
func_end:
- dev_dbg(bridge, "%s: hNode1: %p uStream1: %d hNode2: %p uStream2: %d"
- "pattrs: %p status: 0x%x\n", __func__, hNode1,
- uStream1, hNode2, uStream2, pattrs, status);
+ dev_dbg(bridge, "%s: node1: %p uStream1: %d node2: %p uStream2: %d"
+ "pattrs: %p status: 0x%x\n", __func__, node1,
+ uStream1, node2, uStream2, pattrs, status);
return status;
}

@@ -2698,8 +2698,8 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)
* Purpose:
* Fills stream information.
*/
-static void fill_stream_connect(struct node_object *hNode1,
- struct node_object *hNode2,
+static void fill_stream_connect(struct node_object *node1,
+ struct node_object *node2,
u32 uStream1, u32 uStream2)
{
u32 strm_index;
@@ -2708,35 +2708,35 @@ static void fill_stream_connect(struct node_object *hNode1,
enum node_type node1_type = NODE_TASK;
enum node_type node2_type = NODE_TASK;

- node1_type = node_get_type(hNode1);
- node2_type = node_get_type(hNode2);
- if (hNode1 != (struct node_object *)DSP_HGPPNODE) {
+ node1_type = node_get_type(node1);
+ node2_type = node_get_type(node2);
+ if (node1 != (struct node_object *)DSP_HGPPNODE) {

if (node1_type != NODE_DEVICE) {
- strm_index = hNode1->num_inputs +
- hNode1->num_outputs - 1;
- strm1 = &(hNode1->stream_connect[strm_index]);
+ strm_index = node1->num_inputs +
+ node1->num_outputs - 1;
+ strm1 = &(node1->stream_connect[strm_index]);
strm1->cb_struct = sizeof(struct dsp_streamconnect);
strm1->this_node_stream_index = uStream1;
}

- if (hNode2 != (struct node_object *)DSP_HGPPNODE) {
+ if (node2 != (struct node_object *)DSP_HGPPNODE) {
/* NODE == > NODE */
if (node1_type != NODE_DEVICE) {
- strm1->connected_node = hNode2;
- strm1->ui_connected_node_id = hNode2->node_uuid;
+ strm1->connected_node = node2;
+ strm1->ui_connected_node_id = node2->node_uuid;
strm1->connected_node_stream_index = uStream2;
strm1->connect_type = CONNECTTYPE_NODEOUTPUT;
}
if (node2_type != NODE_DEVICE) {
- strm_index = hNode2->num_inputs +
- hNode2->num_outputs - 1;
- strm2 = &(hNode2->stream_connect[strm_index]);
+ strm_index = node2->num_inputs +
+ node2->num_outputs - 1;
+ strm2 = &(node2->stream_connect[strm_index]);
strm2->cb_struct =
sizeof(struct dsp_streamconnect);
strm2->this_node_stream_index = uStream2;
- strm2->connected_node = hNode1;
- strm2->ui_connected_node_id = hNode1->node_uuid;
+ strm2->connected_node = node1;
+ strm2->ui_connected_node_id = node1->node_uuid;
strm2->connected_node_stream_index = uStream1;
strm2->connect_type = CONNECTTYPE_NODEINPUT;
}
@@ -2744,9 +2744,9 @@ static void fill_stream_connect(struct node_object *hNode1,
strm1->connect_type = CONNECTTYPE_GPPOUTPUT;
} else {
/* GPP == > NODE */
- DBC_ASSERT(hNode2 != (struct node_object *)DSP_HGPPNODE);
- strm_index = hNode2->num_inputs + hNode2->num_outputs - 1;
- strm2 = &(hNode2->stream_connect[strm_index]);
+ DBC_ASSERT(node2 != (struct node_object *)DSP_HGPPNODE);
+ strm_index = node2->num_inputs + node2->num_outputs - 1;
+ strm2 = &(node2->stream_connect[strm_index]);
strm2->cb_struct = sizeof(struct dsp_streamconnect);
strm2->this_node_stream_index = uStream2;
strm2->connect_type = CONNECTTYPE_GPPINPUT;
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 818a050..ace3bc5 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -1886,10 +1886,10 @@ static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
* Purpose:
* Notify the processor the events.
*/
-int proc_notify_clients(void *hProc, u32 uEvents)
+int proc_notify_clients(void *proc, u32 uEvents)
{
int status = 0;
- struct proc_object *p_proc_object = (struct proc_object *)hProc;
+ struct proc_object *p_proc_object = (struct proc_object *)proc;

DBC_REQUIRE(p_proc_object);
DBC_REQUIRE(IS_VALID_PROC_EVENT(uEvents));
@@ -1910,10 +1910,10 @@ func_end:
* Notify the processor the events. This includes notifying all clients
* attached to a particulat DSP.
*/
-int proc_notify_all_clients(void *hProc, u32 uEvents)
+int proc_notify_all_clients(void *proc, u32 uEvents)
{
int status = 0;
- struct proc_object *p_proc_object = (struct proc_object *)hProc;
+ struct proc_object *p_proc_object = (struct proc_object *)proc;

DBC_REQUIRE(IS_VALID_PROC_EVENT(uEvents));
DBC_REQUIRE(refs > 0);
@@ -1934,10 +1934,10 @@ func_end:
* Purpose:
* Retrieves the processor ID.
*/
-int proc_get_processor_id(void *hProc, u32 * procID)
+int proc_get_processor_id(void *proc, u32 * procID)
{
int status = 0;
- struct proc_object *p_proc_object = (struct proc_object *)hProc;
+ struct proc_object *p_proc_object = (struct proc_object *)proc;

if (p_proc_object)
*procID = p_proc_object->processor_id;
--
1.6.3.3

2010-07-08 23:13:00

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 16/16] staging:ti dspbridge: make variables in prototypes match within functions definitions.

This patch renames the variables in the parameter lists and in the function
definitions to make them match.

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 2 +-
drivers/staging/tidspbridge/core/io_sm.c | 20 +++---
drivers/staging/tidspbridge/core/tiomap3430.c | 18 +++---
drivers/staging/tidspbridge/core/tiomap_io.c | 8 +-
drivers/staging/tidspbridge/core/tiomap_io.h | 2 +-
drivers/staging/tidspbridge/dynload/reloc.c | 4 +-
drivers/staging/tidspbridge/hw/hw_mmu.h | 2 +-
.../staging/tidspbridge/include/dspbridge/cmm.h | 2 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 12 ++--
.../staging/tidspbridge/include/dspbridge/disp.h | 8 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 12 ++--
.../staging/tidspbridge/include/dspbridge/dspmsg.h | 2 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 4 +-
.../staging/tidspbridge/include/dspbridge/mgr.h | 2 +-
.../staging/tidspbridge/include/dspbridge/proc.h | 4 +-
.../include/dspbridge/resourcecleanup.h | 29 +++++----
.../staging/tidspbridge/include/dspbridge/rmm.h | 4 +-
drivers/staging/tidspbridge/pmgr/cmm.c | 12 ++--
drivers/staging/tidspbridge/pmgr/cod.c | 63 ++++++++++---------
drivers/staging/tidspbridge/pmgr/dbll.c | 33 +++++-----
drivers/staging/tidspbridge/pmgr/dmm.c | 4 +-
drivers/staging/tidspbridge/rmgr/drv.c | 20 +++---
drivers/staging/tidspbridge/rmgr/drv_interface.h | 7 +-
drivers/staging/tidspbridge/rmgr/dspdrv.c | 6 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 44 ++++++++------
drivers/staging/tidspbridge/rmgr/node.c | 18 +++---
drivers/staging/tidspbridge/rmgr/proc.c | 20 +++---
drivers/staging/tidspbridge/rmgr/rmm.c | 11 ++--
drivers/staging/tidspbridge/services/cfg.c | 6 +-
30 files changed, 196 insertions(+), 185 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index ac393b8..813ea35 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -75,7 +75,7 @@
/* ----------------------------------- Function Prototypes */
static struct lst_list *create_chirp_list(u32 chirps);

-static void free_chirp_list(struct lst_list *lst);
+static void free_chirp_list(struct lst_list *chirp_list);

static struct chnl_irp *make_new_chirp(void);

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index eb9a927..b30f973 100755
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -1013,7 +1013,7 @@ void io_mbox_msg(u32 msg)
* Request chanenel I/O from the DSP. Sets flags in shared memory, then
* interrupts the DSP.
*/
-void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
+void io_request_chnl(struct io_mgr *io_manager, struct chnl_object *pchnl,
u8 io_mode, OUT u16 *mbx_val)
{
struct chnl_mgr *chnl_mgr_obj;
@@ -1021,8 +1021,8 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,

if (!pchnl || !mbx_val)
goto func_end;
- chnl_mgr_obj = pio_mgr->hchnl_mgr;
- sm = pio_mgr->shared_mem;
+ chnl_mgr_obj = io_manager->hchnl_mgr;
+ sm = io_manager->shared_mem;
if (io_mode == IO_INPUT) {
/*
* Assertion fires if CHNL_AddIOReq() called on a stream
@@ -1031,7 +1031,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
DBC_ASSERT((pchnl->dw_state == CHNL_STATEREADY) ||
(pchnl->dw_state == CHNL_STATEEOS));
/* Indicate to the DSP we have a buffer available for input */
- IO_OR_VALUE(pio_mgr->hbridge_context, struct shm, sm,
+ IO_OR_VALUE(io_manager->hbridge_context, struct shm, sm,
host_free_mask, (1 << pchnl->chnl_id));
*mbx_val = MBX_PCPY_CLASS;
} else if (io_mode == IO_OUTPUT) {
@@ -1057,20 +1057,20 @@ func_end:
* ======== iosm_schedule ========
* Schedule DPC for IO.
*/
-void iosm_schedule(struct io_mgr *pio_mgr)
+void iosm_schedule(struct io_mgr *io_manager)
{
unsigned long flags;

- if (!pio_mgr)
+ if (!io_manager)
return;

/* Increment count of DPC's pending. */
- spin_lock_irqsave(&pio_mgr->dpc_lock, flags);
- pio_mgr->dpc_req++;
- spin_unlock_irqrestore(&pio_mgr->dpc_lock, flags);
+ spin_lock_irqsave(&io_manager->dpc_lock, flags);
+ io_manager->dpc_req++;
+ spin_unlock_irqrestore(&io_manager->dpc_lock, flags);

/* Schedule DPC */
- tasklet_schedule(&pio_mgr->dpc_tasklet);
+ tasklet_schedule(&io_manager->dpc_tasklet);
}

/*
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index b0e6e5d..179f966 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -76,17 +76,17 @@
#define MMU_GFLUSH 0x60

/* Forward Declarations: */
-static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
-static int bridge_brd_read(struct bridge_dev_context *dev_context,
+static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt);
+static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
u32 mem_type);
-static int bridge_brd_start(struct bridge_dev_context *dev_context,
+static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
u32 dsp_addr);
-static int bridge_brd_status(struct bridge_dev_context *dev_context,
+static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
int *board_state);
-static int bridge_brd_stop(struct bridge_dev_context *dev_context);
-static int bridge_brd_write(struct bridge_dev_context *dev_context,
+static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt);
+static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
u32 mem_type);
@@ -95,7 +95,7 @@ static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 dsp_dest_addr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 mem_type);
-static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
+static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
@@ -110,14 +110,14 @@ static int bridge_dev_create(OUT struct bridge_dev_context
IN struct cfg_hostres *config_param);
static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
u32 dw_cmd, IN OUT void *pargs);
-static int bridge_dev_destroy(struct bridge_dev_context *dev_context);
+static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt);
static u32 user_va2_pa(struct mm_struct *mm, u32 address);
static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
u32 va, u32 size,
struct hw_mmu_map_attrs_t *map_attrs);
static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
u32 size, struct hw_mmu_map_attrs_t *attrs);
-static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
+static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs);
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 27be5a3..45c2654 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -178,13 +178,13 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
* purpose:
* Copies buffers to the DSP internal/external memory.
*/
-int write_dsp_data(struct bridge_dev_context *dev_ctxt,
+int write_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
u32 mem_type)
{
u32 offset;
- u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr;
- struct cfg_hostres *resources = dev_ctxt->resources;
+ u32 dw_base_addr = dev_context->dw_dsp_base_addr;
+ struct cfg_hostres *resources = dev_context->resources;
int status = 0;
u32 base1, base2, base3;
base1 = OMAP_DSP_MEM1_SIZE;
@@ -194,7 +194,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
if (!resources)
return -EPERM;

- offset = dsp_addr - dev_ctxt->dw_dsp_start_add;
+ offset = dsp_addr - dev_context->dw_dsp_start_add;
if (offset < base1) {
dw_base_addr = MEM_LINEAR_ADDRESS(resources->dw_mem_base[2],
resources->dw_mem_length[2]);
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index 8f9d072..5a26ea0 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -47,7 +47,7 @@
* Reads it from DSP External memory. The external memory for the DSP
* is configured by the combination of DSP MMU and shm Memory manager in the CDB
*/
-extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
+extern int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 mem_type);

diff --git a/drivers/staging/tidspbridge/dynload/reloc.c b/drivers/staging/tidspbridge/dynload/reloc.c
index 316a38c..ec59777 100644
--- a/drivers/staging/tidspbridge/dynload/reloc.c
+++ b/drivers/staging/tidspbridge/dynload/reloc.c
@@ -162,7 +162,7 @@ static const u8 c60_scale[SCALE_MASK + 1] = {
* Performs the specified relocation operation
************************************************************************* */
void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
- struct reloc_record_t *rp, bool * tramps_genereted,
+ struct reloc_record_t *rp, bool *tramps_generated,
bool second_pass)
{
rvalue val, reloc_amt, orig_val = 0;
@@ -470,7 +470,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
dlthis->image_offset +
rp->vaddr);
} else
- *tramps_genereted = true;
+ *tramps_generated = true;
} else {
dload_error(dlthis, "Relocation value "
FMT_UI32 " overflows %d bits in %s"
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 6c715f8..de84116 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -95,7 +95,7 @@ extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
struct hw_mmu_map_attrs_t *map_attrs);

extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va,
- u32 page_size, u32 virtual_addr);
+ u32 virtual_addr, u32 page_size);

static inline u32 hw_mmu_pte_addr_l1(u32 l1_base, u32 va)
{
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 086ca25..24423cd 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -232,7 +232,7 @@ extern int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
s8 c_factor,
unsigned int dw_dsp_base,
u32 ul_dsp_size,
- u32 *sgmt_id, u32 gpp_base_ba);
+ u32 *sgmt_id, u32 gpp_base_va);

/*
* ======== cmm_un_register_gppsm_seg ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 3827646..abf3b38 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -91,7 +91,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* str_zl_file != NULL
* Ensures:
*/
-extern int cod_create(OUT struct cod_manager **manager,
+extern int cod_create(OUT struct cod_manager **mgr,
char *str_zl_file,
IN OPTIONAL CONST struct cod_attrs *attrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index 6eee276..5088097 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -25,16 +25,16 @@

extern bool symbols_reloaded;

-extern void dbll_close(struct dbll_library_obj *lib);
+extern void dbll_close(struct dbll_library_obj *zl_lib);
extern int dbll_create(struct dbll_tar_obj **target_obj,
struct dbll_attrs *pattrs);
extern void dbll_delete(struct dbll_tar_obj *target);
extern void dbll_exit(void);
-extern bool dbll_get_addr(struct dbll_library_obj *lib, char *name,
+extern bool dbll_get_addr(struct dbll_library_obj *zl_lib, char *name,
struct dbll_sym_val **sym_val);
extern void dbll_get_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
-extern bool dbll_get_c_addr(struct dbll_library_obj *lib, char *name,
+extern bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,
struct dbll_sym_val **sym_val);
extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
u32 *paddr, u32 *psize);
@@ -42,15 +42,15 @@ extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
struct dbll_attrs *attrs, u32 * entry);
-extern int dbll_load_sect(struct dbll_library_obj *lib,
+extern int dbll_load_sect(struct dbll_library_obj *zl_lib,
char *sec_name, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
dbll_flags flags,
struct dbll_library_obj **lib_obj);
extern int dbll_read_sect(struct dbll_library_obj *lib,
- char *name, char *pbuf, u32 size);
+ char *name, char *buf, u32 size);
extern void dbll_set_attrs(struct dbll_tar_obj *target,
- struct dbll_attrs *pattrs);
+ struct dbll_attrs *pattrs);
extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
extern int dbll_unload_sect(struct dbll_library_obj *lib,
char *sec_name, struct dbll_attrs *attrs);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 9f694a4..77fc92e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -115,7 +115,7 @@ extern bool disp_init(void);
extern int disp_node_change_priority(struct disp_object
*disp_obj,
struct node_object *hnode,
- u32 ul_fxn_addr,
+ u32 rms_fxn,
nodeenv node_env, s32 prio);

/*
@@ -145,7 +145,7 @@ extern int disp_node_change_priority(struct disp_object
*/
extern int disp_node_create(struct disp_object *disp_obj,
struct node_object *hnode,
- u32 ul_fxn_addr,
+ u32 rms_fxn,
u32 ul_create_fxn,
IN CONST struct node_createargs
*pargs, OUT nodeenv *node_env);
@@ -172,7 +172,7 @@ extern int disp_node_create(struct disp_object *disp_obj,
*/
extern int disp_node_delete(struct disp_object *disp_obj,
struct node_object *hnode,
- u32 ul_fxn_addr,
+ u32 rms_fxn,
u32 ul_delete_fxn, nodeenv node_env);

/*
@@ -198,7 +198,7 @@ extern int disp_node_delete(struct disp_object *disp_obj,
*/
extern int disp_node_run(struct disp_object *disp_obj,
struct node_object *hnode,
- u32 ul_fxn_addr,
+ u32 rms_fxn,
u32 ul_execute_fxn, nodeenv node_env);

#endif /* DISP_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 77674f0..25d551a 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -213,7 +213,7 @@ extern int drv_create(struct drv_object **drv_obj);
* and destroy the DRV object
* Called upon driver unLoading.or unsuccesful loading of the driver.
* Parameters:
- * hdrv_obj: Handle to Driver object .
+ * driver_obj: Handle to Driver object .
* Returns:
* 0: Success.
* -EPERM: Failed to destroy DRV Object
@@ -227,7 +227,7 @@ extern int drv_create(struct drv_object **drv_obj);
* DRV handle.
* - Registry is updated with "0" as the DRV Object.
*/
-extern int drv_destroy(struct drv_object *hdrv_obj);
+extern int drv_destroy(struct drv_object *driver_obj);

/*
* ======== drv_exit ========
@@ -341,7 +341,7 @@ extern int drv_init(void);
* Purpose:
* Insert a DeviceObject into the list of Driver object.
* Parameters:
- * hdrv_obj: Handle to DrvObject
+ * driver_obj: Handle to DrvObject
* hdev_obj: Handle to DeviceObject to insert.
* Returns:
* 0: If successful.
@@ -352,7 +352,7 @@ extern int drv_init(void);
* Ensures:
* 0: Device Object is inserted and the List is not empty.
*/
-extern int drv_insert_dev_object(struct drv_object *hdrv_obj,
+extern int drv_insert_dev_object(struct drv_object *driver_obj,
struct dev_object *hdev_obj);

/*
@@ -361,7 +361,7 @@ extern int drv_insert_dev_object(struct drv_object *hdrv_obj,
* Search for and remove a Device object from the given list of Device Obj
* objects.
* Parameters:
- * hdrv_obj: Handle to DrvObject
+ * driver_obj: Handle to DrvObject
* hdev_obj: Handle to DevObject to Remove
* Returns:
* 0: Success.
@@ -373,7 +373,7 @@ extern int drv_insert_dev_object(struct drv_object *hdrv_obj,
* Ensures:
* List either does not exist (NULL), or is not empty if it does exist.
*/
-extern int drv_remove_dev_object(struct drv_object *hdrv_obj,
+extern int drv_remove_dev_object(struct drv_object *driver_obj,
struct dev_object *hdev_obj);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
index a40b0ff..6a6c4bf 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
@@ -32,7 +32,7 @@ extern int bridge_msg_create(OUT struct msg_mgr **msg_man,

extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
OUT struct msg_queue **msgq,
- u32 msgq_id, u32 max_msgs, void *h);
+ u32 msgq_id, u32 max_msgs, void *arg);

extern void bridge_msg_delete(struct msg_mgr *hmsg_mgr);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index bdff9fb..440da7b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -114,7 +114,7 @@ void io_mbox_msg(u32 msg);
* pchnl != NULL
* Ensures:
*/
-extern void io_request_chnl(struct io_mgr *hio_mgr,
+extern void io_request_chnl(struct io_mgr *io_manager,
struct chnl_object *pchnl,
u8 io_mode, OUT u16 *mbx_val);

@@ -129,7 +129,7 @@ extern void io_request_chnl(struct io_mgr *hio_mgr,
* pchnl != NULL
* Ensures:
*/
-extern void iosm_schedule(struct io_mgr *hio_mgr);
+extern void iosm_schedule(struct io_mgr *io_manager);

/*
* DSP-DMA IO functions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
index b90457b..1191330 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
@@ -66,7 +66,7 @@ int mgr_wait_for_bridge_events(struct dsp_notification
* Details:
* DCD Dll is loaded and MGR Object stores the handle of the DLL.
*/
-extern int mgr_create(OUT struct mgr_object **hmgr_obj,
+extern int mgr_create(OUT struct mgr_object **mgr_obj,
struct cfg_devnode *dev_node_obj);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index e7a9510..f91f11f 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -99,7 +99,7 @@ extern int proc_auto_start(struct cfg_devnode *dev_node_obj,
* This function Calls bridge_dev_ctrl.
*/
extern int proc_ctrl(void *hprocessor,
- u32 dw_cmd, IN struct dsp_cbdata *pargs);
+ u32 dw_cmd, IN struct dsp_cbdata *arg);

/*
* ======== proc_detach ========
@@ -278,7 +278,7 @@ extern int proc_get_state(void *hprocessor, OUT struct dsp_processorstate
* Ensures:
* Details:
*/
-extern int proc_get_processor_id(void *hprocessor, u32 * proc_id);
+extern int proc_get_processor_id(void *proc, u32 * proc_id);

/*
* ======== proc_get_trace ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
index 48aebff..4e1b8a2 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
@@ -23,41 +23,42 @@ extern int drv_get_proc_ctxt_list(struct process_context **pctxt,
extern int drv_insert_proc_context(struct drv_object *driver_obj,
void *process_ctxt);

-extern int drv_remove_all_dmm_res_elements(void *ctxt);
+extern int drv_remove_all_dmm_res_elements(void *process_ctxt);

-extern int drv_remove_all_node_res_elements(void *ctxt);
+extern int drv_remove_all_node_res_elements(void *process_ctxt);

extern int drv_proc_set_pid(void *ctxt, s32 process);

-extern int drv_remove_all_resources(void *pctxt);
+extern int drv_remove_all_resources(void *process_ctxt);

extern int drv_remove_proc_context(struct drv_object *driver_obj,
void *pr_ctxt);

-extern int drv_get_node_res_element(void *hnode, void *node_res,
- void *ctxt);
+extern int drv_get_node_res_element(void *hnode, void *node_resource,
+ void *process_ctx);

-extern int drv_insert_node_res_element(void *hnode, void *node_res,
- void *ctxt);
+extern int drv_insert_node_res_element(void *hnode, void *node_resource,
+ void *process_ctxt);

extern void drv_proc_node_update_heap_status(void *node_resource, s32 status);

-extern int drv_remove_node_res_element(void *node_res, void *status);
+extern int drv_remove_node_res_element(void *node_resource,
+ void *process_ctxt);

extern void drv_proc_node_update_status(void *node_resource, s32 status);

-extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_res);
+extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_resources);

extern int drv_proc_insert_strm_res_element(void *stream_obj,
void *strm_res,
- void *pctxt);
+ void *process_ctxt);

-extern int drv_get_strm_res_element(void *stream_obj, void *strm_res,
- void *ctxt);
+extern int drv_get_strm_res_element(void *stream_obj, void *strm_resources,
+ void *process_ctxt);

extern int drv_proc_remove_strm_res_element(void *strm_res,
- void *ctxt);
+ void *process_ctxt);

-extern int drv_remove_all_strm_res_elements(void *ctxt);
+extern int drv_remove_all_strm_res_elements(void *process_ctxt);

extern enum node_state node_get_state(void *hnode);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/rmm.h b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
index f6b78d7..baea536 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/rmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
@@ -74,7 +74,7 @@ struct rmm_target_obj;
* Ensures:
*/
extern int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
- u32 align, u32 *dsp_adr, bool reserve);
+ u32 align, u32 *dsp_address, bool reserve);

/*
* ======== rmm_create ========
@@ -144,7 +144,7 @@ extern void rmm_exit(void);
* reserve || [dsp_address, dsp_address + size] is a valid memory range.
* Ensures:
*/
-extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_address,
+extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr,
u32 size, bool reserved);

/*
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index d054e53..4861c51 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -149,7 +149,7 @@ static struct cmm_mnode *get_free_block(struct cmm_allocator *allocator,
static struct cmm_mnode *get_node(struct cmm_object *cmm_mgr_obj, u32 dw_pa,
u32 dw_va, u32 ul_size);
/* get available slot for new allocator */
-static s32 get_slot(struct cmm_object *hcmm_mgr);
+static s32 get_slot(struct cmm_object *cmm_mgr_obj);
static void un_register_gppsm_seg(struct cmm_allocator *psma);

/*
@@ -540,7 +540,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
u32 dw_gpp_base_pa, u32 ul_size,
u32 dsp_addr_offset, s8 c_factor,
u32 dw_dsp_base, u32 ul_dsp_size,
- u32 *sgmt_id, u32 dw_gpp_base_va)
+ u32 *sgmt_id, u32 gpp_base_va)
{
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
struct cmm_allocator *psma = NULL;
@@ -551,13 +551,13 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
DBC_REQUIRE(ul_size > 0);
DBC_REQUIRE(sgmt_id != NULL);
DBC_REQUIRE(dw_gpp_base_pa != 0);
- DBC_REQUIRE(dw_gpp_base_va != 0);
+ DBC_REQUIRE(gpp_base_va != 0);
DBC_REQUIRE((c_factor <= CMM_ADDTODSPPA) &&
(c_factor >= CMM_SUBFROMDSPPA));
dev_dbg(bridge, "%s: dw_gpp_base_pa %x ul_size %x dsp_addr_offset %x "
- "dw_dsp_base %x ul_dsp_size %x dw_gpp_base_va %x\n", __func__,
+ "dw_dsp_base %x ul_dsp_size %x gpp_base_va %x\n", __func__,
dw_gpp_base_pa, ul_size, dsp_addr_offset, dw_dsp_base,
- ul_dsp_size, dw_gpp_base_va);
+ ul_dsp_size, gpp_base_va);
if (!hcmm_mgr) {
status = -EFAULT;
return status;
@@ -585,7 +585,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
psma->hcmm_mgr = hcmm_mgr; /* ref to parent */
psma->shm_base = dw_gpp_base_pa; /* SM Base phys */
psma->ul_sm_size = ul_size; /* SM segment size in bytes */
- psma->dw_vm_base = dw_gpp_base_va;
+ psma->dw_vm_base = gpp_base_va;
psma->dw_dsp_phys_addr_offset = dsp_addr_offset;
psma->c_factor = c_factor;
psma->dw_dsp_base = dw_dsp_base;
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index d9501eb..21aad31 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -215,7 +215,7 @@ void cod_close(struct cod_libraryobj *lib)
* dynamically loaded object files.
*
*/
-int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file,
+int cod_create(OUT struct cod_manager **mgr, char *str_zl_file,
IN OPTIONAL CONST struct cod_attrs *attrs)
{
struct cod_manager *mgr_new;
@@ -281,23 +281,24 @@ int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file,
* Purpose:
* Delete a code manager object.
*/
-void cod_delete(struct cod_manager *hmgr)
+void cod_delete(struct cod_manager *cod_mgr_obj)
{
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(IS_VALID(hmgr));
+ DBC_REQUIRE(IS_VALID(cod_mgr_obj));

- if (hmgr->base_lib) {
- if (hmgr->loaded)
- hmgr->fxns.unload_fxn(hmgr->base_lib, &hmgr->attrs);
+ if (cod_mgr_obj->base_lib) {
+ if (cod_mgr_obj->loaded)
+ cod_mgr_obj->fxns.unload_fxn(cod_mgr_obj->base_lib,
+ &cod_mgr_obj->attrs);

- hmgr->fxns.close_fxn(hmgr->base_lib);
+ cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);
}
- if (hmgr->target) {
- hmgr->fxns.delete_fxn(hmgr->target);
- hmgr->fxns.exit_fxn();
+ if (cod_mgr_obj->target) {
+ cod_mgr_obj->fxns.delete_fxn(cod_mgr_obj->target);
+ cod_mgr_obj->fxns.exit_fxn();
}
- hmgr->ul_magic = ~MAGIC;
- kfree(hmgr);
+ cod_mgr_obj->ul_magic = ~MAGIC;
+ kfree(cod_mgr_obj);
}

/*
@@ -432,23 +433,24 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
* C symbol.
*
*/
-int cod_get_sym_value(struct cod_manager *hmgr, char *str_sym,
+int cod_get_sym_value(struct cod_manager *cod_mgr_obj, char *str_sym,
u32 *pul_value)
{
struct dbll_sym_val *dbll_sym;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(IS_VALID(hmgr));
+ DBC_REQUIRE(IS_VALID(cod_mgr_obj));
DBC_REQUIRE(str_sym != NULL);
DBC_REQUIRE(pul_value != NULL);

- dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n",
- __func__, hmgr, str_sym, pul_value);
- if (hmgr->base_lib) {
- if (!hmgr->fxns.
- get_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) {
- if (!hmgr->fxns.
- get_c_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym))
+ dev_dbg(bridge, "%s: cod_mgr_obj: %p str_sym: %s pul_value: %p\n",
+ __func__, cod_mgr_obj, str_sym, pul_value);
+ if (cod_mgr_obj->base_lib) {
+ if (!cod_mgr_obj->fxns.
+ get_addr_fxn(cod_mgr_obj->base_lib, str_sym, &dbll_sym)) {
+ if (!cod_mgr_obj->fxns.
+ get_c_addr_fxn(cod_mgr_obj->base_lib, str_sym,
+ &dbll_sym))
return -ESPIPE;
}
} else {
@@ -492,7 +494,7 @@ bool cod_init(void)
* recalculated to reflect this. In this way, we can support NULL
* terminating args arrays, if num_argc is very large.
*/
-int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
+int cod_load_base(struct cod_manager *cod_mgr_obj, u32 num_argc, char *args[],
cod_writefxn pfn_write, void *arb, char *envp[])
{
dbll_flags flags;
@@ -502,12 +504,12 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
u32 i;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(IS_VALID(hmgr));
+ DBC_REQUIRE(IS_VALID(cod_mgr_obj));
DBC_REQUIRE(num_argc > 0);
DBC_REQUIRE(args != NULL);
DBC_REQUIRE(args[0] != NULL);
DBC_REQUIRE(pfn_write != NULL);
- DBC_REQUIRE(hmgr->base_lib != NULL);
+ DBC_REQUIRE(cod_mgr_obj->base_lib != NULL);

/*
* Make sure every argv[] stated in argc has a value, or change argc to
@@ -521,7 +523,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
}

/* set the write function for this operation */
- hmgr->fxns.get_attrs_fxn(hmgr->target, &save_attrs);
+ cod_mgr_obj->fxns.get_attrs_fxn(cod_mgr_obj->target, &save_attrs);

new_attrs = save_attrs;
new_attrs.write = (dbll_write_fxn) pfn_write;
@@ -533,15 +535,16 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],

/* Load the image */
flags = DBLL_CODE | DBLL_DATA | DBLL_SYMB;
- status = hmgr->fxns.load_fxn(hmgr->base_lib, flags, &new_attrs,
- &hmgr->ul_entry);
+ status = cod_mgr_obj->fxns.load_fxn(cod_mgr_obj->base_lib, flags,
+ &new_attrs,
+ &cod_mgr_obj->ul_entry);
if (DSP_FAILED(status))
- hmgr->fxns.close_fxn(hmgr->base_lib);
+ cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);

if (DSP_SUCCEEDED(status))
- hmgr->loaded = true;
+ cod_mgr_obj->loaded = true;
else
- hmgr->base_lib = NULL;
+ cod_mgr_obj->base_lib = NULL;

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 2d1b9d3..559eaf6 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -140,7 +140,8 @@ struct dbll_symbol {
static void dof_close(struct dbll_library_obj *zl_lib);
static int dof_open(struct dbll_library_obj *zl_lib);
static s32 no_op(struct dynamic_loader_initialize *thisptr, void *bufr,
- ldr_addr locn, struct ldr_section_info *info, unsigned bytsiz);
+ ldr_addr locn, struct ldr_section_info *info,
+ unsigned bytsize);

/*
* Functions called by dynamic loader
@@ -176,20 +177,20 @@ static void rmm_dealloc(struct dynamic_loader_allocate *this,
static int connect(struct dynamic_loader_initialize *this);
static int read_mem(struct dynamic_loader_initialize *this, void *buf,
ldr_addr addr, struct ldr_section_info *info,
- unsigned nbytes);
+ unsigned bytes);
static int write_mem(struct dynamic_loader_initialize *this, void *buf,
ldr_addr addr, struct ldr_section_info *info,
unsigned nbytes);
static int fill_mem(struct dynamic_loader_initialize *this, ldr_addr addr,
- struct ldr_section_info *info, unsigned nbytes,
+ struct ldr_section_info *info, unsigned bytes,
unsigned val);
static int execute(struct dynamic_loader_initialize *this, ldr_addr start);
static void release(struct dynamic_loader_initialize *this);

/* symbol table hash functions */
-static u16 name_hash(void *name, u16 max_bucket);
-static bool name_match(void *name, void *sp);
-static void sym_delete(void *sp);
+static u16 name_hash(void *key, u16 max_bucket);
+static bool name_match(void *key, void *sp);
+static void sym_delete(void *value);

static u32 refs; /* module reference count */

@@ -728,7 +729,7 @@ func_cont:
* Get the content of a COFF section.
*/
int dbll_read_sect(struct dbll_library_obj *lib, char *name,
- char *content, u32 size)
+ char *buf, u32 size)
{
struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib;
bool opened_doff = false;
@@ -740,7 +741,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
DBC_REQUIRE(name != NULL);
- DBC_REQUIRE(content != NULL);
+ DBC_REQUIRE(buf != NULL);
DBC_REQUIRE(size != 0);

/* If DOFF file is not open, we open it. */
@@ -768,7 +769,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
}
/*
* Ensure the supplied buffer size is sufficient to store
- * the section content to be read.
+ * the section buf to be read.
*/
ul_sect_size = sect->size * byte_size;
/* Make sure size is even for good swap */
@@ -780,7 +781,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
if (ul_sect_size > size) {
status = -EPERM;
} else {
- if (!dload_get_section(zl_lib->desc, sect, content))
+ if (!dload_get_section(zl_lib->desc, sect, buf))
status = -EBADF;

}
@@ -790,8 +791,8 @@ func_cont:
opened_doff = false;
}

- dev_dbg(bridge, "%s: lib: %p name: %s content: %p size: 0x%x, "
- "status 0x%x\n", __func__, lib, name, content, size, status);
+ dev_dbg(bridge, "%s: lib: %p name: %s buf: %p size: 0x%x, "
+ "status 0x%x\n", __func__, lib, name, buf, size, status);
return status;
}

@@ -935,13 +936,13 @@ static u16 name_hash(void *key, u16 max_bucket)
/*
* ======== name_match ========
*/
-static bool name_match(void *key, void *value)
+static bool name_match(void *key, void *sp)
{
DBC_REQUIRE(key != NULL);
- DBC_REQUIRE(value != NULL);
+ DBC_REQUIRE(sp != NULL);

- if ((key != NULL) && (value != NULL)) {
- if (strcmp((char *)key, ((struct dbll_symbol *)value)->name) ==
+ if ((key != NULL) && (sp != NULL)) {
+ if (strcmp((char *)key, ((struct dbll_symbol *)sp)->name) ==
0)
return true;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c
index c661e58..c4d6cbc 100644
--- a/drivers/staging/tidspbridge/pmgr/dmm.c
+++ b/drivers/staging/tidspbridge/pmgr/dmm.c
@@ -405,14 +405,14 @@ int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)
* Purpose:
* Returns a region containing the specified memory region
*/
-static struct map_page *get_region(u32 addrs)
+static struct map_page *get_region(u32 addr)
{
struct map_page *curr_region = NULL;
u32 i = 0;

if (virtual_mapping_table != NULL) {
/* find page mapped by this address */
- i = DMM_ADDR_TO_INDEX(addrs);
+ i = DMM_ADDR_TO_INDEX(addr);
if (i < table_size)
curr_region = virtual_mapping_table + i;
}
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index bef52bc..e944d24 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -269,11 +269,11 @@ int drv_get_node_res_element(void *hnode, void *node_resource,
/* Allocate the STRM resource element
* This is called after the actual resource is allocated
*/
-int drv_proc_insert_strm_res_element(void *stream_handle,
- void *hstrm_res, void *process_ctxt)
+int drv_proc_insert_strm_res_element(void *stream_obj,
+ void *strm_res, void *process_ctxt)
{
struct strm_res_object **pstrm_res =
- (struct strm_res_object **)hstrm_res;
+ (struct strm_res_object **)strm_res;
struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct strm_res_object *temp_strm_res = NULL;
@@ -287,7 +287,7 @@ int drv_proc_insert_strm_res_element(void *stream_handle,
kfree(*pstrm_res);
return -EPERM;
}
- (*pstrm_res)->hstream = stream_handle;
+ (*pstrm_res)->hstream = stream_obj;
if (ctxt->pstrm_list != NULL) {
temp_strm_res = ctxt->pstrm_list;
while (temp_strm_res->next != NULL)
@@ -305,9 +305,9 @@ int drv_proc_insert_strm_res_element(void *stream_handle,
/* Release Stream resource element context
* This function called after the actual resource is freed
*/
-int drv_proc_remove_strm_res_element(void *hstrm_res, void *process_ctxt)
+int drv_proc_remove_strm_res_element(void *strm_res, void *process_ctxt)
{
- struct strm_res_object *pstrm_res = (struct strm_res_object *)hstrm_res;
+ struct strm_res_object *pstrm_res = (struct strm_res_object *)strm_res;
struct process_context *ctxt = (struct process_context *)process_ctxt;
struct strm_res_object *temp_strm_res;
int status = 0;
@@ -375,11 +375,11 @@ int drv_remove_all_strm_res_elements(void *process_ctxt)
}

/* Getting the stream resource element */
-int drv_get_strm_res_element(void *stream_obj, void *hstrm_res,
+int drv_get_strm_res_element(void *stream_obj, void *strm_resources,
void *process_ctxt)
{
struct strm_res_object **strm_res =
- (struct strm_res_object **)hstrm_res;
+ (struct strm_res_object **)strm_resources;
struct process_context *ctxt = (struct process_context *)process_ctxt;
int status = 0;
struct strm_res_object *temp_strm2 = NULL;
@@ -405,11 +405,11 @@ int drv_get_strm_res_element(void *stream_obj, void *hstrm_res,
}

/* Updating the stream resource element */
-int drv_proc_update_strm_res(u32 num_bufs, void *hstrm_res)
+int drv_proc_update_strm_res(u32 num_bufs, void *strm_resources)
{
int status = 0;
struct strm_res_object **strm_res =
- (struct strm_res_object **)hstrm_res;
+ (struct strm_res_object **)strm_resources;

(*strm_res)->num_bufs = num_bufs;
return status;
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.h b/drivers/staging/tidspbridge/rmgr/drv_interface.h
index fd6f489..ab07060 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.h
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.h
@@ -20,8 +20,9 @@
/* Prototypes for all functions in this bridge */
static int __init bridge_init(void); /* Initialize bridge */
static void __exit bridge_exit(void); /* Opposite of initialize */
-static int bridge_open(struct inode *, struct file *); /* Open */
-static int bridge_release(struct inode *, struct file *); /* Release */
-static long bridge_ioctl(struct file *, unsigned int, unsigned long);
+static int bridge_open(struct inode *ip, struct file *filp); /* Open */
+static int bridge_release(struct inode *ip, struct file *filp); /* Release */
+static long bridge_ioctl(struct file *filp, unsigned int code,
+ unsigned long args);
static int bridge_mmap(struct file *filp, struct vm_area_struct *vma);
#endif /* ifndef _DRV_INTERFACE_H_ */
diff --git a/drivers/staging/tidspbridge/rmgr/dspdrv.c b/drivers/staging/tidspbridge/rmgr/dspdrv.c
index 19a7471..8a28248 100644
--- a/drivers/staging/tidspbridge/rmgr/dspdrv.c
+++ b/drivers/staging/tidspbridge/rmgr/dspdrv.c
@@ -116,7 +116,7 @@ func_cont:
* ======== dsp_deinit ========
* Frees the resources allocated for bridge.
*/
-bool dsp_deinit(u32 device_ctxt)
+bool dsp_deinit(u32 device_context)
{
bool ret = true;
u32 device_node;
@@ -126,10 +126,10 @@ bool dsp_deinit(u32 device_ctxt)
(void)dev_remove_device((struct cfg_devnode *)device_node);

(void)drv_release_resources((u32) device_node,
- (struct drv_object *)device_ctxt);
+ (struct drv_object *)device_context);
}

- (void)drv_destroy((struct drv_object *)device_ctxt);
+ (void)drv_destroy((struct drv_object *)device_context);

/* Get the Manager Object from Registry
* MGR Destroy will unload the DCD dll */
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 2ee7aad..da3c4b0 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -304,7 +304,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase, u16 depth);
static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
-static int remote_alloc(void **ref, u16 mem_sect_type, u32 size,
+static int remote_alloc(void **ref, u16 mem_sect, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmnt_id,
OPTIONAL s32 req, bool reserve);
@@ -1161,7 +1161,7 @@ static void free_sects(struct nldr_object *nldr_obj,
* libraries.
*/
static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
- char *name, struct dbll_sym_val **sym)
+ char *sym_name, struct dbll_sym_val **sym)
{
struct nldr_object *nldr_obj = (struct nldr_object *)handle;
struct nldr_nodeobject *nldr_node_obj =
@@ -1171,11 +1171,12 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
bool status = false;

/* check the base image */
- status = nldr_obj->ldr_fxns.get_addr_fxn(nldr_obj->base_lib, name, sym);
+ status = nldr_obj->ldr_fxns.get_addr_fxn(nldr_obj->base_lib,
+ sym_name, sym);
if (!status)
status =
- nldr_obj->ldr_fxns.get_c_addr_fxn(nldr_obj->base_lib, name,
- sym);
+ nldr_obj->ldr_fxns.get_c_addr_fxn(nldr_obj->base_lib,
+ sym_name, sym);

/*
* Check in root lib itself. If the library consists of
@@ -1183,11 +1184,12 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
* library may need to be resolved.
*/
if (!status) {
- status = nldr_obj->ldr_fxns.get_addr_fxn(root->lib, name, sym);
+ status = nldr_obj->ldr_fxns.get_addr_fxn(root->lib, sym_name,
+ sym);
if (!status) {
status =
- nldr_obj->ldr_fxns.get_c_addr_fxn(root->lib, name,
- sym);
+ nldr_obj->ldr_fxns.get_c_addr_fxn(root->lib,
+ sym_name, sym);
}
}

@@ -1198,13 +1200,15 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
if (!status) {
for (i = 0; i < root->dep_libs; i++) {
status =
- nldr_obj->ldr_fxns.get_addr_fxn(root->dep_libs_tree
- [i].lib, name, sym);
+ nldr_obj->ldr_fxns.get_addr_fxn(root->
+ dep_libs_tree
+ [i].lib,
+ sym_name, sym);
if (!status) {
status =
nldr_obj->ldr_fxns.
get_c_addr_fxn(root->dep_libs_tree[i].lib,
- name, sym);
+ sym_name, sym);
}
if (status) {
/* Symbol found */
@@ -1220,11 +1224,11 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
status =
nldr_obj->ldr_fxns.
get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib,
- name, sym);
+ sym_name, sym);
if (!status) {
status = nldr_obj->ldr_fxns.get_c_addr_fxn
- (nldr_node_obj->pers_lib_table[i].lib, name,
- sym);
+ (nldr_node_obj->pers_lib_table[i].lib,
+ sym_name, sym);
}
if (status) {
/* Symbol found */
@@ -1623,7 +1627,7 @@ func_end:
/*
* ======== remote_alloc ========
*/
-static int remote_alloc(void **ref, u16 space, u32 size,
+static int remote_alloc(void **ref, u16 mem_sect, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmnt_id, OPTIONAL s32 req,
bool reserve)
@@ -1640,8 +1644,8 @@ static int remote_alloc(void **ref, u16 space, u32 size,
bool mem_load_req = false;
int status = -ENOMEM; /* Set to fail */
DBC_REQUIRE(hnode);
- DBC_REQUIRE(space == DBLL_CODE || space == DBLL_DATA ||
- space == DBLL_BSS);
+ DBC_REQUIRE(mem_sect == DBLL_CODE || mem_sect == DBLL_DATA ||
+ mem_sect == DBLL_BSS);
nldr_obj = hnode->nldr_obj;
rmm = nldr_obj->rmm;
/* Convert size to DSP words */
@@ -1670,7 +1674,7 @@ static int remote_alloc(void **ref, u16 space, u32 size,
DBC_ASSERT(false);
break;
}
- if (space == DBLL_CODE)
+ if (mem_sect == DBLL_CODE)
mem_phase_bit++;

if (mem_phase_bit < MAXFLAGS)
@@ -1681,9 +1685,9 @@ static int remote_alloc(void **ref, u16 space, u32 size,
mem_load_req = true;

}
- mem_sect_type = (space == DBLL_CODE) ? DYNM_CODE : DYNM_DATA;
+ mem_sect_type = (mem_sect == DBLL_CODE) ? DYNM_CODE : DYNM_DATA;

- /* Find an appropriate segment based on space */
+ /* Find an appropriate segment based on mem_sect */
if (segid == NULLID) {
/* No memory requirements of preferences */
DBC_ASSERT(!mem_load_req);
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 3271c1a..b6672a3 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -1802,7 +1802,7 @@ int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
* Retrieve a message from a node on the DSP.
*/
int node_get_message(struct node_object *hnode,
- OUT struct dsp_msg *pmsg, u32 utimeout)
+ OUT struct dsp_msg *message, u32 utimeout)
{
struct node_mgr *hnode_mgr;
enum node_type node_type;
@@ -1813,7 +1813,7 @@ int node_get_message(struct node_object *hnode,
struct proc_object *hprocessor;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pmsg != NULL);
+ DBC_REQUIRE(message != NULL);

if (!hnode) {
status = -EFAULT;
@@ -1844,14 +1844,14 @@ int node_get_message(struct node_object *hnode,
* available. */
intf_fxns = hnode_mgr->intf_fxns;
status =
- (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, pmsg, utimeout);
+ (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, message, utimeout);
/* Check if message contains SM descriptor */
- if (DSP_FAILED(status) || !(pmsg->dw_cmd & DSP_RMSBUFDESC))
+ if (DSP_FAILED(status) || !(message->dw_cmd & DSP_RMSBUFDESC))
goto func_end;

/* Translate DSP byte addr to GPP Va. */
tmp_buf = cmm_xlator_translate(hnode->xlator,
- (void *)(pmsg->dw_arg1 *
+ (void *)(message->dw_arg1 *
hnode->hnode_mgr->
udsp_word_size), CMM_DSPPA2PA);
if (tmp_buf != NULL) {
@@ -1860,8 +1860,8 @@ int node_get_message(struct node_object *hnode,
CMM_PA2VA);
if (tmp_buf != NULL) {
/* Adjust SM size in msg */
- pmsg->dw_arg1 = (u32) tmp_buf;
- pmsg->dw_arg2 *= hnode->hnode_mgr->udsp_word_size;
+ message->dw_arg1 = (u32) tmp_buf;
+ message->dw_arg2 *= hnode->hnode_mgr->udsp_word_size;
} else {
status = -ESRCH;
}
@@ -1869,8 +1869,8 @@ int node_get_message(struct node_object *hnode,
status = -ESRCH;
}
func_end:
- dev_dbg(bridge, "%s: hnode: %p pmsg: %p utimeout: 0x%x\n", __func__,
- hnode, pmsg, utimeout);
+ dev_dbg(bridge, "%s: hnode: %p message: %p utimeout: 0x%x\n", __func__,
+ hnode, message, utimeout);
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 3d345ea..64a6ddf 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -108,7 +108,7 @@ static u32 refs;
DEFINE_MUTEX(proc_lock); /* For critical sections */

/* ----------------------------------- Function Prototypes */
-static int proc_monitor(struct proc_object *hprocessor);
+static int proc_monitor(struct proc_object *proc_obj);
static s32 get_envp_count(char **envp);
static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
s32 cnew_envp, char *sz_var);
@@ -1801,32 +1801,32 @@ func_end:
* Ensures:
* Success: ProcObject state is PROC_IDLE
*/
-static int proc_monitor(struct proc_object *p_proc_object)
+static int proc_monitor(struct proc_object *proc_obj)
{
int status = -EPERM;
struct msg_mgr *hmsg_mgr;
int brd_state;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(p_proc_object);
+ DBC_REQUIRE(proc_obj);

/* This is needed only when Device is loaded when it is
* already 'ACTIVE' */
/* Destory the Node Manager, msg_ctrl Manager */
- if (DSP_SUCCEEDED(dev_destroy2(p_proc_object->hdev_obj))) {
+ if (DSP_SUCCEEDED(dev_destroy2(proc_obj->hdev_obj))) {
/* Destroy the msg_ctrl by calling msg_delete */
- dev_get_msg_mgr(p_proc_object->hdev_obj, &hmsg_mgr);
+ dev_get_msg_mgr(proc_obj->hdev_obj, &hmsg_mgr);
if (hmsg_mgr) {
msg_delete(hmsg_mgr);
- dev_set_msg_mgr(p_proc_object->hdev_obj, NULL);
+ dev_set_msg_mgr(proc_obj->hdev_obj, NULL);
}
}
/* Place the Board in the Monitor State */
- if (DSP_SUCCEEDED((*p_proc_object->intf_fxns->pfn_brd_monitor)
- (p_proc_object->hbridge_context))) {
+ if (DSP_SUCCEEDED((*proc_obj->intf_fxns->pfn_brd_monitor)
+ (proc_obj->hbridge_context))) {
status = 0;
- if (DSP_SUCCEEDED((*p_proc_object->intf_fxns->pfn_brd_status)
- (p_proc_object->hbridge_context, &brd_state)))
+ if (DSP_SUCCEEDED((*proc_obj->intf_fxns->pfn_brd_status)
+ (proc_obj->hbridge_context, &brd_state)))
DBC_ASSERT(brd_state == BRD_IDLE);
}

diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c
index 0354b0f..910132f 100644
--- a/drivers/staging/tidspbridge/rmgr/rmm.c
+++ b/drivers/staging/tidspbridge/rmgr/rmm.c
@@ -307,7 +307,7 @@ void rmm_exit(void)
/*
* ======== rmm_free ========
*/
-bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
+bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size,
bool reserved)
{
struct rmm_ovly_sect *sect;
@@ -316,8 +316,9 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
DBC_REQUIRE(target);

DBC_REQUIRE(reserved || segid < target->num_segs);
- DBC_REQUIRE(reserved || (addr >= target->seg_tab[segid].base &&
- (addr + size) <= (target->seg_tab[segid].base +
+ DBC_REQUIRE(reserved || (dsp_addr >= target->seg_tab[segid].base &&
+ (dsp_addr + size) <= (target->seg_tab[segid].
+ base +
target->seg_tab[segid].
length)));

@@ -325,7 +326,7 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
* Free or unreserve memory.
*/
if (!reserved) {
- ret = free_block(target, segid, addr, size);
+ ret = free_block(target, segid, dsp_addr, size);
if (ret)
target->seg_tab[segid].number--;

@@ -333,7 +334,7 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
/* Unreserve memory */
sect = (struct rmm_ovly_sect *)lst_first(target->ovly_list);
while (sect != NULL) {
- if (addr == sect->addr) {
+ if (dsp_addr == sect->addr) {
DBC_ASSERT(size == sect->size);
/* Remove from list */
lst_remove_elem(target->ovly_list,
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index ac23b09..86c8da4 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -111,7 +111,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
* Purpose:
* Retreive the default executable, if any, for this board.
*/
-int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
+int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 buf_size,
OUT char *str_exec_file)
{
int status = 0;
@@ -123,7 +123,7 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
else if (!str_exec_file || !drv_datap)
status = -EFAULT;

- if (strlen(drv_datap->base_img) > ul_buf_size)
+ if (strlen(drv_datap->base_img) > buf_size)
status = -EINVAL;

if (DSP_SUCCEEDED(status) && drv_datap->base_img)
@@ -132,7 +132,7 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
DBC_ENSURE(((status == 0) &&
- (strlen(str_exec_file) <= ul_buf_size))
+ (strlen(str_exec_file) <= buf_size))
|| (status != 0));
return status;
}
--
1.6.3.3

2010-07-08 23:15:05

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 06/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pdwSize to buff_size
pdwState to board_state
pdwValue to value
pdwVersion to version
pElemExisting to elem_existing
pEntry to entry
pErrInfo to err_inf
pExists to exists
pfEnablePerf to enable_perf
pGenObj to gen_obj
phChnlMgr to channel_mgr
phChnl to chnl
phCodMgr to cod_mgr
phDCDHandle to dcd_handle
phDcdMgr to dcd_mgr
phDehMgr to deh_manager
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 18 ++--
drivers/staging/tidspbridge/core/tiomap3430.c | 6 +-
drivers/staging/tidspbridge/core/ue_deh.c | 12 +-
.../staging/tidspbridge/include/dspbridge/cfg.h | 30 +++---
.../staging/tidspbridge/include/dspbridge/chnl.h | 6 +-
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 12 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 2 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 20 ++--
.../tidspbridge/include/dspbridge/dspchnl.h | 4 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 42 ++++---
.../staging/tidspbridge/include/dspbridge/dspdeh.h | 2 +-
drivers/staging/tidspbridge/include/dspbridge/io.h | 2 +-
.../staging/tidspbridge/include/dspbridge/list.h | 10 +-
.../staging/tidspbridge/include/dspbridge/mgr.h | 10 +-
drivers/staging/tidspbridge/pmgr/chnl.c | 8 +-
drivers/staging/tidspbridge/pmgr/dbll.c | 10 +-
drivers/staging/tidspbridge/pmgr/dev.c | 20 ++--
drivers/staging/tidspbridge/rmgr/dbdcd.c | 134 ++++++++++----------
drivers/staging/tidspbridge/rmgr/mgr.c | 12 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 8 +-
drivers/staging/tidspbridge/services/cfg.c | 22 ++--
22 files changed, 198 insertions(+), 194 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/rmgr/dbdcd.c

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 834172d..cec3bb5 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -380,7 +380,7 @@ func_cont:
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
*/
-int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
+int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs)
{
@@ -389,7 +389,7 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
u8 max_channels;

/* Check DBC requirements: */
- DBC_REQUIRE(phChnlMgr != NULL);
+ DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);
DBC_REQUIRE(pMgrAttrs->max_channels > 0);
DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS);
@@ -430,10 +430,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,

if (DSP_FAILED(status)) {
bridge_chnl_destroy(chnl_mgr_obj);
- *phChnlMgr = NULL;
+ *channel_mgr = NULL;
} else {
/* Return channel manager object to caller... */
- *phChnlMgr = chnl_mgr_obj;
+ *channel_mgr = chnl_mgr_obj;
}
return status;
}
@@ -774,7 +774,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,
* ======== bridge_chnl_open ========
* Open a new half-duplex channel to the DSP board.
*/
-int bridge_chnl_open(OUT struct chnl_object **phChnl,
+int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr, s8 chnl_mode,
u32 uChnlId, CONST IN struct chnl_attr *pattrs)
{
@@ -783,10 +783,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
struct chnl_object *pchnl = NULL;
struct sync_object *sync_event = NULL;
/* Ensure DBC requirements: */
- DBC_REQUIRE(phChnl != NULL);
+ DBC_REQUIRE(chnl != NULL);
DBC_REQUIRE(pattrs != NULL);
DBC_REQUIRE(hchnl_mgr != NULL);
- *phChnl = NULL;
+ *chnl = NULL;
/* Validate Args: */
if (pattrs->uio_reqs == 0) {
status = -EINVAL;
@@ -893,10 +893,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock);
/* Return result... */
pchnl->dw_state = CHNL_STATEREADY;
- *phChnl = pchnl;
+ *chnl = pchnl;
}
func_end:
- DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*phChnl == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*chnl == NULL));
return status;
}

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index ff92d84..9eadf1f 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -84,7 +84,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_context,
static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context,
- int *pdwState);
+ int *board_state);
static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff,
@@ -766,10 +766,10 @@ static int bridge_brd_delete(struct bridge_dev_context *dev_ctxt)
* Returns the board status.
*/
static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
- int *pdwState)
+ int *board_state)
{
struct bridge_dev_context *dev_context = dev_ctxt;
- *pdwState = dev_context->dw_brd_state;
+ *board_state = dev_context->dw_brd_state;
return 0;
}

diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index 69256a6..c53eb02 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -279,19 +279,19 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 error_info)
}

int bridge_deh_get_info(struct deh_mgr *deh_mgr,
- struct dsp_errorinfo *pErrInfo)
+ struct dsp_errorinfo *err_inf)
{
DBC_REQUIRE(deh_mgr);
- DBC_REQUIRE(pErrInfo);
+ DBC_REQUIRE(err_inf);

if (!deh_mgr)
return -EFAULT;

/* Copy DEH error info structure to PROC error info structure. */
- pErrInfo->dw_err_mask = deh_mgr->err_info.dw_err_mask;
- pErrInfo->dw_val1 = deh_mgr->err_info.dw_val1;
- pErrInfo->dw_val2 = deh_mgr->err_info.dw_val2;
- pErrInfo->dw_val3 = deh_mgr->err_info.dw_val3;
+ err_inf->dw_err_mask = deh_mgr->err_info.dw_err_mask;
+ err_inf->dw_val1 = deh_mgr->err_info.dw_val1;
+ err_inf->dw_val2 = deh_mgr->err_info.dw_val2;
+ err_inf->dw_val3 = deh_mgr->err_info.dw_val3;

return 0;
}
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 0eadd71..29f9024 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -58,9 +58,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
* Purpose:
* Retrieves the version of the PM Class Driver.
* Parameters:
- * pdwVersion: Ptr to u32 to contain version number upon return.
+ * version: Ptr to u32 to contain version number upon return.
* Returns:
- * 0: Success. pdwVersion contains Class Driver version in
+ * 0: Success. version contains Class Driver version in
* the form: 0xAABBCCDD where AABB is Major version and
* CCDD is Minor.
* -EPERM: Failure.
@@ -68,9 +68,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
* CFG initialized.
* Ensures:
* 0: Success.
- * else: *pdwVersion is NULL.
+ * else: *version is NULL.
*/
-extern int cfg_get_cd_version(OUT u32 *pdwVersion);
+extern int cfg_get_cd_version(OUT u32 *version);

/*
* ======== cfg_get_dev_object ========
@@ -79,7 +79,7 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion);
* Parameters:
* dev_node_obj: Platform's dev_node handle from which to retrieve
* value.
- * pdwValue: Ptr to location to store the value.
+ * value: Ptr to location to store the value.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
@@ -87,11 +87,11 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion);
* Requires:
* CFG initialized.
* Ensures:
- * 0: *pdwValue is set to the retrieved u32.
- * else: *pdwValue is set to 0L.
+ * 0: *value is set to the retrieved u32.
+ * else: *value is set to 0L.
*/
extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwValue);
+ OUT u32 *value);

/*
* ======== cfg_get_exec_file ========
@@ -120,17 +120,17 @@ extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
* Purpose:
* Retrieve the Driver Object handle From the Registry
* Parameters:
- * pdwValue: Ptr to location to store the value.
+ * value: Ptr to location to store the value.
* dw_type Type of Object to Get
* Returns:
* 0: Success.
* Requires:
* CFG initialized.
* Ensures:
- * 0: *pdwValue is set to the retrieved u32(non-Zero).
- * else: *pdwValue is set to 0L.
+ * 0: *value is set to the retrieved u32(non-Zero).
+ * else: *value is set to 0L.
*/
-extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
+extern int cfg_get_object(OUT u32 *value, u8 dw_type);

/*
* ======== cfg_get_perf_value ========
@@ -138,15 +138,15 @@ extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
* Retrieve a flag indicating whether PERF should log statistics for the
* PM class driver.
* Parameters:
- * pfEnablePerf: Location to store flag. 0 indicates the key was
+ * enable_perf: Location to store flag. 0 indicates the key was
* not found, or had a zero value. A nonzero value
* means the key was found and had a nonzero value.
* Returns:
* Requires:
- * pfEnablePerf != NULL;
+ * enable_perf != NULL;
* Ensures:
*/
-extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
+extern void cfg_get_perf_value(OUT bool *enable_perf);

/*
* ======== cfg_get_zl_file ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/chnl.h b/drivers/staging/tidspbridge/include/dspbridge/chnl.h
index 89315dc..7b0352e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/chnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/chnl.h
@@ -51,7 +51,7 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on output.
+ * channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
@@ -70,14 +70,14 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* -EEXIST: Channel manager already exists for this device.
* Requires:
* chnl_init(void) called.
- * phChnlMgr != NULL.
+ * channel_mgr != NULL.
* pMgrAttrs != NULL.
* Ensures:
* 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to
* chnl_destroy() will fail.
*/
-extern int chnl_create(OUT struct chnl_mgr **phChnlMgr,
+extern int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index 2a2b655..8c06272 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -77,7 +77,7 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* This function creates a DCD module manager.
* Parameters:
* pszZlDllName: Pointer to a DLL name string.
- * phDcdMgr: A pointer to a DCD manager handle.
+ * dcd_mgr: A pointer to a DCD manager handle.
* Returns:
* 0: Success.
* -ENOMEM: Unable to allocate memory for DCD manager handle.
@@ -85,12 +85,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* Requires:
* DCD initialized.
* pszZlDllName is non-NULL.
- * phDcdMgr is non-NULL.
+ * dcd_mgr is non-NULL.
* Ensures:
* A DCD manager handle is created.
*/
extern int dcd_create_manager(IN char *pszZlDllName,
- OUT struct dcd_manager **phDcdMgr);
+ OUT struct dcd_manager **dcd_mgr);

/*
* ======== dcd_destroy_manager ========
@@ -215,7 +215,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object.
* pstrLibName: Buffer to hold library name.
- * pdwSize: Contains buffer size. Set to string size on output.
+ * buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load
* phase_split: Are phases in multiple libraries
* Returns:
@@ -226,13 +226,13 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Valid hdcd_mgr.
* pstrLibName != NULL.
* uuid_obj != NULL
- * pdwSize != NULL.
+ * buff_size != NULL.
* Ensures:
*/
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName,
- IN OUT u32 *pdwSize,
+ IN OUT u32 *buff_size,
IN enum nldr_phase phase,
OUT bool *phase_split);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index 54c6219..c7b5ed1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -41,7 +41,7 @@ extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
- struct dbll_attrs *attrs, u32 * pEntry);
+ struct dbll_attrs *attrs, u32 * entry);
extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index d780ee8..da8abf4 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -342,7 +342,7 @@ typedef bool(*dbll_init_fxn) (void);
* Requires:
* DBL initialized.
* Valid lib.
- * pEntry != NULL.
+ * entry != NULL.
* Ensures:
*/
typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 2e18edf..3d7a08a 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -263,19 +263,19 @@ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phCodMgr: Ptr to location to store handle.
+ * *cod_mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phCodMgr != NULL.
+ * cod_mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phCodMgr contains a handle to a COD manager object.
- * else: *phCodMgr is NULL.
+ * 0: *cod_mgr contains a handle to a COD manager object.
+ * else: *cod_mgr is NULL.
*/
extern int dev_get_cod_mgr(struct dev_object *hdev_obj,
- OUT struct cod_manager **phCodMgr);
+ OUT struct cod_manager **cod_mgr);

/*
* ======== dev_get_deh_mgr ========
@@ -283,19 +283,19 @@ extern int dev_get_cod_mgr(struct dev_object *hdev_obj,
* Retrieve the DEH manager created for this device.
* Parameters:
* hdev_obj: Handle to device object created with dev_create_device().
- * *phDehMgr: Ptr to location to store handle.
+ * *deh_manager: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDehMgr != NULL.
+ * deh_manager != NULL.
* DEH Initialized.
* Ensures:
- * 0: *phDehMgr contains a handle to a DEH manager object.
- * else: *phDehMgr is NULL.
+ * 0: *deh_manager contains a handle to a DEH manager object.
+ * else: *deh_manager is NULL.
*/
extern int dev_get_deh_mgr(struct dev_object *hdev_obj,
- OUT struct deh_mgr **phDehMgr);
+ OUT struct deh_mgr **deh_manager);

/*
* ======== dev_get_dev_node ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
index 34ce4e8..c009204 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
@@ -24,14 +24,14 @@
#ifndef DSPCHNL_
#define DSPCHNL_

-extern int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
+extern int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs
*pMgrAttrs);

extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);

-extern int bridge_chnl_open(OUT struct chnl_object **phChnl,
+extern int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 92a6d5b..9fda242 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -228,17 +228,18 @@ typedef int(*fxn_brd_stop) (struct bridge_dev_context *dev_ctxt);
* Report the current state of the board.
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device context.
- * pdwState: Ptr to BRD status variable.
+ * board_state: Ptr to BRD status variable.
* Returns:
* 0:
* Requires:
- * pdwState != NULL;
+ * board_state != NULL;
* dev_ctxt != NULL
* Ensures:
- * *pdwState is one of {BRD_STOPPED, BRD_IDLE, BRD_RUNNING, BRD_UNKNOWN};
+ * *board_state is one of
+ * {BRD_STOPPED, BRD_IDLE, BRD_RUNNING, BRD_UNKNOWN};
*/
typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
- int *pdwState);
+ int *board_state);

/*
* ======== bridge_brd_read ========
@@ -297,7 +298,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on output.
+ * channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
@@ -312,7 +313,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* -EIO: Unable to plug ISR for given IRQ.
* -EFAULT: Couldn't map physical address to a virtual one.
* Requires:
- * phChnlMgr != NULL.
+ * channel_mgr != NULL.
* pMgrAttrs != NULL
* pMgrAttrs field are all valid:
* 0 < max_channels <= CHNL_MAXCHANNELS.
@@ -323,7 +324,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* Ensures:
*/
typedef int(*fxn_chnl_create) (OUT struct chnl_mgr
- **phChnlMgr,
+ **channel_mgr,
struct dev_object
* hdev_obj,
IN CONST struct
@@ -367,7 +368,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* Purpose:
* Open a new half-duplex channel to the DSP board.
* Parameters:
- * phChnl: Location to store a channel object handle.
+ * chnl: Location to store a channel object handle.
* hchnl_mgr: Handle to channel manager, as returned by
* CHNL_GetMgr().
* chnl_mode: One of {CHNL_MODETODSP, CHNL_MODEFROMDSP} specifies
@@ -398,16 +399,16 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* -EIO: No free IO request packets available for
* queuing.
* Requires:
- * phChnl != NULL.
+ * chnl != NULL.
* pattrs != NULL.
* pattrs->event_obj is a valid event handle.
* pattrs->hReserved is the kernel mode handle for pattrs->event_obj.
* Ensures:
- * 0: *phChnl is a valid channel.
- * else: *phChnl is set to NULL if (phChnl != NULL);
+ * 0: *chnl is a valid channel.
+ * else: *chnl is set to NULL if (chnl != NULL);
*/
typedef int(*fxn_chnl_open) (OUT struct chnl_object
- **phChnl,
+ **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
@@ -728,7 +729,7 @@ typedef int(*fxn_dev_destroy) (struct bridge_dev_context *dev_ctxt);
* Purpose:
* Create an object that manages DSP exceptions from the GPP.
* Parameters:
- * phDehMgr: Location to store DEH manager on output.
+ * deh_manager: Location to store DEH manager on output.
* hdev_obj: Handle to DEV object.
* Returns:
* 0: Success.
@@ -736,11 +737,12 @@ typedef int(*fxn_dev_destroy) (struct bridge_dev_context *dev_ctxt);
* -EPERM: Creation failed.
* Requires:
* hdev_obj != NULL;
- * phDehMgr != NULL;
+ * deh_manager != NULL;
* Ensures:
*/
typedef int(*fxn_deh_create) (OUT struct deh_mgr
- **phDehMgr, struct dev_object *hdev_obj);
+ **deh_manager,
+ struct dev_object *hdev_obj);

/*
* ======== bridge_deh_destroy ========
@@ -779,18 +781,18 @@ typedef int(*fxn_deh_registernotify)
* Purpose:
* Get DSP exception info.
* Parameters:
- * phDehMgr: Location to store DEH manager on output.
- * pErrInfo: Ptr to error info structure.
+ * deh_manager: Location to store DEH manager on output.
+ * err_inf: Ptr to error info structure.
* Returns:
* 0: Success.
* -EPERM: Creation failed.
* Requires:
- * phDehMgr != NULL;
+ * deh_manager != NULL;
* pErrorInfo != NULL;
* Ensures:
*/
-typedef int(*fxn_deh_getinfo) (struct deh_mgr *phDehMgr,
- struct dsp_errorinfo *pErrInfo);
+typedef int(*fxn_deh_getinfo) (struct deh_mgr *deh_manager,
+ struct dsp_errorinfo *err_inf);

/*
* ======== bridge_io_create ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
index ce8c936..38c8eba 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdeh.h
@@ -33,7 +33,7 @@ extern int bridge_deh_create(struct deh_mgr **ret_deh_mgr,
extern int bridge_deh_destroy(struct deh_mgr *deh_mgr);

extern int bridge_deh_get_info(struct deh_mgr *deh_mgr,
- struct dsp_errorinfo *pErrInfo);
+ struct dsp_errorinfo *err_inf);

extern int bridge_deh_register_notify(struct deh_mgr *deh_mgr,
u32 event_mask,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io.h b/drivers/staging/tidspbridge/include/dspbridge/io.h
index e1610f1..123cf03 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io.h
@@ -30,7 +30,7 @@
* Create an IO manager object, responsible for managing IO between
* CHNL and msg_ctrl.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on
+ * channel_mgr: Location to store a channel manager object on
* output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: IO manager attributes.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/list.h b/drivers/staging/tidspbridge/include/dspbridge/list.h
index dc8ae09..2cf885d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/list.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/list.h
@@ -123,21 +123,21 @@ static inline void lst_init_elem(struct list_head *elem_list)
* Parameters:
* pList: Pointer to list control structure.
* elem_list: Pointer to element in list to insert.
- * pElemExisting: Pointer to existing list element.
+ * elem_existing: Pointer to existing list element.
* Returns:
* Requires:
* - LST initialized.
* - pList != NULL.
* - elem_list != NULL.
- * - pElemExisting != NULL.
+ * - elem_existing != NULL.
* Ensures:
*/
static inline void lst_insert_before(struct lst_list *pList,
struct list_head *elem_list,
- struct list_head *pElemExisting)
+ struct list_head *elem_existing)
{
- if (pList && elem_list && pElemExisting)
- list_add_tail(elem_list, pElemExisting);
+ if (pList && elem_list && elem_existing)
+ list_add_tail(elem_list, elem_existing);
}

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
index e225845..90e174c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
@@ -174,19 +174,19 @@ extern void mgr_exit(void);
* Retrieves the MGR handle. Accessor Function
* Parameters:
* mgr_handle: Handle to the Manager Object
- * phDCDHandle: Ptr to receive the DCD Handle.
+ * dcd_handle: Ptr to receive the DCD Handle.
* Returns:
* 0: Sucess
* -EPERM: Failure to get the Handle
* Requires:
* MGR is initialized.
- * phDCDHandle != NULL
+ * dcd_handle != NULL
* Ensures:
- * 0 and *phDCDHandle != NULL ||
- * -EPERM and *phDCDHandle == NULL
+ * 0 and *dcd_handle != NULL ||
+ * -EPERM and *dcd_handle == NULL
*/
extern int mgr_get_dcd_handle(IN struct mgr_object
- *mgr_handle, OUT u32 *phDCDHandle);
+ *mgr_handle, OUT u32 *dcd_handle);

/*
* ======== mgr_init ========
diff --git a/drivers/staging/tidspbridge/pmgr/chnl.c b/drivers/staging/tidspbridge/pmgr/chnl.c
index bc969d8..0ba5039 100644
--- a/drivers/staging/tidspbridge/pmgr/chnl.c
+++ b/drivers/staging/tidspbridge/pmgr/chnl.c
@@ -51,7 +51,7 @@ static u32 refs;
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board.
*/
-int chnl_create(OUT struct chnl_mgr **phChnlMgr,
+int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs)
{
@@ -60,10 +60,10 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr,
struct chnl_mgr_ *chnl_mgr_obj = NULL;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phChnlMgr != NULL);
+ DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);

- *phChnlMgr = NULL;
+ *channel_mgr = NULL;

/* Validate args: */
if ((0 < pMgrAttrs->max_channels) &&
@@ -96,7 +96,7 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr,
chnl_mgr_obj = (struct chnl_mgr_ *)hchnl_mgr;
chnl_mgr_obj->intf_fxns = intf_fxns;
/* Finally, return the new channel manager handle: */
- *phChnlMgr = hchnl_mgr;
+ *channel_mgr = hchnl_mgr;
}
}

diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 0afd6fc..a4b853a 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -451,7 +451,7 @@ bool dbll_init(void)
* ======== dbll_load ========
*/
int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
- struct dbll_attrs *attrs, u32 *pEntry)
+ struct dbll_attrs *attrs, u32 *entry)
{
struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib;
struct dbll_tar_obj *dbzl;
@@ -461,7 +461,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
bool opened_doff = false;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
- DBC_REQUIRE(pEntry != NULL);
+ DBC_REQUIRE(entry != NULL);
DBC_REQUIRE(attrs != NULL);

/*
@@ -550,7 +550,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
redefined_symbol = false;
status = -EILSEQ;
} else {
- *pEntry = zl_lib->entry;
+ *entry = zl_lib->entry;
}
}
}
@@ -563,8 +563,8 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,

DBC_ENSURE(DSP_FAILED(status) || zl_lib->load_ref > 0);

- dev_dbg(bridge, "%s: lib: %p flags: 0x%x pEntry: %p, status 0x%x\n",
- __func__, lib, flags, pEntry, status);
+ dev_dbg(bridge, "%s: lib: %p flags: 0x%x entry: %p, status 0x%x\n",
+ __func__, lib, flags, entry, status);

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 3b82d29..4ae4f6c 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -501,23 +501,23 @@ int dev_get_dmm_mgr(struct dev_object *hdev_obj,
* Retrieve the COD manager create for this device.
*/
int dev_get_cod_mgr(struct dev_object *hdev_obj,
- OUT struct cod_manager **phCodMgr)
+ OUT struct cod_manager **cod_mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phCodMgr != NULL);
+ DBC_REQUIRE(cod_mgr != NULL);

if (hdev_obj) {
- *phCodMgr = dev_obj->cod_mgr;
+ *cod_mgr = dev_obj->cod_mgr;
} else {
- *phCodMgr = NULL;
+ *cod_mgr = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phCodMgr != NULL) &&
- (*phCodMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((cod_mgr != NULL) &&
+ (*cod_mgr == NULL)));
return status;
}

@@ -525,17 +525,17 @@ int dev_get_cod_mgr(struct dev_object *hdev_obj,
* ========= dev_get_deh_mgr ========
*/
int dev_get_deh_mgr(struct dev_object *hdev_obj,
- OUT struct deh_mgr **phDehMgr)
+ OUT struct deh_mgr **deh_manager)
{
int status = 0;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDehMgr != NULL);
+ DBC_REQUIRE(deh_manager != NULL);
DBC_REQUIRE(hdev_obj);
if (hdev_obj) {
- *phDehMgr = hdev_obj->hdeh_mgr;
+ *deh_manager = hdev_obj->hdeh_mgr;
} else {
- *phDehMgr = NULL;
+ *deh_manager = NULL;
status = -EFAULT;
}
return status;
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index be98c4c..595f9ec
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -64,7 +64,7 @@ static u32 enum_refs;
static s32 atoi(char *psz_buf);
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
- struct dcd_genericobj *pGenObj);
+ struct dcd_genericobj *gen_obj);
static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
@@ -125,14 +125,14 @@ int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* Creates DCD manager.
*/
int dcd_create_manager(IN char *pszZlDllName,
- OUT struct dcd_manager **phDcdMgr)
+ OUT struct dcd_manager **dcd_mgr)
{
struct cod_manager *cod_mgr; /* COD manager handle */
struct dcd_manager *dcd_mgr_obj = NULL; /* DCD Manager pointer */
int status = 0;

DBC_REQUIRE(refs >= 0);
- DBC_REQUIRE(phDcdMgr);
+ DBC_REQUIRE(dcd_mgr);

status = cod_create(&cod_mgr, pszZlDllName, NULL);
if (DSP_FAILED(status))
@@ -145,7 +145,7 @@ int dcd_create_manager(IN char *pszZlDllName,
dcd_mgr_obj->cod_mgr = cod_mgr;

/* Return handle to this DCD interface. */
- *phDcdMgr = dcd_mgr_obj;
+ *dcd_mgr = dcd_mgr_obj;
} else {
status = -ENOMEM;

@@ -644,7 +644,8 @@ func_end:
*/
int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName, IN OUT u32 * pdwSize,
+ IN OUT char *pstrLibName,
+ IN OUT u32 *buff_size,
enum nldr_phase phase, OUT bool *phase_split)
{
char sz_reg_key[DCD_MAXPATHLENGTH];
@@ -656,11 +657,12 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,

DBC_REQUIRE(uuid_obj != NULL);
DBC_REQUIRE(pstrLibName != NULL);
- DBC_REQUIRE(pdwSize != NULL);
+ DBC_REQUIRE(buff_size != NULL);
DBC_REQUIRE(hdcd_mgr);

- dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p, pdwSize "
- "%p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName, pdwSize);
+ dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p,"
+ " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName,
+ buff_size);

/*
* Pre-determine final key length. It's length of DCD_REGKEY +
@@ -1033,7 +1035,7 @@ static s32 atoi(char *psz_buf)
*/
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
- struct dcd_genericobj *pGenObj)
+ struct dcd_genericobj *gen_obj)
{
int status = 0;
char seps[] = ", ";
@@ -1049,7 +1051,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
DBC_REQUIRE(ul_buf_size != 0);
DBC_REQUIRE((obj_type == DSP_DCDNODETYPE)
|| (obj_type == DSP_DCDPROCESSORTYPE));
- DBC_REQUIRE(pGenObj != NULL);
+ DBC_REQUIRE(gen_obj != NULL);

switch (obj_type) {
case DSP_DCDNODETYPE:
@@ -1061,13 +1063,13 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
token = strsep(&psz_cur, seps);

/* u32 cb_struct */
- pGenObj->obj_data.node_obj.ndb_props.cb_struct =
+ gen_obj->obj_data.node_obj.ndb_props.cb_struct =
(u32) atoi(token);
token = strsep(&psz_cur, seps);

/* dsp_uuid ui_node_id */
uuid_uuid_from_string(token,
- &pGenObj->obj_data.node_obj.ndb_props.
+ &gen_obj->obj_data.node_obj.ndb_props.
ui_node_id);
token = strsep(&psz_cur, seps);

@@ -1077,154 +1079,154 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
if (token_len > DSP_MAXNAMELEN - 1)
token_len = DSP_MAXNAMELEN - 1;

- strncpy(pGenObj->obj_data.node_obj.ndb_props.ac_name,
+ strncpy(gen_obj->obj_data.node_obj.ndb_props.ac_name,
token, token_len);
- pGenObj->obj_data.node_obj.ndb_props.ac_name[token_len] = '\0';
+ gen_obj->obj_data.node_obj.ndb_props.ac_name[token_len] = '\0';
token = strsep(&psz_cur, seps);
/* u32 ntype */
- pGenObj->obj_data.node_obj.ndb_props.ntype = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.ntype = atoi(token);
token = strsep(&psz_cur, seps);
/* u32 cache_on_gpp */
- pGenObj->obj_data.node_obj.ndb_props.cache_on_gpp = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.cache_on_gpp = atoi(token);
token = strsep(&psz_cur, seps);
/* dsp_resourcereqmts dsp_resource_reqmts */
- pGenObj->obj_data.node_obj.ndb_props.dsp_resource_reqmts.
+ gen_obj->obj_data.node_obj.ndb_props.dsp_resource_reqmts.
cb_struct = (u32) atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.static_data_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.global_data_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.program_mem_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_execution_time = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_period = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_deadline = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.avg_exection_time = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.minimum_period = atoi(token);
token = strsep(&psz_cur, seps);

/* s32 prio */
- pGenObj->obj_data.node_obj.ndb_props.prio = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.prio = atoi(token);
token = strsep(&psz_cur, seps);

/* u32 stack_size */
- pGenObj->obj_data.node_obj.ndb_props.stack_size = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.stack_size = atoi(token);
token = strsep(&psz_cur, seps);

/* u32 sys_stack_size */
- pGenObj->obj_data.node_obj.ndb_props.sys_stack_size =
+ gen_obj->obj_data.node_obj.ndb_props.sys_stack_size =
atoi(token);
token = strsep(&psz_cur, seps);

/* u32 stack_seg */
- pGenObj->obj_data.node_obj.ndb_props.stack_seg = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.stack_seg = atoi(token);
token = strsep(&psz_cur, seps);

/* u32 message_depth */
- pGenObj->obj_data.node_obj.ndb_props.message_depth =
+ gen_obj->obj_data.node_obj.ndb_props.message_depth =
atoi(token);
token = strsep(&psz_cur, seps);

/* u32 num_input_streams */
- pGenObj->obj_data.node_obj.ndb_props.num_input_streams =
+ gen_obj->obj_data.node_obj.ndb_props.num_input_streams =
atoi(token);
token = strsep(&psz_cur, seps);

/* u32 num_output_streams */
- pGenObj->obj_data.node_obj.ndb_props.num_output_streams =
+ gen_obj->obj_data.node_obj.ndb_props.num_output_streams =
atoi(token);
token = strsep(&psz_cur, seps);

/* u32 utimeout */
- pGenObj->obj_data.node_obj.ndb_props.utimeout = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.utimeout = atoi(token);
token = strsep(&psz_cur, seps);

/* char *pstr_create_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_create_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_create_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_create_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_create_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_create_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_create_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);

/* char *pstr_execute_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_execute_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_execute_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_execute_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_execute_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);

/* char *pstr_delete_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_delete_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_delete_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_delete_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_delete_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);

/* Segment id for message buffers */
- pGenObj->obj_data.node_obj.msg_segid = atoi(token);
+ gen_obj->obj_data.node_obj.msg_segid = atoi(token);
token = strsep(&psz_cur, seps);

/* Message notification type */
- pGenObj->obj_data.node_obj.msg_notify_type = atoi(token);
+ gen_obj->obj_data.node_obj.msg_notify_type = atoi(token);
token = strsep(&psz_cur, seps);

/* char *pstr_i_alg_name */
if (token) {
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_i_alg_name =
+ gen_obj->obj_data.node_obj.pstr_i_alg_name =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_i_alg_name,
+ strncpy(gen_obj->obj_data.node_obj.pstr_i_alg_name,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_i_alg_name[token_len] =
+ gen_obj->obj_data.node_obj.pstr_i_alg_name[token_len] =
'\0';
token = strsep(&psz_cur, seps);
}

/* Load type (static, dynamic, or overlay) */
if (token) {
- pGenObj->obj_data.node_obj.us_load_type = atoi(token);
+ gen_obj->obj_data.node_obj.us_load_type = atoi(token);
token = strsep(&psz_cur, seps);
}

/* Dynamic load data requirements */
if (token) {
- pGenObj->obj_data.node_obj.ul_data_mem_seg_mask =
+ gen_obj->obj_data.node_obj.ul_data_mem_seg_mask =
atoi(token);
token = strsep(&psz_cur, seps);
}

/* Dynamic load code requirements */
if (token) {
- pGenObj->obj_data.node_obj.ul_code_mem_seg_mask =
+ gen_obj->obj_data.node_obj.ul_code_mem_seg_mask =
atoi(token);
token = strsep(&psz_cur, seps);
}
@@ -1232,16 +1234,16 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
/* Extract node profiles into node properties */
if (token) {

- pGenObj->obj_data.node_obj.ndb_props.count_profiles =
+ gen_obj->obj_data.node_obj.ndb_props.count_profiles =
atoi(token);
for (i = 0;
i <
- pGenObj->obj_data.node_obj.
+ gen_obj->obj_data.node_obj.
ndb_props.count_profiles; i++) {
token = strsep(&psz_cur, seps);
if (token) {
/* Heap Size for the node */
- pGenObj->obj_data.node_obj.
+ gen_obj->obj_data.node_obj.
ndb_props.node_profiles[i].
ul_heap_size = atoi(token);
}
@@ -1249,7 +1251,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
}
token = strsep(&psz_cur, seps);
if (token) {
- pGenObj->obj_data.node_obj.ndb_props.stack_seg_name =
+ gen_obj->obj_data.node_obj.ndb_props.stack_seg_name =
(u32) (token);
}

@@ -1263,45 +1265,45 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
psz_cur = psz_buf;
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.cb_struct = atoi(token);
+ gen_obj->obj_data.proc_info.cb_struct = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.processor_family = atoi(token);
+ gen_obj->obj_data.proc_info.processor_family = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.processor_type = atoi(token);
+ gen_obj->obj_data.proc_info.processor_type = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.clock_rate = atoi(token);
+ gen_obj->obj_data.proc_info.clock_rate = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.ul_internal_mem_size = atoi(token);
+ gen_obj->obj_data.proc_info.ul_internal_mem_size = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.ul_external_mem_size = atoi(token);
+ gen_obj->obj_data.proc_info.ul_external_mem_size = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.processor_id = atoi(token);
+ gen_obj->obj_data.proc_info.processor_id = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.ty_running_rtos = atoi(token);
+ gen_obj->obj_data.proc_info.ty_running_rtos = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.node_min_priority = atoi(token);
+ gen_obj->obj_data.proc_info.node_min_priority = atoi(token);
token = strsep(&psz_cur, seps);

- pGenObj->obj_data.proc_info.node_max_priority = atoi(token);
+ gen_obj->obj_data.proc_info.node_max_priority = atoi(token);

#ifdef _DB_TIOMAP
/* Proc object may contain additional(extended) attributes. */
/* attr must match proc.hxx */
for (entry_id = 0; entry_id < 7; entry_id++) {
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.ext_proc_obj.ty_tlb[entry_id].
+ gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id].
ul_gpp_phys = atoi(token);

token = strsep(&psz_cur, seps);
- pGenObj->obj_data.ext_proc_obj.ty_tlb[entry_id].
+ gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id].
ul_dsp_virt = atoi(token);
}
#endif
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index 52d7865..43be669 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -304,21 +304,21 @@ void mgr_exit(void)
* Retrieves the MGR handle. Accessor Function.
*/
int mgr_get_dcd_handle(struct mgr_object *mgr_handle,
- OUT u32 *phDCDHandle)
+ OUT u32 *dcd_handle)
{
int status = -EPERM;
struct mgr_object *pmgr_obj = (struct mgr_object *)mgr_handle;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDCDHandle != NULL);
+ DBC_REQUIRE(dcd_handle != NULL);

- *phDCDHandle = (u32) NULL;
+ *dcd_handle = (u32) NULL;
if (pmgr_obj) {
- *phDCDHandle = (u32) pmgr_obj->hdcd_mgr;
+ *dcd_handle = (u32) pmgr_obj->hdcd_mgr;
status = 0;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDCDHandle != (u32) NULL) ||
- (DSP_FAILED(status) && *phDCDHandle == (u32) NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *dcd_handle != (u32) NULL) ||
+ (DSP_FAILED(status) && *dcd_handle == (u32) NULL));

return status;
}
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index ca2b85b..d461271 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -290,7 +290,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj,
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo,
- bool *pExists, u32 addr, u32 bytes);
+ bool *exists, u32 addr, u32 bytes);
static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype);
static void free_sects(struct nldr_object *nldr_obj,
@@ -1073,7 +1073,7 @@ func_end:
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo,
- bool *pExists, u32 addr, u32 bytes)
+ bool *exists, u32 addr, u32 bytes)
{
struct ovly_sect *new_sect = NULL;
struct ovly_sect *last_sect;
@@ -1081,7 +1081,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
int status = 0;

ovly_section = last_sect = *pList;
- *pExists = false;
+ *exists = false;
while (ovly_section) {
/*
* Make sure section has not already been added. Multiple
@@ -1089,7 +1089,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
*/
if (ovly_section->sect_load_addr == addr) {
/* Already added */
- *pExists = true;
+ *exists = true;
break;
}
last_sect = ovly_section;
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index cc138f7..53ede23 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -76,7 +76,7 @@ int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
* Retrieve the Device Object handle for a given devnode.
*/
int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwValue)
+ OUT u32 *value)
{
int status = 0;
u32 dw_buf_size;
@@ -88,10 +88,10 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
if (!dev_node_obj)
status = -EFAULT;

- if (!pdwValue)
+ if (!value)
status = -EFAULT;

- dw_buf_size = sizeof(pdwValue);
+ dw_buf_size = sizeof(value);
if (DSP_SUCCEEDED(status)) {

/* check the device string and then store dev object */
@@ -99,7 +99,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
(strcmp
((char *)((struct drv_ext *)dev_node_obj)->sz_string,
"TIOMAP1510")))
- *pdwValue = (u32)drv_datap->dev_object;
+ *value = (u32)drv_datap->dev_object;
}
if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
@@ -142,12 +142,12 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
* Purpose:
* Retrieve the Object handle from the Registry
*/
-int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
+int cfg_get_object(OUT u32 *value, u8 dw_type)
{
int status = -EINVAL;
struct drv_data *drv_datap = dev_get_drvdata(bridge);

- DBC_REQUIRE(pdwValue != NULL);
+ DBC_REQUIRE(value != NULL);

if (!drv_datap)
return -EPERM;
@@ -155,7 +155,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
switch (dw_type) {
case (REG_DRV_OBJECT):
if (drv_datap->drv_object) {
- *pdwValue = (u32)drv_datap->drv_object;
+ *value = (u32)drv_datap->drv_object;
status = 0;
} else {
status = -ENODATA;
@@ -163,7 +163,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
break;
case (REG_MGR_OBJECT):
if (drv_datap->mgr_object) {
- *pdwValue = (u32)drv_datap->mgr_object;
+ *value = (u32)drv_datap->mgr_object;
status = 0;
} else {
status = -ENODATA;
@@ -174,11 +174,11 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
break;
}
if (DSP_FAILED(status)) {
- *pdwValue = 0;
+ *value = 0;
pr_err("%s: Failed, status 0x%x\n", __func__, status);
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *pdwValue != 0) ||
- (DSP_FAILED(status) && *pdwValue == 0));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *value != 0) ||
+ (DSP_FAILED(status) && *value == 0));
return status;
}

--
1.6.3.3

2010-07-08 23:13:32

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 12/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
puLen to len
pulEntry to entry_pt
pulFxnAddr to fxn_addr
pulId to chan_id
pulSegId to sgmt_id
pVaBuf to va_buf
pVirtualAddress to virtual_address
pwMbVal to mbx_val
pWord to word
pXlatorAttrs to xlator_attrs
registerFxn to register_fxn
rootPersistent to root_prstnt
sectionData to section_data
sectionInfo to section_info
sectionName to section_name
sectName to sec_name
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 6 ++--
drivers/staging/tidspbridge/dynload/getsection.c | 24 ++++++++++----------
.../staging/tidspbridge/include/dspbridge/cmm.h | 20 ++++++++--------
.../staging/tidspbridge/include/dspbridge/cod.h | 16 ++++++------
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 4 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 10 ++++----
.../staging/tidspbridge/include/dspbridge/drv.h | 8 +++---
.../tidspbridge/include/dspbridge/getsection.h | 16 ++++++------
.../staging/tidspbridge/include/dspbridge/io_sm.h | 6 ++--
.../tidspbridge/include/dspbridge/nodepriv.h | 6 ++--
drivers/staging/tidspbridge/pmgr/cmm.c | 22 +++++++++---------
drivers/staging/tidspbridge/pmgr/cod.c | 16 ++++++------
drivers/staging/tidspbridge/pmgr/dbll.c | 6 ++--
drivers/staging/tidspbridge/rmgr/dbdcd.c | 12 +++++-----
drivers/staging/tidspbridge/rmgr/drv.c | 6 ++--
drivers/staging/tidspbridge/rmgr/nldr.c | 12 +++++-----
drivers/staging/tidspbridge/rmgr/node.c | 14 +++++-----
18 files changed, 104 insertions(+), 104 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index b6c5a35..c7f5d2d 100755
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -1014,12 +1014,12 @@ void io_mbox_msg(u32 msg)
* interrupts the DSP.
*/
void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
- u8 io_mode, OUT u16 *pwMbVal)
+ u8 io_mode, OUT u16 *mbx_val)
{
struct chnl_mgr *chnl_mgr_obj;
struct shm *sm;

- if (!pchnl || !pwMbVal)
+ if (!pchnl || !mbx_val)
goto func_end;
chnl_mgr_obj = pio_mgr->hchnl_mgr;
sm = pio_mgr->shared_mem;
@@ -1033,7 +1033,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
/* Indicate to the DSP we have a buffer available for input */
IO_OR_VALUE(pio_mgr->hbridge_context, struct shm, sm,
host_free_mask, (1 << pchnl->chnl_id));
- *pwMbVal = MBX_PCPY_CLASS;
+ *mbx_val = MBX_PCPY_CLASS;
} else if (io_mode == IO_OUTPUT) {
/*
* This assertion fails if CHNL_AddIOReq() was called on a
diff --git a/drivers/staging/tidspbridge/dynload/getsection.c b/drivers/staging/tidspbridge/dynload/getsection.c
index 029898f..3086118 100644
--- a/drivers/staging/tidspbridge/dynload/getsection.c
+++ b/drivers/staging/tidspbridge/dynload/getsection.c
@@ -226,8 +226,8 @@ void *dload_module_open(struct dynamic_loader_stream *module,
*
* Parameters:
* minfo Handle from dload_module_open for this module
- * sectionName Pointer to the string name of the section desired
- * sectionInfo Address of a section info structure pointer to be
+ * section_name Pointer to the string name of the section desired
+ * section_info Address of a section info structure pointer to be
* initialized
*
* Effect:
@@ -237,8 +237,8 @@ void *dload_module_open(struct dynamic_loader_stream *module,
* Returns:
* true for success, false for section not found
************************************************************************* */
-int dload_get_section_info(void *minfo, const char *sectionName,
- const struct ldr_section_info **const sectionInfo)
+int dload_get_section_info(void *minfo, const char *section_name,
+ const struct ldr_section_info **const section_info)
{
struct dload_state *dlthis;
struct ldr_section_info *shp;
@@ -250,8 +250,8 @@ int dload_get_section_info(void *minfo, const char *sectionName,

for (sec = 0; sec < dlthis->dfile_hdr.df_no_scns; sec++) {
shp = DOFFSEC_IS_LDRSEC(&dlthis->sect_hdrs[sec]);
- if (strcmp(sectionName, shp->name) == 0) {
- *sectionInfo = shp;
+ if (strcmp(section_name, shp->name) == 0) {
+ *section_info = shp;
return true;
}
}
@@ -267,9 +267,9 @@ int dload_get_section_info(void *minfo, const char *sectionName,
*
* Parameters:
* minfo Handle from dload_module_open for this module
- * sectionInfo Pointer to a section info structure for the desired
+ * section_info Pointer to a section info structure for the desired
* section
- * sectionData Buffer to contain the section initialized data
+ * section_data Buffer to contain the section initialized data
*
* Effect:
* Copies the initialized data for the specified section into the
@@ -279,8 +279,8 @@ int dload_get_section_info(void *minfo, const char *sectionName,
* true for success, false for section not found
************************************************************************* */
int dload_get_section(void *minfo,
- const struct ldr_section_info *sectionInfo,
- void *sectionData)
+ const struct ldr_section_info *section_info,
+ void *section_data)
{
struct dload_state *dlthis;
u32 pos;
@@ -289,12 +289,12 @@ int dload_get_section(void *minfo,
struct image_packet_t ipacket;
s32 ipsize;
u32 checks;
- s8 *dest = (s8 *) sectionData;
+ s8 *dest = (s8 *) section_data;

dlthis = (struct dload_state *)minfo;
if (!dlthis)
return false;
- sptr = LDRSEC_IS_DOFFSEC(sectionInfo);
+ sptr = LDRSEC_IS_DOFFSEC(section_info);
if (sptr == NULL)
return false;

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 9d773aa..78cc12a 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -209,17 +209,17 @@ extern bool cmm_init(void);
* c_factor: Add offset if CMM_ADDTODSPPA, sub if CMM_SUBFROMDSPPA.
* dw_dsp_base: DSP virtual base byte address.
* ul_dsp_size: Size of DSP segment in bytes.
- * pulSegId: Address to store segment Id.
+ * sgmt_id: Address to store segment Id.
*
* Returns:
* 0: Success.
* -EFAULT: Invalid hcmm_mgr handle.
* -EINVAL: Invalid input argument.
* -EPERM: Unable to register.
- * - On success *pulSegId is a valid SM segment ID.
+ * - On success *sgmt_id is a valid SM segment ID.
* Requires:
* ul_size > 0
- * pulSegId != NULL
+ * sgmt_id != NULL
* dw_gpp_base_pa != 0
* c_factor = CMM_ADDTODSPPA || c_factor = CMM_SUBFROMDSPPA
* Ensures:
@@ -232,7 +232,7 @@ extern int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
s8 c_factor,
unsigned int dw_dsp_base,
u32 ul_dsp_size,
- u32 *pulSegId, u32 gpp_base_ba);
+ u32 *sgmt_id, u32 gpp_base_ba);

/*
* ======== cmm_un_register_gppsm_seg ========
@@ -261,18 +261,18 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
* Place on the descriptor on the translator's HaQ (Host Alloc'd Queue).
* Parameters:
* xlator: Handle to a Xlator object.
- * pVaBuf: Virtual address ptr(client context)
+ * va_buf: Virtual address ptr(client context)
* uPaSize: Size of SM memory to allocate.
* Returns:
* Ptr to valid physical address(Pa) of uPaSize bytes, NULL if failed.
* Requires:
- * pVaBuf != 0.
+ * va_buf != 0.
* uPaSize != 0.
* Ensures:
*
*/
extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
- void *pVaBuf, u32 uPaSize);
+ void *va_buf, u32 uPaSize);

/*
* ======== cmm_xlator_create ========
@@ -283,7 +283,7 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
* Parameters:
* xlator: Address to place handle to a new Xlator handle.
* hcmm_mgr: Handle to Cmm Mgr associated with this translator.
- * pXlatorAttrs: Translator attributes used for the client NODE or STREAM.
+ * xlator_attrs: Translator attributes used for the client NODE or STREAM.
* Returns:
* 0: Success.
* -EINVAL: Bad input Attrs.
@@ -291,13 +291,13 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
* Requires:
* xlator != NULL
* hcmm_mgr != NULL
- * pXlatorAttrs != NULL
+ * xlator_attrs != NULL
* Ensures:
*
*/
extern int cmm_xlator_create(OUT struct cmm_xlatorobject **xlator,
struct cmm_object *hcmm_mgr,
- struct cmm_xlatorattrs *pXlatorAttrs);
+ struct cmm_xlatorattrs *xlator_attrs);

/*
* ======== cmm_xlator_delete ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index c84761e..2d5f41a 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -169,17 +169,17 @@ extern int cod_get_base_name(struct cod_manager *cod_mgr_obj,
* Retrieve the entry point of a loaded DSP program image
* Parameters:
* cod_mgr_obj: handle of manager to be deleted
- * pulEntry: pointer to location for entry point
+ * entry_pt: pointer to location for entry point
* Returns:
* 0: Success.
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pulEntry != NULL.
+ * entry_pt != NULL.
* Ensures:
*/
extern int cod_get_entry(struct cod_manager *cod_mgr_obj,
- u32 *pulEntry);
+ u32 *entry_pt);

/*
* ======== cod_get_loader ========
@@ -208,7 +208,7 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* lib Library handle returned from cod_open().
* str_sect: name of the section, with or without leading "."
* addr: Location to store address.
- * puLen: Location to store length.
+ * len: Location to store length.
* Returns:
* 0: Success
* -ESPIPE: Symbols could not be found or have not been loaded onto
@@ -218,16 +218,16 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* valid cod_mgr_obj.
* str_sect != NULL;
* addr != NULL;
- * puLen != NULL;
+ * len != NULL;
* Ensures:
- * 0: *addr and *puLen contain the address and length of the
+ * 0: *addr and *len contain the address and length of the
* section.
- * else: *addr == 0 and *puLen == 0;
+ * else: *addr == 0 and *len == 0;
*
*/
extern int cod_get_section(struct cod_libraryobj *lib,
IN char *str_sect,
- OUT u32 *addr, OUT u32 *puLen);
+ OUT u32 *addr, OUT u32 *len);

/*
* ======== cod_get_sym_value ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index c798e72..5e3b7f7 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -278,7 +278,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
* hdcd_mgr: A DCD manager handle.
* sz_coff_path: Pointer to name of COFF file containing DCD
* objects.
- * registerFxn: Callback fxn to be applied on each located
+ * register_fxn: Callback fxn to be applied on each located
* DCD object.
* handle: Handle to pass to callback.
* Returns:
@@ -296,7 +296,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
*/
extern int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
IN char *sz_coff_path,
- dcd_registerfxn registerFxn, void *handle);
+ dcd_registerfxn register_fxn, void *handle);

/*
* ======== dcd_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index 0a65ac0..6eee276 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -43,7 +43,7 @@ extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
struct dbll_attrs *attrs, u32 * entry);
extern int dbll_load_sect(struct dbll_library_obj *lib,
- char *sectName, struct dbll_attrs *attrs);
+ char *sec_name, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
dbll_flags flags,
struct dbll_library_obj **lib_obj);
@@ -53,7 +53,7 @@ extern void dbll_set_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
extern int dbll_unload_sect(struct dbll_library_obj *lib,
- char *sectName, struct dbll_attrs *attrs);
+ char *sec_name, struct dbll_attrs *attrs);
bool dbll_find_dsp_symbol(struct dbll_library_obj *zl_lib, u32 address,
u32 offset_range, u32 *sym_addr_output, char *name_output);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index 8446e0e..fa4c99f 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -334,7 +334,7 @@ typedef bool(*dbll_init_fxn) (void);
* lib - Library handle returned from dbll_open().
* flags - Load code, data and/or symbols.
* attrs - May contain alloc, free, and write function.
- * pulEntry - Location to store program entry on output.
+ * entry_pt - Location to store program entry on output.
* Returns:
* 0: Success.
* -EBADF: File read failed.
@@ -354,7 +354,7 @@ typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
* Load a named section from an library (for overlay support).
* Parameters:
* lib - Handle returned from dbll_open().
- * sectName - Name of section to load.
+ * sec_name - Name of section to load.
* attrs - Contains write function and handle to pass to it.
* Returns:
* 0: Success.
@@ -362,7 +362,7 @@ typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
* -ENOSYS: Function not implemented.
* Requires:
* Valid lib.
- * sectName != NULL.
+ * sec_name != NULL.
* attrs != NULL.
* attrs->write != NULL.
* Ensures:
@@ -458,7 +458,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,
* Unload a named section from an library (for overlay support).
* Parameters:
* lib - Handle returned from dbll_open().
- * sectName - Name of section to load.
+ * sec_name - Name of section to load.
* attrs - Contains free() function and handle to pass to it.
* Returns:
* 0: Success.
@@ -467,7 +467,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,
* Requires:
* DBL initialized.
* Valid lib.
- * sectName != NULL.
+ * sec_name != NULL.
* Ensures:
*/
typedef int(*dbll_unload_sect_fxn) (struct dbll_library_obj *lib,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index e9c5689..a0f84d4 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -470,7 +470,7 @@ extern void *mem_alloc_phys_mem(IN u32 byte_size,
* Purpose:
* Free the given block of physically contiguous memory.
* Parameters:
- * pVirtualAddress: Pointer to virtual memory region allocated
+ * virtual_address: Pointer to virtual memory region allocated
* by mem_alloc_phys_mem().
* physical_address: Pointer to physical memory region allocated
* by mem_alloc_phys_mem().
@@ -478,12 +478,12 @@ extern void *mem_alloc_phys_mem(IN u32 byte_size,
* Returns:
* Requires:
* MEM initialized.
- * pVirtualAddress is a valid memory address returned by
+ * virtual_address is a valid memory address returned by
* mem_alloc_phys_mem()
* Ensures:
- * pVirtualAddress is no longer a valid pointer to memory.
+ * virtual_address is no longer a valid pointer to memory.
*/
-extern void mem_free_phys_mem(void *pVirtualAddress,
+extern void mem_free_phys_mem(void *virtual_address,
u32 physical_address, u32 byte_size);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/getsection.h b/drivers/staging/tidspbridge/include/dspbridge/getsection.h
index bdd8e20..626063d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/getsection.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/getsection.h
@@ -54,8 +54,8 @@ extern void *dload_module_open(struct dynamic_loader_stream
*
* Parameters:
* minfo Handle from dload_module_open for this module
- * sectionName Pointer to the string name of the section desired
- * sectionInfo Address of a section info structure pointer to be initialized
+ * section_name Pointer to the string name of the section desired
+ * section_info Address of a section info structure pointer to be initialized
*
* Effect:
* Finds the specified section in the module information, and fills in
@@ -65,17 +65,17 @@ extern void *dload_module_open(struct dynamic_loader_stream
* TRUE for success, FALSE for section not found
*/
extern int dload_get_section_info(void *minfo,
- const char *sectionName,
+ const char *section_name,
const struct ldr_section_info
- **const sectionInfo);
+ **const section_info);

/*
* Procedure dload_get_section
*
* Parameters:
* minfo Handle from dload_module_open for this module
- * sectionInfo Pointer to a section info structure for the desired section
- * sectionData Buffer to contain the section initialized data
+ * section_info Pointer to a section info structure for the desired section
+ * section_data Buffer to contain the section initialized data
*
* Effect:
* Copies the initialized data for the specified section into the
@@ -85,8 +85,8 @@ extern int dload_get_section_info(void *minfo,
* TRUE for success, FALSE for section not found
*/
extern int dload_get_section(void *minfo,
- const struct ldr_section_info *sectionInfo,
- void *sectionData);
+ const struct ldr_section_info *section_info,
+ void *section_data);

/*
* Procedure dload_module_close
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 9f0f32b..cc8885e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -116,7 +116,7 @@ void io_mbox_msg(u32 msg);
*/
extern void io_request_chnl(struct io_mgr *hio_mgr,
struct chnl_object *pchnl,
- u8 io_mode, OUT u16 *pwMbVal);
+ u8 io_mode, OUT u16 *mbx_val);

/*
* ======== iosm_schedule ========
@@ -190,7 +190,7 @@ extern void io_ddma_clear_chnl_desc(struct io_mgr *hio_mgr, u32 uDDMAChnlId);
extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
struct chnl_object *pchnl,
struct chnl_irp *chnl_packet_obj,
- OUT u16 *pwMbVal);
+ OUT u16 *mbx_val);

/*
* Zero-copy IO functions
@@ -245,7 +245,7 @@ extern void io_ddzc_clear_chnl_desc(struct io_mgr *hio_mgr, u32 uChnlId);
extern void io_ddzc_request_chnl(struct io_mgr *hio_mgr,
struct chnl_object *pchnl,
struct chnl_irp *chnl_packet_obj,
- OUT u16 *pwMbVal);
+ OUT u16 *mbx_val);

/*
* ======== io_sh_msetting ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
index 0b45094..7c2e7a9 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nodepriv.h
@@ -88,7 +88,7 @@ struct node_createargs {
* hnode: Node object allocated from node_allocate().
* dir: Input (DSP_TONODE) or output (DSP_FROMNODE).
* index: Stream index.
- * pulId: Location to store channel index.
+ * chan_id: Location to store channel index.
* Returns:
* 0: Success.
* -EFAULT: Invalid hnode.
@@ -98,11 +98,11 @@ struct node_createargs {
* Requires:
* node_init(void) called.
* Valid dir.
- * pulId != NULL.
+ * chan_id != NULL.
* Ensures:
*/
extern int node_get_channel_id(struct node_object *hnode,
- u32 dir, u32 index, OUT u32 *pulId);
+ u32 dir, u32 index, OUT u32 *chan_id);

/*
* ======== node_get_strm_mgr ========
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 8fd9c26..0a36085 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -540,7 +540,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
u32 dw_gpp_base_pa, u32 ul_size,
u32 dsp_addr_offset, s8 c_factor,
u32 dw_dsp_base, u32 ul_dsp_size,
- u32 *pulSegId, u32 dw_gpp_base_va)
+ u32 *sgmt_id, u32 dw_gpp_base_va)
{
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
struct cmm_allocator *psma = NULL;
@@ -549,7 +549,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
s32 slot_seg;

DBC_REQUIRE(ul_size > 0);
- DBC_REQUIRE(pulSegId != NULL);
+ DBC_REQUIRE(sgmt_id != NULL);
DBC_REQUIRE(dw_gpp_base_pa != 0);
DBC_REQUIRE(dw_gpp_base_va != 0);
DBC_REQUIRE((c_factor <= CMM_ADDTODSPPA) &&
@@ -596,7 +596,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
}
if (DSP_SUCCEEDED(status)) {
/* return the actual segment identifier */
- *pulSegId = (u32) slot_seg + 1;
+ *sgmt_id = (u32) slot_seg + 1;
/* create memory free list */
psma->free_list_head = kzalloc(sizeof(struct lst_list),
GFP_KERNEL);
@@ -956,7 +956,7 @@ static struct cmm_allocator *get_allocator(struct cmm_object *cmm_mgr_obj,
*/
int cmm_xlator_create(OUT struct cmm_xlatorobject **xlator,
struct cmm_object *hcmm_mgr,
- struct cmm_xlatorattrs *pXlatorAttrs)
+ struct cmm_xlatorattrs *xlator_attrs)
{
struct cmm_xlator *xlator_object = NULL;
int status = 0;
@@ -966,14 +966,14 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **xlator,
DBC_REQUIRE(hcmm_mgr != NULL);

*xlator = NULL;
- if (pXlatorAttrs == NULL)
- pXlatorAttrs = &cmm_dfltxlatorattrs; /* set defaults */
+ if (xlator_attrs == NULL)
+ xlator_attrs = &cmm_dfltxlatorattrs; /* set defaults */

xlator_object = kzalloc(sizeof(struct cmm_xlator), GFP_KERNEL);
if (xlator_object != NULL) {
xlator_object->hcmm_mgr = hcmm_mgr; /* ref back to CMM */
/* SM seg_id */
- xlator_object->ul_seg_id = pXlatorAttrs->ul_seg_id;
+ xlator_object->ul_seg_id = xlator_attrs->ul_seg_id;
} else {
status = -ENOMEM;
}
@@ -1007,7 +1007,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
/*
* ======== cmm_xlator_alloc_buf ========
*/
-void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *pVaBuf,
+void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
u32 uPaSize)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
@@ -1017,20 +1017,20 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *pVaBuf,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(xlator != NULL);
DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL);
- DBC_REQUIRE(pVaBuf != NULL);
+ DBC_REQUIRE(va_buf != NULL);
DBC_REQUIRE(uPaSize > 0);
DBC_REQUIRE(xlator_obj->ul_seg_id > 0);

if (xlator_obj) {
attrs.ul_seg_id = xlator_obj->ul_seg_id;
- *(volatile u32 *)pVaBuf = 0;
+ *(volatile u32 *)va_buf = 0;
/* Alloc SM */
pbuf =
cmm_calloc_buf(xlator_obj->hcmm_mgr, uPaSize, &attrs, NULL);
if (pbuf) {
/* convert to translator(node/strm) process Virtual
* address */
- *(volatile u32 **)pVaBuf =
+ *(volatile u32 **)va_buf =
(u32 *) cmm_xlator_translate(xlator,
pbuf, CMM_PA2VA);
}
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index ae44bed..d9501eb 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -360,13 +360,13 @@ int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *sz_name,
* Retrieve the entry point of a loaded DSP program image
*
*/
-int cod_get_entry(struct cod_manager *cod_mgr_obj, u32 *pulEntry)
+int cod_get_entry(struct cod_manager *cod_mgr_obj, u32 *entry_pt)
{
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj));
- DBC_REQUIRE(pulEntry != NULL);
+ DBC_REQUIRE(entry_pt != NULL);

- *pulEntry = cod_mgr_obj->ul_entry;
+ *entry_pt = cod_mgr_obj->ul_entry;

return 0;
}
@@ -397,7 +397,7 @@ int cod_get_loader(struct cod_manager *cod_mgr_obj,
* given the section name.
*/
int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
- OUT u32 *addr, OUT u32 *puLen)
+ OUT u32 *addr, OUT u32 *len)
{
struct cod_manager *cod_mgr_obj;
int status = 0;
@@ -407,19 +407,19 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
DBC_REQUIRE(str_sect != NULL);
DBC_REQUIRE(addr != NULL);
- DBC_REQUIRE(puLen != NULL);
+ DBC_REQUIRE(len != NULL);

*addr = 0;
- *puLen = 0;
+ *len = 0;
if (lib != NULL) {
cod_mgr_obj = lib->cod_mgr;
status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, str_sect,
- addr, puLen);
+ addr, len);
} else {
status = -ESPIPE;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*puLen == 0)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*len == 0)));

return status;
}
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 6808e4c..2d1b9d3 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -573,7 +573,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
* ======== dbll_load_sect ========
* Not supported for COFF.
*/
-int dbll_load_sect(struct dbll_library_obj *zl_lib, char *sectName,
+int dbll_load_sect(struct dbll_library_obj *zl_lib, char *sec_name,
struct dbll_attrs *attrs)
{
DBC_REQUIRE(zl_lib);
@@ -853,11 +853,11 @@ func_end:
* ======== dbll_unload_sect ========
* Not supported for COFF.
*/
-int dbll_unload_sect(struct dbll_library_obj *lib, char *sectName,
+int dbll_unload_sect(struct dbll_library_obj *lib, char *sec_name,
struct dbll_attrs *attrs)
{
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(sectName != NULL);
+ DBC_REQUIRE(sec_name != NULL);

return -ENOSYS;
}
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index a5cef43..992ff73 100755
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -66,7 +66,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
struct dcd_genericobj *gen_obj);
static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
-static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
+static char dsp_char2_gpp_char(char *word, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT u16 *num_libs,
@@ -534,7 +534,7 @@ func_end:
* ======== dcd_get_objects ========
*/
int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
- IN char *sz_coff_path, dcd_registerfxn registerFxn,
+ IN char *sz_coff_path, dcd_registerfxn register_fxn,
void *handle)
{
struct dcd_manager *dcd_mgr_obj = hdcd_mgr;
@@ -608,7 +608,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
object_type = atoi(token);

/*
- * Apply registerFxn to the found DCD object.
+ * Apply register_fxn to the found DCD object.
* Possible actions include:
*
* 1) Register found DCD object.
@@ -616,7 +616,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
* 3) Add overlay node.
*/
status =
- registerFxn(&dsp_uuid_obj, object_type, handle);
+ register_fxn(&dsp_uuid_obj, object_type, handle);
if (DSP_FAILED(status)) {
/* if error occurs, break from while loop. */
break;
@@ -1376,13 +1376,13 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size)
* Purpose:
* Convert DSP char to host GPP char in a portable manner
*/
-static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size)
+static char dsp_char2_gpp_char(char *word, s32 dsp_char_size)
{
char ch = '\0';
char *ch_src;
s32 i;

- for (ch_src = pWord, i = dsp_char_size; i > 0; i--)
+ for (ch_src = word, i = dsp_char_size; i > 0; i--)
ch |= *ch_src++;

return ch;
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 94285d1..cbf03ef 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -1037,12 +1037,12 @@ void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * physical_address)
* Purpose:
* Free the given block of physically contiguous memory.
*/
-void mem_free_phys_mem(void *pVirtualAddress, u32 physical_address,
+void mem_free_phys_mem(void *virtual_address, u32 physical_address,
u32 byte_size)
{
- DBC_REQUIRE(pVirtualAddress != NULL);
+ DBC_REQUIRE(virtual_address != NULL);

if (!ext_phys_mem_pool_enabled)
- dma_free_coherent(NULL, byte_size, pVirtualAddress,
+ dma_free_coherent(NULL, byte_size, virtual_address,
physical_address);
}
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index ac4dfaf..13be7ed 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -299,7 +299,7 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
char *symName, struct dbll_sym_val **sym);
static int load_lib(struct nldr_nodeobject *nldr_node_obj,
struct lib_node *root, struct dsp_uuid uuid,
- bool rootPersistent,
+ bool root_prstnt,
struct dbll_library_obj **lib_path,
enum nldr_phase phase, u16 depth);
static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
@@ -1243,7 +1243,7 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
*/
static int load_lib(struct nldr_nodeobject *nldr_node_obj,
struct lib_node *root, struct dsp_uuid uuid,
- bool rootPersistent,
+ bool root_prstnt,
struct dbll_library_obj **lib_path,
enum nldr_phase phase, u16 depth)
{
@@ -1300,7 +1300,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
kfree(psz_file_name);

/* Check to see if library not already loaded */
- if (DSP_SUCCEEDED(status) && rootPersistent) {
+ if (DSP_SUCCEEDED(status) && root_prstnt) {
lib_status =
find_in_persistent_lib_array(nldr_node_obj, root->lib);
/* Close library */
@@ -1374,7 +1374,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
/* If root library is NOT persistent, and dep library
* is, then record it. If root library IS persistent,
* the deplib is already included */
- if (!rootPersistent && persistent_dep_libs[i] &&
+ if (!root_prstnt && persistent_dep_libs[i] &&
*nldr_node_obj->pf_phase_split) {
if ((nldr_node_obj->pers_libs) >= MAXLIBS) {
status = -EILSEQ;
@@ -1386,7 +1386,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
&nldr_node_obj->pers_lib_table
[nldr_node_obj->pers_libs];
} else {
- if (rootPersistent)
+ if (root_prstnt)
persistent_dep_libs[i] = true;

/* Allocate library within phase */
@@ -1400,7 +1400,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,

if (DSP_SUCCEEDED(status)) {
if ((status != 0) &&
- !rootPersistent && persistent_dep_libs[i] &&
+ !root_prstnt && persistent_dep_libs[i] &&
*nldr_node_obj->pf_phase_split) {
(nldr_node_obj->pers_libs)++;
} else {
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 52cc4ed..922381f 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -246,7 +246,7 @@ static void fill_stream_def(struct node_object *hnode,
struct node_strmdef *pstrm_def,
struct dsp_strmattr *pattrs);
static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream);
-static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,
+static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
u32 uPhase);
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
@@ -1760,13 +1760,13 @@ int node_get_attr(struct node_object *hnode,
* host and a node.
*/
int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
- OUT u32 *pulId)
+ OUT u32 *chan_id)
{
enum node_type node_type;
int status = -EINVAL;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(dir == DSP_TONODE || dir == DSP_FROMNODE);
- DBC_REQUIRE(pulId != NULL);
+ DBC_REQUIRE(chan_id != NULL);

if (!hnode) {
status = -EFAULT;
@@ -1780,7 +1780,7 @@ int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
if (dir == DSP_TONODE) {
if (index < MAX_INPUTS(hnode)) {
if (hnode->inputs[index].type == HOSTCONNECT) {
- *pulId = hnode->inputs[index].dev_id;
+ *chan_id = hnode->inputs[index].dev_id;
status = 0;
}
}
@@ -1788,7 +1788,7 @@ int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
DBC_ASSERT(dir == DSP_FROMNODE);
if (index < MAX_OUTPUTS(hnode)) {
if (hnode->outputs[index].type == HOSTCONNECT) {
- *pulId = hnode->outputs[index].dev_id;
+ *chan_id = hnode->outputs[index].dev_id;
status = 0;
}
}
@@ -2818,7 +2818,7 @@ static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream)
* Purpose:
* Retrieves the address for create, execute or delete phase for a node.
*/
-static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,
+static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
u32 uPhase)
{
char *pstr_fxn_name = NULL;
@@ -2849,7 +2849,7 @@ static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,

status =
hnode_mgr->nldr_fxns.pfn_get_fxn_addr(hnode->nldr_node_obj,
- pstr_fxn_name, pulFxnAddr);
+ pstr_fxn_name, fxn_addr);

return status;
}
--
1.6.3.3

2010-07-08 23:12:23

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 05/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pArb to arb
pbAlreadyAttached to already_attached
pBaseAddr to base_addr
pbHostBuf to host_buff
pBufVa to buf_va
pChnlInfo to channel_info
pConfig to config_param
pContent to content
pContext to context
pdcdProps to dcd_prop
pDepLibUuids to dep_lib_uuids
pDevNodeString to dev_node_strg
pDispAttrs to disp_attrs
pDsp to dsp
pdwAutoStart to auto_start
pdwChnl to chnl
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 6 ++--
drivers/staging/tidspbridge/core/tiomap3430.c | 36 ++++++++++----------
drivers/staging/tidspbridge/core/tiomap_io.c | 16 ++++----
drivers/staging/tidspbridge/core/tiomap_io.h | 6 ++--
.../staging/tidspbridge/include/dspbridge/cfg.h | 6 ++--
.../staging/tidspbridge/include/dspbridge/cmm.h | 4 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 6 ++--
.../staging/tidspbridge/include/dspbridge/dev.h | 14 ++++----
.../staging/tidspbridge/include/dspbridge/disp.h | 6 ++--
.../staging/tidspbridge/include/dspbridge/drv.h | 12 +++---
.../tidspbridge/include/dspbridge/dspdefs.h | 10 +++---
.../staging/tidspbridge/include/dspbridge/io_sm.h | 16 ++++----
drivers/staging/tidspbridge/pmgr/cmm.c | 6 ++--
drivers/staging/tidspbridge/pmgr/cod.c | 4 +-
drivers/staging/tidspbridge/pmgr/dbll.c | 10 +++---
drivers/staging/tidspbridge/pmgr/dev.c | 14 ++++----
drivers/staging/tidspbridge/rmgr/dbdcd.c | 14 ++++----
drivers/staging/tidspbridge/rmgr/disp.c | 10 +++---
drivers/staging/tidspbridge/rmgr/drv.c | 14 ++++----
drivers/staging/tidspbridge/rmgr/node.c | 12 +++---
drivers/staging/tidspbridge/services/cfg.c | 10 +++---
22 files changed, 118 insertions(+), 118 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 362e01e..834172d 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -80,7 +80,7 @@ static void free_chirp_list(struct lst_list *pList);
static struct chnl_irp *make_new_chirp(void);

static int search_free_channel(struct chnl_mgr *chnl_mgr_obj,
- OUT u32 *pdwChnl);
+ OUT u32 *chnl);

/*
* ======== bridge_chnl_add_io_req ========
@@ -996,7 +996,7 @@ static struct chnl_irp *make_new_chirp(void)
* Search for a free channel slot in the array of channel pointers.
*/
static int search_free_channel(struct chnl_mgr *chnl_mgr_obj,
- OUT u32 *pdwChnl)
+ OUT u32 *chnl)
{
int status = -ENOSR;
u32 i;
@@ -1006,7 +1006,7 @@ static int search_free_channel(struct chnl_mgr *chnl_mgr_obj,
for (i = 0; i < chnl_mgr_obj->max_channels; i++) {
if (chnl_mgr_obj->ap_channel[i] == NULL) {
status = 0;
- *pdwChnl = i;
+ *chnl = i;
break;
}
}
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 31a7ff6..ff92d84 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -78,7 +78,7 @@
/* Forward Declarations: */
static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
static int bridge_brd_read(struct bridge_dev_context *dev_context,
- OUT u8 *pbHostBuf,
+ OUT u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
static int bridge_brd_start(struct bridge_dev_context *dev_context,
@@ -87,7 +87,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_context,
int *pdwState);
static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf,
+ IN u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
@@ -96,7 +96,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dsp_addr,
+ IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
@@ -107,7 +107,7 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
static int bridge_dev_create(OUT struct bridge_dev_context
**ppDevContext,
struct dev_object *hdev_obj,
- IN struct cfg_hostres *pConfig);
+ IN struct cfg_hostres *config_param);
static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
u32 dw_cmd, IN OUT void *pargs);
static int bridge_dev_destroy(struct bridge_dev_context *dev_context);
@@ -317,7 +317,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
* Reads buffers for DSP memory.
*/
static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
- OUT u8 *pbHostBuf, u32 dsp_addr,
+ OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -334,12 +334,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
dev_context->dw_internal_size) {
offset = dsp_addr - dev_context->dw_dsp_start_add;
} else {
- status = read_ext_dsp_data(dev_context, pbHostBuf, dsp_addr,
+ status = read_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType);
return status;
}
/* copy the data from DSP memory, */
- memcpy(pbHostBuf, (void *)(dsp_base_addr + offset), ul_num_bytes);
+ memcpy(host_buff, (void *)(dsp_base_addr + offset), ul_num_bytes);
return status;
}

@@ -778,7 +778,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
* Copies the buffers to DSP internal or external memory.
*/
static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
- IN u8 *pbHostBuf, u32 dsp_addr,
+ IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -790,10 +790,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
}
if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
- status = write_dsp_data(dev_ctxt, pbHostBuf, dsp_addr,
+ status = write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_num_bytes, ulMemType);
} else {
- status = write_ext_dsp_data(dev_context, pbHostBuf, dsp_addr,
+ status = write_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType, false);
}

@@ -807,12 +807,12 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
static int bridge_dev_create(OUT struct bridge_dev_context
**ppDevContext,
struct dev_object *hdev_obj,
- IN struct cfg_hostres *pConfig)
+ IN struct cfg_hostres *config_param)
{
int status = 0;
struct bridge_dev_context *dev_context = NULL;
s32 entry_ndx;
- struct cfg_hostres *resources = pConfig;
+ struct cfg_hostres *resources = config_param;
struct pg_table_attrs *pt_attrs;
u32 pg_tbl_pa;
u32 pg_tbl_va;
@@ -839,10 +839,10 @@ static int bridge_dev_create(OUT struct bridge_dev_context
}
dev_context->num_tlb_entries = 0;
dev_context->dw_dsp_base_addr = (u32) MEM_LINEAR_ADDRESS((void *)
- (pConfig->
+ (config_param->
dw_mem_base
[3]),
- pConfig->
+ config_param->
dw_mem_length
[3]);
if (!dev_context->dw_dsp_base_addr)
@@ -1162,7 +1162,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,

/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
- IN u8 *pbHostBuf, u32 dsp_addr,
+ IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -1176,16 +1176,16 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
if (dsp_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
status =
- write_dsp_data(dev_ctxt, pbHostBuf, dsp_addr,
+ write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_bytes, ulMemType);
} else {
- status = write_ext_dsp_data(dev_ctxt, pbHostBuf,
+ status = write_ext_dsp_data(dev_ctxt, host_buff,
dsp_addr, ul_bytes,
ulMemType, true);
}
ul_remain_bytes -= ul_bytes;
dsp_addr += ul_bytes;
- pbHostBuf = pbHostBuf + ul_bytes;
+ host_buff = host_buff + ul_bytes;
}
return status;
}
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 09daeaa..a314302 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -51,7 +51,7 @@ bool symbols_reloaded = true;
* Copies DSP external memory buffers to the host side buffers.
*/
int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
- OUT u8 *pbHostBuf, u32 dsp_addr,
+ OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
{
int status = 0;
@@ -168,7 +168,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
offset = dsp_addr - ul_ext_base;

if (DSP_SUCCEEDED(status))
- memcpy(pbHostBuf, (u8 *) dw_base_addr + offset, ul_num_bytes);
+ memcpy(host_buff, (u8 *) dw_base_addr + offset, ul_num_bytes);

return status;
}
@@ -179,7 +179,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
* Copies buffers to the DSP internal/external memory.
*/
int write_dsp_data(struct bridge_dev_context *dev_ctxt,
- IN u8 *pbHostBuf, u32 dsp_addr, u32 ul_num_bytes,
+ IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType)
{
u32 offset;
@@ -211,9 +211,9 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
return -EPERM;
}
if (ul_num_bytes)
- memcpy((u8 *) (dw_base_addr + offset), pbHostBuf, ul_num_bytes);
+ memcpy((u8 *) (dw_base_addr + offset), host_buff, ul_num_bytes);
else
- *((u32 *) pbHostBuf) = dw_base_addr + offset;
+ *((u32 *) host_buff) = dw_base_addr + offset;

return status;
}
@@ -225,7 +225,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
*
*/
int write_ext_dsp_data(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dsp_addr,
+ IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
bool dynamic_load)
{
@@ -371,10 +371,10 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
}
if (DSP_SUCCEEDED(ret)) {
if (ul_num_bytes)
- memcpy((u8 *) dw_base_addr + dw_offset, pbHostBuf,
+ memcpy((u8 *) dw_base_addr + dw_offset, host_buff,
ul_num_bytes);
else
- *((u32 *) pbHostBuf) = dw_base_addr + dw_offset;
+ *((u32 *) host_buff) = dw_base_addr + dw_offset;
}
/* Unmap here to force remap for other Ext loads */
if ((dynamic_load || trace_load) && dev_context->dw_dsp_ext_base_addr) {
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index b398f54..cff8691 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -48,14 +48,14 @@
* is configured by the combination of DSP MMU and shm Memory manager in the CDB
*/
extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
- OUT u8 *pbHostBuf, u32 dsp_addr,
+ OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
* ======== write_dsp_data ========
*/
extern int write_dsp_data(struct bridge_dev_context *dev_context,
- OUT u8 *pbHostBuf, u32 dsp_addr,
+ OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);

/*
@@ -65,7 +65,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
* shm Memory manager in the CDB
*/
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
- IN u8 *pbHostBuf, u32 dsp_addr,
+ IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
bool dynamic_load);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 58064e0..0eadd71 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -40,7 +40,7 @@ extern void cfg_exit(void);
* Retreive the autostart mask, if any, for this board.
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
- * pdwAutoStart: Ptr to location for 32 bit autostart mask.
+ * auto_start: Ptr to location for 32 bit autostart mask.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid.
@@ -48,10 +48,10 @@ extern void cfg_exit(void);
* Requires:
* CFG initialized.
* Ensures:
- * 0: *pdwAutoStart contains autostart mask for this devnode.
+ * 0: *auto_start contains autostart mask for this devnode.
*/
extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwAutoStart);
+ OUT u32 *auto_start);

/*
* ======== cfg_get_cd_version ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 5fbb051..d36972e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -325,7 +325,7 @@ extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator,
* Does not free client process VM.
* Parameters:
* xlator: handle to translator.
- * pBufVa Virtual address of PA to free.
+ * buf_va Virtual address of PA to free.
* Returns:
* 0: Success.
* -EFAULT: Bad translator handle.
@@ -334,7 +334,7 @@ extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator,
*
*/
extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
- void *pBufVa);
+ void *buf_va);

/*
* ======== cmm_xlator_info ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index ae711df..92f3cf7 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -279,7 +279,7 @@ extern bool cod_init(void);
* num_argc: number of arguments in the args array
* args: array of strings for arguments to DSP program
* write_fxn: board-specific function to write data to DSP system
- * pArb: arbitrary pointer to be passed as first arg to write_fxn
+ * arb: arbitrary pointer to be passed as first arg to write_fxn
* envp: array of environment strings for DSP exec.
* Returns:
* 0: Success.
@@ -295,7 +295,7 @@ extern bool cod_init(void);
*/
extern int cod_load_base(struct cod_manager *cod_mgr_obj,
u32 num_argc, char *args[],
- cod_writefxn pfn_write, void *pArb,
+ cod_writefxn pfn_write, void *arb,
char *envp[]);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index 6658b74..2a2b655 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -154,7 +154,7 @@ extern void dcd_exit(void);
* hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid for a library.
* num_libs: Size of uuid array (number of library uuids).
- * pDepLibUuids: Array of dependent library uuids to be filled in.
+ * dep_lib_uuids: Array of dependent library uuids to be filled in.
* pPersistentDepLibs: Array indicating if corresponding lib is persistent.
* phase: phase to obtain correct input library
* Returns:
@@ -166,13 +166,13 @@ extern void dcd_exit(void);
* DCD initialized.
* Valid hdcd_mgr.
* uuid_obj != NULL
- * pDepLibUuids != NULL.
+ * dep_lib_uuids != NULL.
* Ensures:
*/
extern int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
u16 num_libs,
- OUT struct dsp_uuid *pDepLibUuids,
+ OUT struct dsp_uuid *dep_lib_uuids,
OUT bool *pPersistentDepLibs,
IN enum nldr_phase phase);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 72d4591..2e18edf 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -37,10 +37,10 @@
* ======== dev_brd_write_fxn ========
* Purpose:
* Exported function to be used as the COD write function. This function
- * is passed a handle to a DEV_hObject by ZL in pArb, then calls the
+ * is passed a handle to a DEV_hObject by ZL in arb, then calls the
* device's bridge_brd_write() function.
* Parameters:
- * pArb: Handle to a Device Object.
+ * arb: Handle to a Device Object.
* dev_ctxt: Handle to Bridge driver defined device info.
* dsp_addr: Address on DSP board (Destination).
* pHostBuf: Pointer to host buffer (Source).
@@ -48,13 +48,13 @@
* ulMemType: Memory space on DSP to which to transfer.
* Returns:
* Number of bytes written. Returns 0 if the DEV_hObject passed in via
- * pArb is invalid.
+ * arb is invalid.
* Requires:
* DEV Initialized.
* pHostBuf != NULL
* Ensures:
*/
-extern u32 dev_brd_write_fxn(void *pArb,
+extern u32 dev_brd_write_fxn(void *arb,
u32 ulDspAddr,
void *pHostBuf, u32 ul_num_bytes, u32 mem_space);

@@ -585,7 +585,7 @@ extern int dev_is_locked(IN struct dev_object *hdev_obj);
extern int dev_insert_proc_object(IN struct dev_object
*hdev_obj,
IN u32 proc_obj,
- OUT bool *pbAlreadyAttached);
+ OUT bool *already_attached);

/*
* ======== dev_remove_proc_object ========
@@ -595,7 +595,7 @@ extern int dev_insert_proc_object(IN struct dev_object
* Parameters:
* p_proc_object: Ptr to ProcObject to insert.
* dev_obj: Ptr to Dev Object where the list is.
- * pbAlreadyAttached: Ptr to return the bool
+ * already_attached: Ptr to return the bool
* Returns:
* 0: If successful.
* -EPERM Failure to Remove the PROC Object from the list
@@ -604,7 +604,7 @@ extern int dev_insert_proc_object(IN struct dev_object
* proc_obj != 0
* dev_obj->proc_list != NULL
* !LST_IS_EMPTY(dev_obj->proc_list)
- * pbAlreadyAttached !=NULL
+ * already_attached !=NULL
* Ensures:
* Details:
* List will be deleted when the DEV is destroyed.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 2c63db9..59fb431 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -34,14 +34,14 @@
* Parameters:
* phDispObject: Location to store node dispatcher object on output.
* hdev_obj: Device for this processor.
- * pDispAttrs: Node dispatcher attributes.
+ * disp_attrs: Node dispatcher attributes.
* Returns:
* 0: Success;
* -ENOMEM: Insufficient memory for requested resources.
* -EPERM: Unable to create dispatcher.
* Requires:
* disp_init(void) called.
- * pDispAttrs != NULL.
+ * disp_attrs != NULL.
* hdev_obj != NULL.
* phDispObject != NULL.
* Ensures:
@@ -50,7 +50,7 @@
*/
extern int disp_create(OUT struct disp_object **phDispObject,
struct dev_object *hdev_obj,
- IN CONST struct disp_attr *pDispAttrs);
+ IN CONST struct disp_attr *disp_attrs);

/*
* ======== disp_delete ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 8289664..fb8afe4 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -382,7 +382,7 @@ extern int drv_remove_dev_object(struct drv_object *hdrv_obj,
* Assigns the Resources or Releases them.
* Parameters:
* dw_context: Path to the driver Registry Key.
- * pDevNodeString: Ptr to dev_node String stored in the Device Ext.
+ * dev_node_strg: Ptr to dev_node String stored in the Device Ext.
* Returns:
* TRUE if success; FALSE otherwise.
* Requires:
@@ -394,7 +394,7 @@ extern int drv_remove_dev_object(struct drv_object *hdrv_obj,
* later used by the CFG module.
*/
extern int drv_request_resources(IN u32 dw_context,
- OUT u32 *pDevNodeString);
+ OUT u32 *dev_node_strg);

/*
* ======== drv_release_resources ========
@@ -509,14 +509,14 @@ extern void mem_free_phys_mem(void *pVirtualAddress,
* Purpose:
* Unmap the linear address mapped in MEM_LINEAR_ADDRESS.
* Parameters:
- * pBaseAddr: Ptr to mapped memory (as returned by MEM_LINEAR_ADDRESS()).
+ * base_addr: Ptr to mapped memory (as returned by MEM_LINEAR_ADDRESS()).
* Returns:
* Requires:
* - MEM initialized.
- * - pBaseAddr is a valid linear address mapped in MEM_LINEAR_ADDRESS.
+ * - base_addr is a valid linear address mapped in MEM_LINEAR_ADDRESS.
* Ensures:
- * - pBaseAddr no longer points to a valid linear address.
+ * - base_addr no longer points to a valid linear address.
*/
-#define MEM_UNMAP_LINEAR_ADDRESS(pBaseAddr) {}
+#define MEM_UNMAP_LINEAR_ADDRESS(base_addr) {}

#endif /* DRV_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index cc9f520..92a6d5b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -560,7 +560,7 @@ typedef int(*fxn_chnl_flushio) (struct chnl_object *chnl_obj,
* if (pInfo != NULL).
*/
typedef int(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
- OUT struct chnl_info *pChnlInfo);
+ OUT struct chnl_info *channel_info);

/*
* ======== bridge_chnl_get_mgr_info ========
@@ -649,7 +649,7 @@ typedef int(*fxn_chnl_registernotify)
* Parameters:
* phDevContext: Ptr to location to store a Bridge device context.
* hdev_obj: Handle to a Device Object, created and managed by DSP API.
- * pConfig: Ptr to configuration parameters provided by the
+ * config_param: Ptr to configuration parameters provided by the
* Configuration Manager during device loading.
* pDspConfig: DSP resources, as specified in the registry key for this
* device.
@@ -659,9 +659,9 @@ typedef int(*fxn_chnl_registernotify)
* Requires:
* phDevContext != NULL;
* hdev_obj != NULL;
- * pConfig != NULL;
+ * config_param != NULL;
* pDspConfig != NULL;
- * Fields in pConfig and pDspConfig contain valid values.
+ * Fields in config_param and pDspConfig contain valid values.
* Ensures:
* 0: All Bridge driver specific DSP resource and other
* board context has been allocated.
@@ -683,7 +683,7 @@ typedef int(*fxn_dev_create) (OUT struct bridge_dev_context
struct dev_object
* hdev_obj,
IN struct cfg_hostres
- * pConfig);
+ * config_param);

/*
* ======== bridge_dev_ctrl ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index dbbda05..3f1e5bb 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -34,12 +34,12 @@
((((s32)&(((type *)0)->field)) / wordsize) + (u32)base)

/* Access can be different SM access word size (e.g. 16/32 bit words) */
-#define IO_SET_VALUE(pContext, type, base, field, value) (base->field = value)
-#define IO_GET_VALUE(pContext, type, base, field) (base->field)
-#define IO_OR_VALUE(pContext, type, base, field, value) (base->field |= value)
-#define IO_AND_VALUE(pContext, type, base, field, value) (base->field &= value)
-#define IO_SET_LONG(pContext, type, base, field, value) (base->field = value)
-#define IO_GET_LONG(pContext, type, base, field) (base->field)
+#define IO_SET_VALUE(context, type, base, field, value) (base->field = value)
+#define IO_GET_VALUE(context, type, base, field) (base->field)
+#define IO_OR_VALUE(context, type, base, field, value) (base->field |= value)
+#define IO_AND_VALUE(context, type, base, field, value) (base->field &= value)
+#define IO_SET_LONG(context, type, base, field, value) (base->field = value)
+#define IO_GET_LONG(context, type, base, field) (base->field)

#ifdef CONFIG_BRIDGE_DVFS
/* The maximum number of OPPs that are supported */
@@ -144,7 +144,7 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* uDDMAChnlId: DDMA channel identifier.
* uNumDesc: Number of buffer descriptors(equals # of IOReqs &
* Chirps)
- * pDsp: Dsp address;
+ * dsp: Dsp address;
* Returns:
* Requires:
* uDDMAChnlId < DDMA_MAXDDMACHNLS
@@ -155,7 +155,7 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* Ensures:
*/
extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 uDDMAChnlId,
- u32 uNumDesc, void *pDsp);
+ u32 uNumDesc, void *dsp);

/*
* ======== io_ddma_clear_chnl_desc ========
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index b302db5..ff1621c 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1044,19 +1044,19 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *pVaBuf,
* Free the given SM buffer and descriptor.
* Does not free virtual memory.
*/
-int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *pBufVa)
+int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = -EPERM;
void *buf_pa = NULL;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pBufVa != NULL);
+ DBC_REQUIRE(buf_va != NULL);
DBC_REQUIRE(xlator_obj->ul_seg_id > 0);

if (xlator_obj) {
/* convert Va to Pa so we can free it. */
- buf_pa = cmm_xlator_translate(xlator, pBufVa, CMM_VA2PA);
+ buf_pa = cmm_xlator_translate(xlator, buf_va, CMM_VA2PA);
if (buf_pa) {
status = cmm_free_buf(xlator_obj->hcmm_mgr, buf_pa,
xlator_obj->ul_seg_id);
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index 7682035..8317d03 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -493,7 +493,7 @@ bool cod_init(void)
* terminating args arrays, if num_argc is very large.
*/
int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
- cod_writefxn pfn_write, void *pArb, char *envp[])
+ cod_writefxn pfn_write, void *arb, char *envp[])
{
dbll_flags flags;
struct dbll_attrs save_attrs;
@@ -525,7 +525,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],

new_attrs = save_attrs;
new_attrs.write = (dbll_write_fxn) pfn_write;
- new_attrs.input_params = pArb;
+ new_attrs.input_params = arb;
new_attrs.alloc = (dbll_alloc_fxn) no_op;
new_attrs.free = (dbll_free_fxn) no_op;
new_attrs.log_write = NULL;
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 6a65bde..0afd6fc 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -728,7 +728,7 @@ func_cont:
* Get the content of a COFF section.
*/
int dbll_read_sect(struct dbll_library_obj *lib, char *name,
- char *pContent, u32 size)
+ char *content, u32 size)
{
struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib;
bool opened_doff = false;
@@ -740,7 +740,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
DBC_REQUIRE(name != NULL);
- DBC_REQUIRE(pContent != NULL);
+ DBC_REQUIRE(content != NULL);
DBC_REQUIRE(size != 0);

/* If DOFF file is not open, we open it. */
@@ -780,7 +780,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
if (ul_sect_size > size) {
status = -EPERM;
} else {
- if (!dload_get_section(zl_lib->desc, sect, pContent))
+ if (!dload_get_section(zl_lib->desc, sect, content))
status = -EBADF;

}
@@ -790,8 +790,8 @@ func_cont:
opened_doff = false;
}

- dev_dbg(bridge, "%s: lib: %p name: %s pContent: %p size: 0x%x, "
- "status 0x%x\n", __func__, lib, name, pContent, size, status);
+ dev_dbg(bridge, "%s: lib: %p name: %s content: %p size: 0x%x, "
+ "status 0x%x\n", __func__, lib, name, content, size, status);
return status;
}

diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index c90de57..3b82d29 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -99,10 +99,10 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* is passed a handle to a DEV_hObject, then calls the
* device's bridge_brd_write() function.
*/
-u32 dev_brd_write_fxn(void *pArb, u32 ulDspAddr, void *pHostBuf,
+u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *pHostBuf,
u32 ul_num_bytes, u32 mem_space)
{
- struct dev_object *dev_obj = (struct dev_object *)pArb;
+ struct dev_object *dev_obj = (struct dev_object *)arb;
u32 ul_written = 0;
int status;

@@ -962,20 +962,20 @@ static int init_cod_mgr(struct dev_object *dev_obj)
* Parameters:
* p_proc_object: Ptr to ProcObject to insert.
* dev_obj: Ptr to Dev Object where the list is.
- * pbAlreadyAttached: Ptr to return the bool
+ * already_attached: Ptr to return the bool
* Returns:
* 0: If successful.
* Requires:
* List Exists
* hdev_obj is Valid handle
* DEV Initialized
- * pbAlreadyAttached != NULL
+ * already_attached != NULL
* proc_obj != 0
* Ensures:
* 0 and List is not Empty.
*/
int dev_insert_proc_object(struct dev_object *hdev_obj,
- u32 proc_obj, OUT bool *pbAlreadyAttached)
+ u32 proc_obj, OUT bool *already_attached)
{
int status = 0;
struct dev_object *dev_obj = (struct dev_object *)hdev_obj;
@@ -984,9 +984,9 @@ int dev_insert_proc_object(struct dev_object *hdev_obj,
DBC_REQUIRE(dev_obj);
DBC_REQUIRE(proc_obj != 0);
DBC_REQUIRE(dev_obj->proc_list != NULL);
- DBC_REQUIRE(pbAlreadyAttached != NULL);
+ DBC_REQUIRE(already_attached != NULL);
if (!LST_IS_EMPTY(dev_obj->proc_list))
- *pbAlreadyAttached = true;
+ *already_attached = true;

/* Add DevObject to tail. */
lst_put_tail(dev_obj->proc_list, (struct list_head *)proc_obj);
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 9d05166..be98c4c 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -71,7 +71,7 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT u16 *pNumLibs,
OPTIONAL OUT u16 *pNumPersLibs,
- OPTIONAL OUT struct dsp_uuid *pDepLibUuids,
+ OPTIONAL OUT struct dsp_uuid *dep_lib_uuids,
OPTIONAL OUT bool *pPersistentDepLibs,
IN enum nldr_phase phase);

@@ -327,7 +327,7 @@ void dcd_exit(void)
*/
int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- u16 num_libs, OUT struct dsp_uuid *pDepLibUuids,
+ u16 num_libs, OUT struct dsp_uuid *dep_lib_uuids,
OUT bool *pPersistentDepLibs,
IN enum nldr_phase phase)
{
@@ -336,11 +336,11 @@ int dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hdcd_mgr);
DBC_REQUIRE(uuid_obj != NULL);
- DBC_REQUIRE(pDepLibUuids != NULL);
+ DBC_REQUIRE(dep_lib_uuids != NULL);
DBC_REQUIRE(pPersistentDepLibs != NULL);

status =
- get_dep_lib_info(hdcd_mgr, uuid_obj, &num_libs, NULL, pDepLibUuids,
+ get_dep_lib_info(hdcd_mgr, uuid_obj, &num_libs, NULL, dep_lib_uuids,
pPersistentDepLibs, phase);

return status;
@@ -1393,7 +1393,7 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT u16 *pNumLibs,
OPTIONAL OUT u16 *pNumPersLibs,
- OPTIONAL OUT struct dsp_uuid *pDepLibUuids,
+ OPTIONAL OUT struct dsp_uuid *dep_lib_uuids,
OPTIONAL OUT bool *pPersistentDepLibs,
enum nldr_phase phase)
{
@@ -1407,7 +1407,7 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
u32 dw_data_size = COD_MAXPATHLENGTH;
char seps[] = ", ";
char *token = NULL;
- bool get_uuids = (pDepLibUuids != NULL);
+ bool get_uuids = (dep_lib_uuids != NULL);
u16 dep_libs = 0;
int status = 0;

@@ -1476,7 +1476,7 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
} else {
/* Retrieve UUID string. */
uuid_uuid_from_string(token,
- &(pDepLibUuids
+ &(dep_lib_uuids
[dep_libs]));
/* Is this library persistent? */
token = strsep(&psz_cur, seps);
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index 1bcd403..5f51d50 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -89,7 +89,7 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
*/
int disp_create(OUT struct disp_object **phDispObject,
struct dev_object *hdev_obj,
- IN CONST struct disp_attr *pDispAttrs)
+ IN CONST struct disp_attr *disp_attrs)
{
struct disp_object *disp_obj;
struct bridge_drv_interface *intf_fxns;
@@ -100,7 +100,7 @@ int disp_create(OUT struct disp_object **phDispObject,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phDispObject != NULL);
- DBC_REQUIRE(pDispAttrs != NULL);
+ DBC_REQUIRE(disp_attrs != NULL);
DBC_REQUIRE(hdev_obj != NULL);

*phDispObject = NULL;
@@ -142,14 +142,14 @@ int disp_create(OUT struct disp_object **phDispObject,
/* Open channels for communicating with the RMS */
chnl_attr_obj.uio_reqs = CHNLIOREQS;
chnl_attr_obj.event_obj = NULL;
- ul_chnl_id = pDispAttrs->ul_chnl_offset + CHNLTORMSOFFSET;
+ ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLTORMSOFFSET;
status = (*intf_fxns->pfn_chnl_open) (&(disp_obj->chnl_to_dsp),
disp_obj->hchnl_mgr,
CHNL_MODETODSP, ul_chnl_id,
&chnl_attr_obj);

if (DSP_SUCCEEDED(status)) {
- ul_chnl_id = pDispAttrs->ul_chnl_offset + CHNLFROMRMSOFFSET;
+ ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLFROMRMSOFFSET;
status =
(*intf_fxns->pfn_chnl_open) (&(disp_obj->chnl_from_dsp),
disp_obj->hchnl_mgr,
@@ -158,7 +158,7 @@ int disp_create(OUT struct disp_object **phDispObject,
}
if (DSP_SUCCEEDED(status)) {
/* Allocate buffer for commands, replies */
- disp_obj->ul_bufsize = pDispAttrs->ul_chnl_buf_size;
+ disp_obj->ul_bufsize = disp_attrs->ul_chnl_buf_size;
disp_obj->ul_bufsize_rms = RMS_COMMANDBUFSIZE;
disp_obj->pbuf = kzalloc(disp_obj->ul_bufsize, GFP_KERNEL);
if (disp_obj->pbuf == NULL)
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 2cd2a6f..50c0dc7 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -730,14 +730,14 @@ int drv_remove_dev_object(struct drv_object *driver_obj,
* Purpose:
* Requests resources from the OS.
*/
-int drv_request_resources(u32 dw_context, u32 *pDevNodeString)
+int drv_request_resources(u32 dw_context, u32 *dev_node_strg)
{
int status = 0;
struct drv_object *pdrv_object;
struct drv_ext *pszdev_node;

DBC_REQUIRE(dw_context != 0);
- DBC_REQUIRE(pDevNodeString != NULL);
+ DBC_REQUIRE(dev_node_strg != NULL);

/*
* Allocate memory to hold the string. This will live untill
@@ -754,22 +754,22 @@ int drv_request_resources(u32 dw_context, u32 *pDevNodeString)
(char *)dw_context, MAXREGPATHLENGTH - 1);
pszdev_node->sz_string[MAXREGPATHLENGTH - 1] = '\0';
/* Update the Driver Object List */
- *pDevNodeString = (u32) pszdev_node->sz_string;
+ *dev_node_strg = (u32) pszdev_node->sz_string;
lst_put_tail(pdrv_object->dev_node_string,
(struct list_head *)pszdev_node);
} else {
status = -ENOMEM;
- *pDevNodeString = 0;
+ *dev_node_strg = 0;
}
} else {
dev_dbg(bridge, "%s: Failed to get Driver Object from Registry",
__func__);
- *pDevNodeString = 0;
+ *dev_node_strg = 0;
}

- DBC_ENSURE((DSP_SUCCEEDED(status) && pDevNodeString != NULL &&
+ DBC_ENSURE((DSP_SUCCEEDED(status) && dev_node_strg != NULL &&
!LST_IS_EMPTY(pdrv_object->dev_node_string)) ||
- (DSP_FAILED(status) && *pDevNodeString == 0));
+ (DSP_FAILED(status) && *dev_node_strg == 0));

return status;
}
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 69c1284..9c2ea15 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -251,7 +251,7 @@ static int get_fxn_address(struct node_object *hnode, u32 * pulFxnAddr,
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
CONST struct dsp_uuid *pNodeId,
- struct dcd_genericobj *pdcdProps);
+ struct dcd_genericobj *dcd_prop);
static int get_proc_props(struct node_mgr *hnode_mgr,
struct dev_object *hdev_obj);
static int get_rms_fxns(struct node_mgr *hnode_mgr);
@@ -2890,19 +2890,19 @@ void get_node_info(struct node_object *hnode, struct dsp_nodeinfo *pNodeInfo)
static int get_node_props(struct dcd_manager *hdcd_mgr,
struct node_object *hnode,
CONST struct dsp_uuid *pNodeId,
- struct dcd_genericobj *pdcdProps)
+ struct dcd_genericobj *dcd_prop)
{
u32 len;
struct node_msgargs *pmsg_args;
struct node_taskargs *task_arg_obj;
enum node_type node_type = NODE_TASK;
struct dsp_ndbprops *pndb_props =
- &(pdcdProps->obj_data.node_obj.ndb_props);
+ &(dcd_prop->obj_data.node_obj.ndb_props);
int status = 0;
char sz_uuid[MAXUUIDLEN];

status = dcd_get_object_def(hdcd_mgr, (struct dsp_uuid *)pNodeId,
- DSP_DCDNODETYPE, pdcdProps);
+ DSP_DCDNODETYPE, dcd_prop);

if (DSP_SUCCEEDED(status)) {
hnode->ntype = node_type = pndb_props->ntype;
@@ -2916,9 +2916,9 @@ static int get_node_props(struct dcd_manager *hdcd_mgr,
if (node_type != NODE_DEVICE) {
pmsg_args = &(hnode->create_args.asa.node_msg_args);
pmsg_args->seg_id =
- pdcdProps->obj_data.node_obj.msg_segid;
+ dcd_prop->obj_data.node_obj.msg_segid;
pmsg_args->notify_type =
- pdcdProps->obj_data.node_obj.msg_notify_type;
+ dcd_prop->obj_data.node_obj.msg_notify_type;
pmsg_args->max_msgs = pndb_props->message_depth;
dev_dbg(bridge, "(node) Max Number of Messages: 0x%x\n",
pmsg_args->max_msgs);
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 243fea9..cc138f7 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -50,22 +50,22 @@ void cfg_exit(void)
* Retreive the autostart mask, if any, for this board.
*/
int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwAutoStart)
+ OUT u32 *auto_start)
{
int status = 0;
u32 dw_buf_size;
struct drv_data *drv_datap = dev_get_drvdata(bridge);

- dw_buf_size = sizeof(*pdwAutoStart);
+ dw_buf_size = sizeof(*auto_start);
if (!dev_node_obj)
status = -EFAULT;
- if (!pdwAutoStart || !drv_datap)
+ if (!auto_start || !drv_datap)
status = -EFAULT;
if (DSP_SUCCEEDED(status))
- *pdwAutoStart = (drv_datap->base_img) ? 1 : 0;
+ *auto_start = (drv_datap->base_img) ? 1 : 0;

DBC_ENSURE((status == 0 &&
- (*pdwAutoStart == 0 || *pdwAutoStart == 1))
+ (*auto_start == 0 || *auto_start == 1))
|| status != 0);
return status;
}
--
1.6.3.3

2010-07-08 23:13:35

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 11/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pstrFxn to str_fxn
pstrLibName to str_lib_name
pstrSect to str_sect
pstrSym to str_sym
pstrZLFileName to str_zl_file_name
pstrZLFile to str_zl_file
pszCoffPath to sz_coff_path
pszMode to sz_mode
pszName to sz_name
pszSectName to sz_sect_name
pszUuid to sz_uuid
pszZlDllName to sz_zl_dll_name
puAddr to addr
pulAddr to addr
pulBufSize to buff_size
pulBytes to nbytes
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/gen/uuidutil.c | 10 ++--
.../staging/tidspbridge/include/dspbridge/cfg.h | 8 +-
.../staging/tidspbridge/include/dspbridge/cod.h | 50 ++++++++--------
.../staging/tidspbridge/include/dspbridge/dbdcd.h | 24 ++++----
.../tidspbridge/include/dspbridge/dblldefs.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dev.h | 6 +-
.../staging/tidspbridge/include/dspbridge/nldr.h | 2 +-
.../tidspbridge/include/dspbridge/nldrdefs.h | 10 ++--
.../staging/tidspbridge/include/dspbridge/strm.h | 10 ++--
.../tidspbridge/include/dspbridge/uuidutil.h | 16 +++---
drivers/staging/tidspbridge/pmgr/cod.c | 64 ++++++++++----------
drivers/staging/tidspbridge/pmgr/dev.c | 6 +-
drivers/staging/tidspbridge/rmgr/dbdcd.c | 32 +++++-----
drivers/staging/tidspbridge/rmgr/nldr.c | 20 +++---
drivers/staging/tidspbridge/rmgr/strm.c | 14 ++--
15 files changed, 138 insertions(+), 138 deletions(-)

diff --git a/drivers/staging/tidspbridge/gen/uuidutil.c b/drivers/staging/tidspbridge/gen/uuidutil.c
index ce9319d..a56b2c6 100644
--- a/drivers/staging/tidspbridge/gen/uuidutil.c
+++ b/drivers/staging/tidspbridge/gen/uuidutil.c
@@ -36,14 +36,14 @@
* Note: snprintf format specifier is:
* %[flags] [width] [.precision] [{h | l | I64 | L}]type
*/
-void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
+void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *sz_uuid,
IN s32 size)
{
s32 i; /* return result from snprintf. */

- DBC_REQUIRE(uuid_obj && pszUuid);
+ DBC_REQUIRE(uuid_obj && sz_uuid);

- i = snprintf(pszUuid, size,
+ i = snprintf(sz_uuid, size,
"%.8X_%.4X_%.4X_%.2X%.2X_%.2X%.2X%.2X%.2X%.2X%.2X",
uuid_obj->ul_data1, uuid_obj->us_data2, uuid_obj->us_data3,
uuid_obj->uc_data4, uuid_obj->uc_data5,
@@ -116,12 +116,12 @@ static int htoi(char c)
* Purpose:
* Converts a string to a struct dsp_uuid.
*/
-void uuid_uuid_from_string(IN char *pszUuid, OUT struct dsp_uuid *uuid_obj)
+void uuid_uuid_from_string(IN char *sz_uuid, OUT struct dsp_uuid *uuid_obj)
{
char c;
s32 i, j;
s32 result;
- char *temp = pszUuid;
+ char *temp = sz_uuid;

result = 0;
for (i = 0; i < 8; i++) {
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 98cadb1..1422ed0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -155,20 +155,20 @@ extern void cfg_get_perf_value(OUT bool *enable_perf);
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
- * pstrZLFileName: Ptr to character buf to hold ZLFileName.
+ * str_zl_file_name: Ptr to character buf to hold ZLFileName.
* Returns:
* 0: Success.
- * -EFAULT: pstrZLFileName is invalid or dev_node_obj is invalid.
+ * -EFAULT: str_zl_file_name is invalid or dev_node_obj is invalid.
* -ENODATA: couldn't find the ZLFileName.
* Requires:
* CFG initialized.
* Ensures:
* 0: Not more than buf_size bytes were copied into
- * pstrZLFileName, and *pstrZLFileName contains ZLFileName
+ * str_zl_file_name, and *str_zl_file_name contains ZLFileName
* for this devnode.
*/
extern int cfg_get_zl_file(IN struct cfg_devnode *dev_node_obj,
- IN u32 buf_size, OUT char *pstrZLFileName);
+ IN u32 buf_size, OUT char *str_zl_file_name);

/*
* ======== cfg_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index f8cbb21..c84761e 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -78,7 +78,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* using the cod_get_sym_value() function.
* Parameters:
* manager: created manager object
- * pstrZLFile: ZL DLL filename, of length < COD_MAXPATHLENGTH.
+ * str_zl_file: ZL DLL filename, of length < COD_MAXPATHLENGTH.
* attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used.
* Returns:
@@ -88,11 +88,11 @@ extern void cod_close(struct cod_libraryobj *lib);
* non default values of attrs.
* Requires:
* COD module initialized.
- * pstrZLFile != NULL
+ * str_zl_file != NULL
* Ensures:
*/
extern int cod_create(OUT struct cod_manager **manager,
- char *pstrZLFile,
+ char *str_zl_file,
IN OPTIONAL CONST struct cod_attrs *attrs);

/*
@@ -149,7 +149,7 @@ extern int cod_get_base_lib(struct cod_manager *cod_mgr_obj,
* Get the name of the base image DBL library.
* Parameters:
* cod_mgr_obj: handle of manager to be deleted
- * pszName: location to store library name on output.
+ * sz_name: location to store library name on output.
* usize: size of name buffer.
* Returns:
* 0: Success.
@@ -157,11 +157,11 @@ extern int cod_get_base_lib(struct cod_manager *cod_mgr_obj,
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pszName != NULL.
+ * sz_name != NULL.
* Ensures:
*/
extern int cod_get_base_name(struct cod_manager *cod_mgr_obj,
- char *pszName, u32 usize);
+ char *sz_name, u32 usize);

/*
* ======== cod_get_entry ========
@@ -206,8 +206,8 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* given the section name.
* Parameters:
* lib Library handle returned from cod_open().
- * pstrSect: name of the section, with or without leading "."
- * puAddr: Location to store address.
+ * str_sect: name of the section, with or without leading "."
+ * addr: Location to store address.
* puLen: Location to store length.
* Returns:
* 0: Success
@@ -216,18 +216,18 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pstrSect != NULL;
- * puAddr != NULL;
+ * str_sect != NULL;
+ * addr != NULL;
* puLen != NULL;
* Ensures:
- * 0: *puAddr and *puLen contain the address and length of the
+ * 0: *addr and *puLen contain the address and length of the
* section.
- * else: *puAddr == 0 and *puLen == 0;
+ * else: *addr == 0 and *puLen == 0;
*
*/
extern int cod_get_section(struct cod_libraryobj *lib,
- IN char *pstrSect,
- OUT u32 *puAddr, OUT u32 *puLen);
+ IN char *str_sect,
+ OUT u32 *addr, OUT u32 *puLen);

/*
* ======== cod_get_sym_value ========
@@ -246,12 +246,12 @@ extern int cod_get_section(struct cod_libraryobj *lib,
* Requires:
* COD module initialized.
* Valid cod_mgr_obj.
- * pstrSym != NULL.
+ * str_sym != NULL.
* pul_value != NULL.
* Ensures:
*/
extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj,
- IN char *pstrSym, OUT u32 * pul_value);
+ IN char *str_sym, OUT u32 * pul_value);

/*
* ======== cod_init ========
@@ -304,7 +304,7 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj,
* Open a library for reading sections. Does not load or set the base.
* Parameters:
* hmgr: manager to load the code with
- * pszCoffPath: Coff file to open.
+ * sz_coff_path: Coff file to open.
* flags: COD_NOLOAD (don't load symbols) or COD_SYMB (load
* symbols).
* lib_obj: Handle returned that can be used in calls to cod_close
@@ -316,11 +316,11 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj,
* COD module initialized.
* hmgr is valid.
* flags == COD_NOLOAD || flags == COD_SYMB.
- * pszCoffPath != NULL.
+ * sz_coff_path != NULL.
* Ensures:
*/
extern int cod_open(struct cod_manager *hmgr,
- IN char *pszCoffPath,
+ IN char *sz_coff_path,
u32 flags, OUT struct cod_libraryobj **lib_obj);

/*
@@ -329,7 +329,7 @@ extern int cod_open(struct cod_manager *hmgr,
* Open base image for reading sections. Does not load the base.
* Parameters:
* hmgr: manager to load the code with
- * pszCoffPath: Coff file to open.
+ * sz_coff_path: Coff file to open.
* flags: Specifies whether to load symbols.
* Returns:
* 0: Success.
@@ -337,10 +337,10 @@ extern int cod_open(struct cod_manager *hmgr,
* Requires:
* COD module initialized.
* hmgr is valid.
- * pszCoffPath != NULL.
+ * sz_coff_path != NULL.
* Ensures:
*/
-extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
+extern int cod_open_base(struct cod_manager *hmgr, IN char *sz_coff_path,
dbll_flags flags);

/*
@@ -349,7 +349,7 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Retrieve the content of a code section given the section name.
* Parameters:
* cod_mgr_obj - manager in which to search for the symbol
- * pstrSect - name of the section, with or without leading "."
+ * str_sect - name of the section, with or without leading "."
* str_content - buffer to store content of the section.
* Returns:
* 0: on success, error code on failure
@@ -357,13 +357,13 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pstrSect != NULL;
+ * str_sect != NULL;
* str_content != NULL;
* Ensures:
* 0: *str_content stores the content of the named section.
*/
extern int cod_read_section(struct cod_libraryobj *lib,
- IN char *pstrSect,
+ IN char *str_sect,
OUT char *str_content, IN u32 content_size);

#endif /* COD_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
index 8d1fc68..c798e72 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
@@ -30,7 +30,7 @@
* special COFF section called ".dcd_register"
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing DCD
+ * sz_coff_path: Pointer to name of COFF file containing DCD
* objects to be registered.
* Returns:
* 0: Success.
@@ -45,7 +45,7 @@
* ".dcd_register", which is used for auto registration.
*/
extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath);
+ IN char *sz_coff_path);

/*
* ======== dcd_auto_unregister ========
@@ -54,7 +54,7 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* special COFF section called ".dcd_register"
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing
+ * sz_coff_path: Pointer to name of COFF file containing
* DCD objects to be unregistered.
* Returns:
* 0: Success.
@@ -69,14 +69,14 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* ".dcd_register", which is used for auto unregistration.
*/
extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath);
+ IN char *sz_coff_path);

/*
* ======== dcd_create_manager ========
* Purpose:
* This function creates a DCD module manager.
* Parameters:
- * pszZlDllName: Pointer to a DLL name string.
+ * sz_zl_dll_name: Pointer to a DLL name string.
* dcd_mgr: A pointer to a DCD manager handle.
* Returns:
* 0: Success.
@@ -84,12 +84,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* -EPERM: General failure.
* Requires:
* DCD initialized.
- * pszZlDllName is non-NULL.
+ * sz_zl_dll_name is non-NULL.
* dcd_mgr is non-NULL.
* Ensures:
* A DCD manager handle is created.
*/
-extern int dcd_create_manager(IN char *pszZlDllName,
+extern int dcd_create_manager(IN char *sz_zl_dll_name,
OUT struct dcd_manager **dcd_mgr);

/*
@@ -214,7 +214,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object.
- * pstrLibName: Buffer to hold library name.
+ * str_lib_name: Buffer to hold library name.
* buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load
* phase_split: Are phases in multiple libraries
@@ -224,14 +224,14 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Requires:
* DCD initialized.
* Valid hdcd_mgr.
- * pstrLibName != NULL.
+ * str_lib_name != NULL.
* uuid_obj != NULL
* buff_size != NULL.
* Ensures:
*/
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName,
+ IN OUT char *str_lib_name,
IN OUT u32 *buff_size,
IN enum nldr_phase phase,
OUT bool *phase_split);
@@ -276,7 +276,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
* unregister nodes from the node database, and 3) add overlay nodes.
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing DCD
+ * sz_coff_path: Pointer to name of COFF file containing DCD
* objects.
* registerFxn: Callback fxn to be applied on each located
* DCD object.
@@ -295,7 +295,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
* ".dcd_register", which is used for auto registration.
*/
extern int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath,
+ IN char *sz_coff_path,
dcd_registerfxn registerFxn, void *handle);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index b827320..8446e0e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -368,7 +368,7 @@ typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
* Ensures:
*/
typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
- char *pszSectName,
+ char *sz_sect_name,
struct dbll_attrs *attrs);

/*
@@ -471,7 +471,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,
* Ensures:
*/
typedef int(*dbll_unload_sect_fxn) (struct dbll_library_obj *lib,
- char *pszSectName,
+ char *sz_sect_name,
struct dbll_attrs *attrs);

struct dbll_fxns {
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index d658df5..0cdbcb2 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -475,7 +475,7 @@ extern int dev_get_node_manager(struct dev_object
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * pstrSym: Name of symbol to look up.
+ * str_sym: Name of symbol to look up.
* pul_value: Ptr to symbol value.
* Returns:
* 0: Success.
@@ -483,14 +483,14 @@ extern int dev_get_node_manager(struct dev_object
* -ESPIPE: Symbols couldn not be found or have not been loaded onto
* the board.
* Requires:
- * pstrSym != NULL.
+ * str_sym != NULL.
* pul_value != NULL.
* DEV Initialized.
* Ensures:
* 0: *pul_value contains the symbol value;
*/
extern int dev_get_symbol(struct dev_object *hdev_obj,
- IN CONST char *pstrSym, OUT u32 * pul_value);
+ IN CONST char *str_sym, OUT u32 * pul_value);

/*
* ======== dev_get_bridge_context ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index 2f2d637..56ca10c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -39,7 +39,7 @@ extern void nldr_delete(struct nldr_object *nldr_obj);
extern void nldr_exit(void);

extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
- char *pstrFxn, u32 * pulAddr);
+ char *str_fxn, u32 * addr);

extern int nldr_get_rmm_manager(struct nldr_object *nldr,
OUT struct rmm_target_obj **rmm_mgr);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index e15ef67..ed20dc0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -210,21 +210,21 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj);
*
* Parameters:
* nldr_node_obj: Handle returned from nldr_allocate().
- * pstrFxn: Name of function.
- * pulAddr: Location to store function address.
+ * str_fxn: Name of function.
+ * addr: Location to store function address.
* Returns:
* 0: Success.
* -ESPIPE: Address of function not found.
* Requires:
* nldr_init(void) called.
* Valid nldr_node_obj.
- * pulAddr != NULL;
- * pstrFxn != NULL;
+ * addr != NULL;
+ * str_fxn != NULL;
* Ensures:
*/
typedef int(*nldr_getfxnaddrfxn) (struct nldr_nodeobject
* nldr_node_obj,
- char *pstrFxn, u32 * pulAddr);
+ char *str_fxn, u32 * addr);

/*
* ======== nldr_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/strm.h b/drivers/staging/tidspbridge/include/dspbridge/strm.h
index 6572442..e028518 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/strm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/strm.h
@@ -303,9 +303,9 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj,
* Parameters:
* stream_obj: Stream handle returned from strm_open().
* buf_ptr: Location to store pointer to reclaimed buffer.
- * pulBytes: Location where number of bytes of data in the
+ * nbytes: Location where number of bytes of data in the
* buffer will be written.
- * pulBufSize: Location where actual buffer size will be written.
+ * buff_size: Location where actual buffer size will be written.
* pdw_arg: Location where user argument that travels with
* the buffer will be written.
* Returns:
@@ -317,13 +317,13 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj,
* Requires:
* strm_init(void) called.
* buf_ptr != NULL.
- * pulBytes != NULL.
+ * nbytes != NULL.
* pdw_arg != NULL.
* Ensures:
*/
extern int strm_reclaim(struct strm_object *stream_obj,
- OUT u8 **buf_ptr, u32 * pulBytes,
- u32 *pulBufSize, u32 *pdw_arg);
+ OUT u8 **buf_ptr, u32 * nbytes,
+ u32 *buff_size, u32 *pdw_arg);

/*
* ======== strm_register_notify ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/uuidutil.h b/drivers/staging/tidspbridge/include/dspbridge/uuidutil.h
index d7d0962..dde76c9 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/uuidutil.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/uuidutil.h
@@ -27,18 +27,18 @@
* Converts a dsp_uuid to an ANSI string.
* Parameters:
* uuid_obj: Pointer to a dsp_uuid object.
- * pszUuid: Pointer to a buffer to receive a NULL-terminated UUID
+ * sz_uuid: Pointer to a buffer to receive a NULL-terminated UUID
* string.
- * size: Maximum size of the pszUuid string.
+ * size: Maximum size of the sz_uuid string.
* Returns:
* Requires:
- * uuid_obj & pszUuid are non-NULL values.
+ * uuid_obj & sz_uuid are non-NULL values.
* Ensures:
- * Lenghth of pszUuid is less than MAXUUIDLEN.
+ * Lenghth of sz_uuid is less than MAXUUIDLEN.
* Details:
* UUID string limit currently set at MAXUUIDLEN.
*/
-void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
+void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *sz_uuid,
s32 size);

/*
@@ -46,17 +46,17 @@ void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
* Purpose:
* Converts an ANSI string to a dsp_uuid.
* Parameters:
- * pszUuid: Pointer to a string that represents a dsp_uuid object.
+ * sz_uuid: Pointer to a string that represents a dsp_uuid object.
* uuid_obj: Pointer to a dsp_uuid object.
* Returns:
* Requires:
- * uuid_obj & pszUuid are non-NULL values.
+ * uuid_obj & sz_uuid are non-NULL values.
* Ensures:
* Details:
* We assume the string representation of a UUID has the following format:
* "12345678_1234_1234_1234_123456789abc".
*/
-extern void uuid_uuid_from_string(IN char *pszUuid,
+extern void uuid_uuid_from_string(IN char *sz_uuid,
OUT struct dsp_uuid *uuid_obj);

#endif /* UUIDUTIL_ */
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index e4fc065..ae44bed 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -109,7 +109,7 @@ static s32 cod_f_close(struct file *filp)
return 0;
}

-static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode)
+static struct file *cod_f_open(CONST char *psz_file_name, CONST char *sz_mode)
{
mm_segment_t fs;
struct file *filp;
@@ -337,17 +337,17 @@ int cod_get_base_lib(struct cod_manager *cod_mgr_obj,
/*
* ======== cod_get_base_name ========
*/
-int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *pszName,
+int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *sz_name,
u32 usize)
{
int status = 0;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj));
- DBC_REQUIRE(pszName != NULL);
+ DBC_REQUIRE(sz_name != NULL);

if (usize <= COD_MAXPATHLENGTH)
- strncpy(pszName, cod_mgr_obj->sz_zl_file, usize);
+ strncpy(sz_name, cod_mgr_obj->sz_zl_file, usize);
else
status = -EPERM;

@@ -396,8 +396,8 @@ int cod_get_loader(struct cod_manager *cod_mgr_obj,
* Retrieve the starting address and length of a section in the COFF file
* given the section name.
*/
-int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
- OUT u32 *puAddr, OUT u32 *puLen)
+int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
+ OUT u32 *addr, OUT u32 *puLen)
{
struct cod_manager *cod_mgr_obj;
int status = 0;
@@ -405,21 +405,21 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
- DBC_REQUIRE(pstrSect != NULL);
- DBC_REQUIRE(puAddr != NULL);
+ DBC_REQUIRE(str_sect != NULL);
+ DBC_REQUIRE(addr != NULL);
DBC_REQUIRE(puLen != NULL);

- *puAddr = 0;
+ *addr = 0;
*puLen = 0;
if (lib != NULL) {
cod_mgr_obj = lib->cod_mgr;
- status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, pstrSect,
- puAddr, puLen);
+ status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, str_sect,
+ addr, puLen);
} else {
status = -ESPIPE;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((*puAddr == 0) && (*puLen == 0)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*puLen == 0)));

return status;
}
@@ -432,23 +432,23 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
* C symbol.
*
*/
-int cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym,
+int cod_get_sym_value(struct cod_manager *hmgr, char *str_sym,
u32 *pul_value)
{
struct dbll_sym_val *dbll_sym;

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pstrSym != NULL);
+ DBC_REQUIRE(str_sym != NULL);
DBC_REQUIRE(pul_value != NULL);

- dev_dbg(bridge, "%s: hmgr: %p pstrSym: %s pul_value: %p\n",
- __func__, hmgr, pstrSym, pul_value);
+ dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n",
+ __func__, hmgr, str_sym, pul_value);
if (hmgr->base_lib) {
if (!hmgr->fxns.
- get_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) {
+ get_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) {
if (!hmgr->fxns.
- get_c_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym))
+ get_c_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym))
return -ESPIPE;
}
} else {
@@ -550,7 +550,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
* ======== cod_open ========
* Open library for reading sections.
*/
-int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
+int cod_open(struct cod_manager *hmgr, IN char *sz_coff_path,
u32 flags, struct cod_libraryobj **lib_obj)
{
int status = 0;
@@ -558,7 +558,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pszCoffPath != NULL);
+ DBC_REQUIRE(sz_coff_path != NULL);
DBC_REQUIRE(flags == COD_NOLOAD || flags == COD_SYMB);
DBC_REQUIRE(lib_obj != NULL);

@@ -570,15 +570,15 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,

if (DSP_SUCCEEDED(status)) {
lib->cod_mgr = hmgr;
- status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags,
+ status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags,
&lib->dbll_lib);
if (DSP_SUCCEEDED(status))
*lib_obj = lib;
}

if (DSP_FAILED(status))
- pr_err("%s: error status 0x%x, pszCoffPath: %s flags: 0x%x\n",
- __func__, status, pszCoffPath, flags);
+ pr_err("%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n",
+ __func__, status, sz_coff_path, flags);
return status;
}

@@ -587,7 +587,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
* Purpose:
* Open base image for reading sections.
*/
-int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
+int cod_open_base(struct cod_manager *hmgr, IN char *sz_coff_path,
dbll_flags flags)
{
int status = 0;
@@ -595,7 +595,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pszCoffPath != NULL);
+ DBC_REQUIRE(sz_coff_path != NULL);

/* if we previously opened a base image, close it now */
if (hmgr->base_lib) {
@@ -606,17 +606,17 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
hmgr->fxns.close_fxn(hmgr->base_lib);
hmgr->base_lib = NULL;
}
- status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags, &lib);
+ status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags, &lib);
if (DSP_SUCCEEDED(status)) {
/* hang onto the library for subsequent sym table usage */
hmgr->base_lib = lib;
- strncpy(hmgr->sz_zl_file, pszCoffPath, COD_MAXPATHLENGTH - 1);
+ strncpy(hmgr->sz_zl_file, sz_coff_path, COD_MAXPATHLENGTH - 1);
hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0';
}

if (DSP_FAILED(status))
- pr_err("%s: error status 0x%x pszCoffPath: %s\n", __func__,
- status, pszCoffPath);
+ pr_err("%s: error status 0x%x sz_coff_path: %s\n", __func__,
+ status, sz_coff_path);
return status;
}

@@ -625,7 +625,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Purpose:
* Retrieve the content of a code section given the section name.
*/
-int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
+int cod_read_section(struct cod_libraryobj *lib, IN char *str_sect,
OUT char *str_content, IN u32 content_size)
{
int status = 0;
@@ -633,12 +633,12 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
- DBC_REQUIRE(pstrSect != NULL);
+ DBC_REQUIRE(str_sect != NULL);
DBC_REQUIRE(str_content != NULL);

if (lib != NULL)
status =
- lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
+ lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, str_sect,
str_content, content_size);
else
status = -ESPIPE;
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 1f7cc33..fb5e0d7 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -692,18 +692,18 @@ int dev_get_node_manager(struct dev_object *hdev_obj,
* ======== dev_get_symbol ========
*/
int dev_get_symbol(struct dev_object *hdev_obj,
- IN CONST char *pstrSym, OUT u32 * pul_value)
+ IN CONST char *str_sym, OUT u32 * pul_value)
{
int status = 0;
struct cod_manager *cod_mgr;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pstrSym != NULL && pul_value != NULL);
+ DBC_REQUIRE(str_sym != NULL && pul_value != NULL);

if (hdev_obj) {
status = dev_get_cod_mgr(hdev_obj, &cod_mgr);
if (cod_mgr)
- status = cod_get_sym_value(cod_mgr, (char *)pstrSym,
+ status = cod_get_sym_value(cod_mgr, (char *)str_sym,
pul_value);
else
status = -EFAULT;
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 2f32ece..a5cef43 100755
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -81,16 +81,16 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
* Parses the supplied image and resigsters with DCD.
*/
int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath)
+ IN char *sz_coff_path)
{
int status = 0;

DBC_REQUIRE(refs > 0);

if (hdcd_mgr)
- status = dcd_get_objects(hdcd_mgr, pszCoffPath,
+ status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object,
- (void *)pszCoffPath);
+ (void *)sz_coff_path);
else
status = -EFAULT;

@@ -103,14 +103,14 @@ int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* Parses the supplied DSP image and unresiters from DCD.
*/
int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath)
+ IN char *sz_coff_path)
{
int status = 0;

DBC_REQUIRE(refs > 0);

if (hdcd_mgr)
- status = dcd_get_objects(hdcd_mgr, pszCoffPath,
+ status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object,
NULL);
else
@@ -124,7 +124,7 @@ int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* Purpose:
* Creates DCD manager.
*/
-int dcd_create_manager(IN char *pszZlDllName,
+int dcd_create_manager(IN char *sz_zl_dll_name,
OUT struct dcd_manager **dcd_mgr)
{
struct cod_manager *cod_mgr; /* COD manager handle */
@@ -134,7 +134,7 @@ int dcd_create_manager(IN char *pszZlDllName,
DBC_REQUIRE(refs >= 0);
DBC_REQUIRE(dcd_mgr);

- status = cod_create(&cod_mgr, pszZlDllName, NULL);
+ status = cod_create(&cod_mgr, sz_zl_dll_name, NULL);
if (DSP_FAILED(status))
goto func_end;

@@ -534,7 +534,7 @@ func_end:
* ======== dcd_get_objects ========
*/
int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath, dcd_registerfxn registerFxn,
+ IN char *sz_coff_path, dcd_registerfxn registerFxn,
void *handle)
{
struct dcd_manager *dcd_mgr_obj = hdcd_mgr;
@@ -556,7 +556,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
}

/* Open DSP coff file, don't load symbols. */
- status = cod_open(dcd_mgr_obj->cod_mgr, pszCoffPath, COD_NOLOAD, &lib);
+ status = cod_open(dcd_mgr_obj->cod_mgr, sz_coff_path, COD_NOLOAD, &lib);
if (DSP_FAILED(status)) {
status = -EACCES;
goto func_cont;
@@ -572,7 +572,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
/* Allocate zeroed buffer. */
psz_coff_buf = kzalloc(ul_len + 4, GFP_KERNEL);
#ifdef _DB_TIOMAP
- if (strstr(pszCoffPath, "iva") == NULL) {
+ if (strstr(sz_coff_path, "iva") == NULL) {
/* Locate section by objectID and read its content. */
status = cod_read_section(lib, DCD_REGISTER_SECTION,
psz_coff_buf, ul_len);
@@ -587,7 +587,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
#endif
if (DSP_SUCCEEDED(status)) {
/* Compress DSP buffer to conform to PC format. */
- if (strstr(pszCoffPath, "iva") == NULL) {
+ if (strstr(sz_coff_path, "iva") == NULL) {
compress_buf(psz_coff_buf, ul_len, DSPWORDSIZE);
} else {
compress_buf(psz_coff_buf, ul_len, 1);
@@ -644,7 +644,7 @@ func_end:
*/
int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName,
+ IN OUT char *str_lib_name,
IN OUT u32 *buff_size,
enum nldr_phase phase, OUT bool *phase_split)
{
@@ -656,12 +656,12 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
struct dcd_key_elem *dcd_key = NULL;

DBC_REQUIRE(uuid_obj != NULL);
- DBC_REQUIRE(pstrLibName != NULL);
+ DBC_REQUIRE(str_lib_name != NULL);
DBC_REQUIRE(buff_size != NULL);
DBC_REQUIRE(hdcd_mgr);

- dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p,"
- " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName,
+ dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, str_lib_name %p,"
+ " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, str_lib_name,
buff_size);

/*
@@ -768,7 +768,7 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
}

if (DSP_SUCCEEDED(status))
- memcpy(pstrLibName, dcd_key->path, strlen(dcd_key->path) + 1);
+ memcpy(str_lib_name, dcd_key->path, strlen(dcd_key->path) + 1);
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 77cbc9c..ac4dfaf 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -682,7 +682,7 @@ void nldr_exit(void)
* ======== nldr_get_fxn_addr ========
*/
int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
- char *pstrFxn, u32 * pulAddr)
+ char *str_fxn, u32 * addr)
{
struct dbll_sym_val *dbll_sym;
struct nldr_object *nldr_obj;
@@ -692,8 +692,8 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
struct lib_node root = { NULL, 0, NULL };
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(nldr_node_obj);
- DBC_REQUIRE(pulAddr != NULL);
- DBC_REQUIRE(pstrFxn != NULL);
+ DBC_REQUIRE(addr != NULL);
+ DBC_REQUIRE(str_fxn != NULL);

nldr_obj = nldr_node_obj->nldr_obj;
/* Called from node_create(), node_delete(), or node_run(). */
@@ -717,10 +717,10 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
root = nldr_node_obj->root;
}
status1 =
- nldr_obj->ldr_fxns.get_c_addr_fxn(root.lib, pstrFxn, &dbll_sym);
+ nldr_obj->ldr_fxns.get_c_addr_fxn(root.lib, str_fxn, &dbll_sym);
if (!status1)
status1 =
- nldr_obj->ldr_fxns.get_addr_fxn(root.lib, pstrFxn,
+ nldr_obj->ldr_fxns.get_addr_fxn(root.lib, str_fxn,
&dbll_sym);

/* If symbol not found, check dependent libraries */
@@ -728,13 +728,13 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
for (i = 0; i < root.dep_libs; i++) {
status1 =
nldr_obj->ldr_fxns.get_addr_fxn(root.dep_libs_tree
- [i].lib, pstrFxn,
+ [i].lib, str_fxn,
&dbll_sym);
if (!status1) {
status1 =
nldr_obj->ldr_fxns.
get_c_addr_fxn(root.dep_libs_tree[i].lib,
- pstrFxn, &dbll_sym);
+ str_fxn, &dbll_sym);
}
if (status1) {
/* Symbol found */
@@ -748,12 +748,12 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
status1 =
nldr_obj->ldr_fxns.
get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib,
- pstrFxn, &dbll_sym);
+ str_fxn, &dbll_sym);
if (!status1) {
status1 =
nldr_obj->ldr_fxns.
get_c_addr_fxn(nldr_node_obj->pers_lib_table
- [i].lib, pstrFxn, &dbll_sym);
+ [i].lib, str_fxn, &dbll_sym);
}
if (status1) {
/* Symbol found */
@@ -763,7 +763,7 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
}

if (status1)
- *pulAddr = dbll_sym->value;
+ *addr = dbll_sym->value;
else
status = -ESPIPE;

diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index f6922f4..ad3b50c 100755
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -620,7 +620,7 @@ func_cont:
* Relcaims a buffer from a stream.
*/
int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
- u32 *pulBytes, u32 *pulBufSize, u32 *pdw_arg)
+ u32 *nbytes, u32 *buff_size, u32 *pdw_arg)
{
struct bridge_drv_interface *intf_fxns;
struct chnl_ioc chnl_ioc_obj;
@@ -629,7 +629,7 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(buf_ptr != NULL);
- DBC_REQUIRE(pulBytes != NULL);
+ DBC_REQUIRE(nbytes != NULL);
DBC_REQUIRE(pdw_arg != NULL);

if (!stream_obj) {
@@ -643,9 +643,9 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
stream_obj->utimeout,
&chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) {
- *pulBytes = chnl_ioc_obj.byte_size;
- if (pulBufSize)
- *pulBufSize = chnl_ioc_obj.buf_size;
+ *nbytes = chnl_ioc_obj.byte_size;
+ if (buff_size)
+ *buff_size = chnl_ioc_obj.buf_size;

*pdw_arg = chnl_ioc_obj.dw_arg;
if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
@@ -692,9 +692,9 @@ func_end:
status == -ETIME || status == -ESRCH ||
status == -EPERM);

- dev_dbg(bridge, "%s: stream_obj: %p buf_ptr: %p pulBytes: %p "
+ dev_dbg(bridge, "%s: stream_obj: %p buf_ptr: %p nbytes: %p "
"pdw_arg: %p status 0x%x\n", __func__, stream_obj,
- buf_ptr, pulBytes, pdw_arg, status);
+ buf_ptr, nbytes, pdw_arg, status);
return status;
}

--
1.6.3.3

2010-07-08 23:15:12

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 10/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pPhysAddr to phys_addr
pPhysicalAddress to physical_address
ppIntfFxns to if_fxns
pProcLoadStat to proc_load_stat
pProcStat to proc_lstat
ppSym to sym_val
pRefData to ref_data
pRef to ref
preservedBit to preserved_bit
pResult to result
procID to proc_id
pSectInfo to sect_inf
pSrc to src
pstrContent to str_content
pstrDummyFile to str_dummy_file
pstrExecFile to str_exec_file
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/io_sm.c | 33 ++++++++++---------
drivers/staging/tidspbridge/core/mmu_fault.c | 8 ++--
drivers/staging/tidspbridge/core/mmu_fault.h | 4 +-
drivers/staging/tidspbridge/hw/hw_mmu.c | 12 +++---
drivers/staging/tidspbridge/hw/hw_mmu.h | 2 +-
.../staging/tidspbridge/include/dspbridge/cfg.h | 10 +++---
.../staging/tidspbridge/include/dspbridge/cod.h | 8 ++--
.../staging/tidspbridge/include/dspbridge/dbll.h | 4 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 12 +++---
.../staging/tidspbridge/include/dspbridge/dev.h | 10 +++---
.../staging/tidspbridge/include/dspbridge/drv.h | 10 +++---
.../staging/tidspbridge/include/dspbridge/dspapi.h | 4 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 4 +-
.../staging/tidspbridge/include/dspbridge/dspio.h | 2 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 6 ++--
.../staging/tidspbridge/include/dspbridge/proc.h | 4 +-
drivers/staging/tidspbridge/pmgr/cod.c | 8 ++--
drivers/staging/tidspbridge/pmgr/dbll.c | 14 ++++----
drivers/staging/tidspbridge/pmgr/dev.c | 14 ++++----
drivers/staging/tidspbridge/rmgr/drv.c | 18 +++++-----
drivers/staging/tidspbridge/rmgr/nldr.c | 22 ++++++------
drivers/staging/tidspbridge/rmgr/proc.c | 4 +-
drivers/staging/tidspbridge/services/cfg.c | 8 ++--
23 files changed, 111 insertions(+), 110 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/core/io_sm.c

diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 1724138..b6c5a35
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -148,9 +148,9 @@ static void output_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr);
static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
struct chnl_object *pchnl, u32 mask);
static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize);
+ void *src, u32 usize);
static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize);
+ void *src, u32 usize);

/* Bus Addr (cached kernel) */
static int register_shm_segs(struct io_mgr *hio_mgr,
@@ -919,9 +919,9 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)
* out the dispatch of I/O as a non-preemptible event.It can only be
* pre-empted by an ISR.
*/
-void io_dpc(IN OUT unsigned long pRefData)
+void io_dpc(IN OUT unsigned long ref_data)
{
- struct io_mgr *pio_mgr = (struct io_mgr *)pRefData;
+ struct io_mgr *pio_mgr = (struct io_mgr *)ref_data;
struct chnl_mgr *chnl_mgr_obj;
struct msg_mgr *msg_mgr_obj;
struct deh_mgr *hdeh_mgr;
@@ -1702,9 +1702,9 @@ func_end:
* Copies buffers from the shared memory to the host buffer.
*/
static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize)
+ void *src, u32 usize)
{
- memcpy(dest, pSrc, usize);
+ memcpy(dest, src, usize);
return usize;
}

@@ -1713,9 +1713,9 @@ static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
* Copies buffers from the host side buffer to the shared memory.
*/
static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize)
+ void *src, u32 usize)
{
- memcpy(dest, pSrc, usize);
+ memcpy(dest, src, usize);
return usize;
}

@@ -1793,20 +1793,21 @@ int io_sh_msetting(struct io_mgr *hio_mgr, u8 desc, void *pargs)
* Gets the Processor's Load information
*/
int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
- OUT struct dsp_procloadstat *pProcStat)
+ OUT struct dsp_procloadstat *proc_lstat)
{
- pProcStat->curr_load = hio_mgr->shared_mem->load_mon_info.curr_dsp_load;
- pProcStat->predicted_load =
+ proc_lstat->curr_load =
+ hio_mgr->shared_mem->load_mon_info.curr_dsp_load;
+ proc_lstat->predicted_load =
hio_mgr->shared_mem->load_mon_info.pred_dsp_load;
- pProcStat->curr_dsp_freq =
+ proc_lstat->curr_dsp_freq =
hio_mgr->shared_mem->load_mon_info.curr_dsp_freq;
- pProcStat->predicted_freq =
+ proc_lstat->predicted_freq =
hio_mgr->shared_mem->load_mon_info.pred_dsp_freq;

dev_dbg(bridge, "Curr Load = %d, Pred Load = %d, Curr Freq = %d, "
- "Pred Freq = %d\n", pProcStat->curr_load,
- pProcStat->predicted_load, pProcStat->curr_dsp_freq,
- pProcStat->predicted_freq);
+ "Pred Freq = %d\n", proc_lstat->curr_load,
+ proc_lstat->predicted_load, proc_lstat->curr_dsp_freq,
+ proc_lstat->predicted_freq);
return 0;
}

diff --git a/drivers/staging/tidspbridge/core/mmu_fault.c b/drivers/staging/tidspbridge/core/mmu_fault.c
index 5c0124f..aa0f2f4 100644
--- a/drivers/staging/tidspbridge/core/mmu_fault.c
+++ b/drivers/staging/tidspbridge/core/mmu_fault.c
@@ -49,9 +49,9 @@ static bool mmu_check_if_fault(struct bridge_dev_context *dev_context);
* ======== mmu_fault_dpc ========
* Deferred procedure call to handle DSP MMU fault.
*/
-void mmu_fault_dpc(IN unsigned long pRefData)
+void mmu_fault_dpc(IN unsigned long ref_data)
{
- struct deh_mgr *hdeh_mgr = (struct deh_mgr *)pRefData;
+ struct deh_mgr *hdeh_mgr = (struct deh_mgr *)ref_data;

if (hdeh_mgr)
bridge_deh_notify(hdeh_mgr, DSP_MMUFAULT, 0L);
@@ -62,9 +62,9 @@ void mmu_fault_dpc(IN unsigned long pRefData)
* ======== mmu_fault_isr ========
* ISR to be triggered by a DSP MMU fault interrupt.
*/
-irqreturn_t mmu_fault_isr(int irq, IN void *pRefData)
+irqreturn_t mmu_fault_isr(int irq, IN void *ref_data)
{
- struct deh_mgr *deh_mgr_obj = (struct deh_mgr *)pRefData;
+ struct deh_mgr *deh_mgr_obj = (struct deh_mgr *)ref_data;
struct bridge_dev_context *dev_context;
struct cfg_hostres *resources;

diff --git a/drivers/staging/tidspbridge/core/mmu_fault.h b/drivers/staging/tidspbridge/core/mmu_fault.h
index 74db489..6eb7bcf 100644
--- a/drivers/staging/tidspbridge/core/mmu_fault.h
+++ b/drivers/staging/tidspbridge/core/mmu_fault.h
@@ -25,12 +25,12 @@ extern u32 fault_addr;
* ======== mmu_fault_dpc ========
* Deferred procedure call to handle DSP MMU fault.
*/
-void mmu_fault_dpc(IN unsigned long pRefData);
+void mmu_fault_dpc(IN unsigned long ref_data);

/*
* ======== mmu_fault_isr ========
* ISR to be triggered by a DSP MMU fault interrupt.
*/
-irqreturn_t mmu_fault_isr(int irq, IN void *pRefData);
+irqreturn_t mmu_fault_isr(int irq, IN void *ref_data);

#endif /* MMU_FAULT_ */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index 460c490..fd1a4cc 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -84,7 +84,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
* TypE : const u32
* Description : It indicates the page size
*
- * Identifier : preservedBit
+ * Identifier : preserved_bit
* Type : const u32
* Description : It indicates the TLB entry is preserved entry
* or not
@@ -113,7 +113,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
*/
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
- const u32 preservedBit,
+ const u32 preserved_bit,
const u32 validBit,
const u32 virtual_addr_tag);

@@ -336,7 +336,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preservedBit, s8 validBit)
+ s8 preserved_bit, s8 validBit)
{
hw_status status = RET_OK;
u32 lock_reg;
@@ -379,7 +379,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);

/* Write the fields in the CAM Entry Register */
- mmu_set_cam_entry(base_address, mmu_pg_size, preservedBit, validBit,
+ mmu_set_cam_entry(base_address, mmu_pg_size, preserved_bit, validBit,
virtual_addr_tag);

/* Write the different fields of the RAM Entry Register */
@@ -537,7 +537,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address)
/* mmu_set_cam_entry */
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
- const u32 preservedBit,
+ const u32 preserved_bit,
const u32 validBit,
const u32 virtual_addr_tag)
{
@@ -550,7 +550,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,

mmu_cam_reg = (virtual_addr_tag << 12);
mmu_cam_reg = (mmu_cam_reg) | (page_sz) | (validBit << 2) |
- (preservedBit << 3);
+ (preserved_bit << 3);

/* write values to register */
MMUMMU_CAM_WRITE_REGISTER32(base_address, mmu_cam_reg);
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index a4eb12d..9bcc71b 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -85,7 +85,7 @@ extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preservedBit, s8 validBit);
+ s8 preserved_bit, s8 validBit);

/* For PTEs */
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
index 6fdd229..98cadb1 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h
@@ -100,20 +100,20 @@ extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
- * pstrExecFile: Ptr to character buf to hold ExecFile.
+ * str_exec_file: Ptr to character buf to hold ExecFile.
* Returns:
* 0: Success.
- * -EFAULT: dev_node_obj is invalid or pstrExecFile is invalid.
+ * -EFAULT: dev_node_obj is invalid or str_exec_file is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Ensures:
- * 0: Not more than buf_size bytes were copied into pstrExecFile,
- * and *pstrExecFile contains default executable for this
+ * 0: Not more than buf_size bytes were copied into str_exec_file,
+ * and *str_exec_file contains default executable for this
* devnode.
*/
extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
- IN u32 buf_size, OUT char *pstrExecFile);
+ IN u32 buf_size, OUT char *str_exec_file);

/*
* ======== cfg_get_object ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 0cc1bd2..f8cbb21 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -350,7 +350,7 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Parameters:
* cod_mgr_obj - manager in which to search for the symbol
* pstrSect - name of the section, with or without leading "."
- * pstrContent - buffer to store content of the section.
+ * str_content - buffer to store content of the section.
* Returns:
* 0: on success, error code on failure
* -ESPIPE: Symbols have not been loaded onto the board.
@@ -358,12 +358,12 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* COD module initialized.
* valid cod_mgr_obj.
* pstrSect != NULL;
- * pstrContent != NULL;
+ * str_content != NULL;
* Ensures:
- * 0: *pstrContent stores the content of the named section.
+ * 0: *str_content stores the content of the named section.
*/
extern int cod_read_section(struct cod_libraryobj *lib,
IN char *pstrSect,
- OUT char *pstrContent, IN u32 content_size);
+ OUT char *str_content, IN u32 content_size);

#endif /* COD_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index 0891fae..0a65ac0 100755
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -31,11 +31,11 @@ extern int dbll_create(struct dbll_tar_obj **target_obj,
extern void dbll_delete(struct dbll_tar_obj *target);
extern void dbll_exit(void);
extern bool dbll_get_addr(struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
extern void dbll_get_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
extern bool dbll_get_c_addr(struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
u32 *paddr, u32 *psize);
extern bool dbll_init(void);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index 23eca15..b827320 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -239,7 +239,7 @@ typedef void (*dbll_exit_fxn) (void);
* Parameters:
* lib - Handle returned from dbll_open().
* name - Name of symbol
- * ppSym - Location to store symbol address on output.
+ * sym_val - Location to store symbol address on output.
* Returns:
* TRUE: Success.
* FALSE: Symbol not found.
@@ -247,11 +247,11 @@ typedef void (*dbll_exit_fxn) (void);
* DBL initialized.
* Valid library.
* name != NULL.
- * ppSym != NULL.
+ * sym_val != NULL.
* Ensures:
*/
typedef bool(*dbll_get_addr_fxn) (struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);

/*
* ======== dbll_get_attrs ========
@@ -275,7 +275,7 @@ typedef void (*dbll_get_attrs_fxn) (struct dbll_tar_obj *target,
* Parameters:
* lib - Handle returned from dbll_open().
* name - Name of symbol
- * ppSym - Location to store symbol address on output.
+ * sym_val - Location to store symbol address on output.
* Returns:
* TRUE: Success.
* FALSE: Symbol not found.
@@ -283,11 +283,11 @@ typedef void (*dbll_get_attrs_fxn) (struct dbll_tar_obj *target,
* DBL initialized.
* Valid target.
* name != NULL.
- * ppSym != NULL.
+ * sym_val != NULL.
* Ensures:
*/
typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);

/*
* ======== dbll_get_sect ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index a646402..d658df5 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -367,20 +367,20 @@ extern struct dev_object *dev_get_first(void);
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *ppIntfFxns: Ptr to location to store fxn interface.
+ * *if_fxns: Ptr to location to store fxn interface.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * ppIntfFxns != NULL.
+ * if_fxns != NULL.
* DEV Initialized.
* Ensures:
- * 0: *ppIntfFxns contains a pointer to the Bridge
+ * 0: *if_fxns contains a pointer to the Bridge
* driver interface;
- * else: *ppIntfFxns is NULL.
+ * else: *if_fxns is NULL.
*/
extern int dev_get_intf_fxns(struct dev_object *hdev_obj,
- OUT struct bridge_drv_interface **ppIntfFxns);
+ OUT struct bridge_drv_interface **if_fxns);

/*
* ======== dev_get_io_mgr ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 0f69fb7..e9c5689 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -451,7 +451,7 @@ extern void mem_ext_phys_pool_release(void);
* Parameters:
* byte_size: Number of bytes to allocate.
* ulAlign: Alignment Mask.
- * pPhysicalAddress: Physical address of allocated memory.
+ * physical_address: Physical address of allocated memory.
* Returns:
* Pointer to a block of memory;
* NULL if memory couldn't be allocated, or if byte_size == 0.
@@ -463,7 +463,7 @@ extern void mem_ext_phys_pool_release(void);
* location of memory.
*/
extern void *mem_alloc_phys_mem(IN u32 byte_size,
- IN u32 ulAlign, OUT u32 *pPhysicalAddress);
+ IN u32 ulAlign, OUT u32 *physical_address);

/*
* ======== mem_free_phys_mem ========
@@ -472,7 +472,7 @@ extern void *mem_alloc_phys_mem(IN u32 byte_size,
* Parameters:
* pVirtualAddress: Pointer to virtual memory region allocated
* by mem_alloc_phys_mem().
- * pPhysicalAddress: Pointer to physical memory region allocated
+ * physical_address: Pointer to physical memory region allocated
* by mem_alloc_phys_mem().
* byte_size: Size of the memory region allocated by mem_alloc_phys_mem().
* Returns:
@@ -484,14 +484,14 @@ extern void *mem_alloc_phys_mem(IN u32 byte_size,
* pVirtualAddress is no longer a valid pointer to memory.
*/
extern void mem_free_phys_mem(void *pVirtualAddress,
- u32 pPhysicalAddress, u32 byte_size);
+ u32 physical_address, u32 byte_size);

/*
* ======== MEM_LINEAR_ADDRESS ========
* Purpose:
* Get the linear address corresponding to the given physical address.
* Parameters:
- * pPhysAddr: Physical address to be mapped.
+ * phys_addr: Physical address to be mapped.
* byte_size: Number of bytes in physical range to map.
* Returns:
* The corresponding linear address, or NULL if unsuccessful.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspapi.h b/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
index f84ac69..765a175 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
@@ -42,7 +42,7 @@
* Parameters:
* cmd: IOCTL id, base 0.
* args: Argument structure.
- * pResult:
+ * result:
* Returns:
* 0 if command called; -EINVAL if command not in IOCTL
* table.
@@ -51,7 +51,7 @@
*/
extern int api_call_dev_ioctl(unsigned int cmd,
union Trapped_Args *args,
- u32 *pResult, void *pr_ctxt);
+ u32 *result, void *pr_ctxt);

/*
* ======== api_init ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 7ae7d63..f68a7ff 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -857,7 +857,7 @@ typedef int(*fxn_io_onloaded) (struct io_mgr *hio_mgr);
* Called to get the Processor's current and predicted load
* Parameters:
* hio_mgr: IO Manager.
- * pProcLoadStat Processor Load statistics
+ * proc_load_stat Processor Load statistics
* Returns:
* 0: Success.
* -EPERM: Internal failure occurred.
@@ -867,7 +867,7 @@ typedef int(*fxn_io_onloaded) (struct io_mgr *hio_mgr);
*/
typedef int(*fxn_io_getprocload) (struct io_mgr *hio_mgr,
struct dsp_procloadstat *
- pProcLoadStat);
+ proc_load_stat);

/*
* ======== bridge_msg_create ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspio.h b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
index 93dc592..2b9e19c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspio.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspio.h
@@ -36,6 +36,6 @@ extern int bridge_io_on_loaded(struct io_mgr *hio_mgr);

extern int iva_io_on_loaded(struct io_mgr *hio_mgr);
extern int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
- OUT struct dsp_procloadstat *pProcStat);
+ OUT struct dsp_procloadstat *proc_lstat);

#endif /* DSPIO_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 3f1e5bb..9f0f32b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -68,7 +68,7 @@ extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl);
* Deferred procedure call for shared memory channel driver ISR. Carries
* out the dispatch of I/O.
* Parameters:
- * pRefData: Pointer to reference data registered via a call to
+ * ref_data: Pointer to reference data registered via a call to
* DPC_Create().
* Returns:
* Requires:
@@ -78,7 +78,7 @@ extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl);
* Ensures:
* Non-preemptible (but interruptible).
*/
-extern void io_dpc(IN OUT unsigned long pRefData);
+extern void io_dpc(IN OUT unsigned long ref_data);

/*
* ======== io_mbox_msg ========
@@ -87,7 +87,7 @@ extern void io_dpc(IN OUT unsigned long pRefData);
* Calls the Bridge's chnlsm_isr to determine if this interrupt is ours,
* then schedules a DPC to dispatch I/O.
* Parameters:
- * pRefData: Pointer to the channel manager object for this board.
+ * ref_data: Pointer to the channel manager object for this board.
* Set in an initial call to ISR_Install().
* Returns:
* TRUE if interrupt handled; FALSE otherwise.
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index cbd26dc..5583bd5 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -265,7 +265,7 @@ extern int proc_get_state(void *hprocessor, OUT struct dsp_processorstate
* Report the state of the specified DSP processor.
* Parameters:
* hprocessor : The processor handle.
- * procID : Processor ID
+ * proc_id : Processor ID
*
* Returns:
* 0 : Success.
@@ -278,7 +278,7 @@ extern int proc_get_state(void *hprocessor, OUT struct dsp_processorstate
* Ensures:
* Details:
*/
-extern int proc_get_processor_id(void *hprocessor, u32 * procID);
+extern int proc_get_processor_id(void *hprocessor, u32 * proc_id);

/*
* ======== proc_get_trace ========
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index ab54388..e4fc065 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -215,7 +215,7 @@ void cod_close(struct cod_libraryobj *lib)
* dynamically loaded object files.
*
*/
-int cod_create(OUT struct cod_manager **mgr, char *pstrDummyFile,
+int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file,
IN OPTIONAL CONST struct cod_attrs *attrs)
{
struct cod_manager *mgr_new;
@@ -626,7 +626,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Retrieve the content of a code section given the section name.
*/
int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
- OUT char *pstrContent, IN u32 content_size)
+ OUT char *str_content, IN u32 content_size)
{
int status = 0;

@@ -634,12 +634,12 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
DBC_REQUIRE(pstrSect != NULL);
- DBC_REQUIRE(pstrContent != NULL);
+ DBC_REQUIRE(str_content != NULL);

if (lib != NULL)
status =
lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
- pstrContent, content_size);
+ str_content, content_size);
else
status = -ESPIPE;

diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 0e9875b..6808e4c 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -300,7 +300,7 @@ void dbll_exit(void)
* Get address of name in the specified library.
*/
bool dbll_get_addr(struct dbll_library_obj *zl_lib, char *name,
- struct dbll_sym_val **ppSym)
+ struct dbll_sym_val **sym_val)
{
struct dbll_symbol *sym;
bool status = false;
@@ -308,17 +308,17 @@ bool dbll_get_addr(struct dbll_library_obj *zl_lib, char *name,
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
DBC_REQUIRE(name != NULL);
- DBC_REQUIRE(ppSym != NULL);
+ DBC_REQUIRE(sym_val != NULL);
DBC_REQUIRE(zl_lib->sym_tab != NULL);

sym = (struct dbll_symbol *)gh_find(zl_lib->sym_tab, name);
if (sym != NULL) {
- *ppSym = &sym->value;
+ *sym_val = &sym->value;
status = true;
}

dev_dbg(bridge, "%s: lib: %p name: %s paddr: %p, status 0x%x\n",
- __func__, zl_lib, name, ppSym, status);
+ __func__, zl_lib, name, sym_val, status);
return status;
}

@@ -344,7 +344,7 @@ void dbll_get_attrs(struct dbll_tar_obj *target, struct dbll_attrs *pattrs)
* Get address of a "C" name in the specified library.
*/
bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,
- struct dbll_sym_val **ppSym)
+ struct dbll_sym_val **sym_val)
{
struct dbll_symbol *sym;
char cname[MAXEXPR + 1];
@@ -352,7 +352,7 @@ bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
- DBC_REQUIRE(ppSym != NULL);
+ DBC_REQUIRE(sym_val != NULL);
DBC_REQUIRE(zl_lib->sym_tab != NULL);
DBC_REQUIRE(name != NULL);

@@ -365,7 +365,7 @@ bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,
sym = (struct dbll_symbol *)gh_find(zl_lib->sym_tab, cname);

if (sym != NULL) {
- *ppSym = &sym->value;
+ *sym_val = &sym->value;
status = true;
}

diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 2344bfd..1f7cc33 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -586,26 +586,26 @@ struct dev_object *dev_get_first(void)
* ======== dev_get_intf_fxns ========
* Purpose:
* Retrieve the Bridge interface function structure for the loaded driver.
- * ppIntfFxns != NULL.
+ * if_fxns != NULL.
*/
int dev_get_intf_fxns(struct dev_object *hdev_obj,
- OUT struct bridge_drv_interface **ppIntfFxns)
+ OUT struct bridge_drv_interface **if_fxns)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;

DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(ppIntfFxns != NULL);
+ DBC_REQUIRE(if_fxns != NULL);

if (hdev_obj) {
- *ppIntfFxns = &dev_obj->bridge_interface;
+ *if_fxns = &dev_obj->bridge_interface;
} else {
- *ppIntfFxns = NULL;
+ *if_fxns = NULL;
status = -EFAULT;
}

- DBC_ENSURE(DSP_SUCCEEDED(status) || ((ppIntfFxns != NULL) &&
- (*ppIntfFxns == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((if_fxns != NULL) &&
+ (*if_fxns == NULL)));
return status;
}

diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 58c6cff..94285d1 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -969,7 +969,7 @@ void mem_ext_phys_pool_release(void)
* Allocate physically contiguous, uncached memory from external memory pool
*/

-static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)
+static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * phys_addr)
{
u32 new_alloc_ptr;
u32 offset;
@@ -980,7 +980,7 @@ static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)

if (bytes > ((ext_mem_pool.phys_mem_base + ext_mem_pool.phys_mem_size)
- ext_mem_pool.next_phys_alloc_ptr)) {
- pPhysAddr = NULL;
+ phys_addr = NULL;
return NULL;
} else {
offset = (ext_mem_pool.next_phys_alloc_ptr & (align - 1));
@@ -992,7 +992,7 @@ static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)
if ((new_alloc_ptr + bytes) <=
(ext_mem_pool.phys_mem_base + ext_mem_pool.phys_mem_size)) {
/* we can allocate */
- *pPhysAddr = new_alloc_ptr;
+ *phys_addr = new_alloc_ptr;
ext_mem_pool.next_phys_alloc_ptr =
new_alloc_ptr + bytes;
virt_addr =
@@ -1001,7 +1001,7 @@ static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)
phys_mem_base);
return (void *)virt_addr;
} else {
- *pPhysAddr = 0;
+ *phys_addr = 0;
return NULL;
}
}
@@ -1012,7 +1012,7 @@ static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)
* Purpose:
* Allocate physically contiguous, uncached memory
*/
-void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * pPhysicalAddress)
+void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * physical_address)
{
void *va_mem = NULL;
dma_addr_t pa_mem;
@@ -1025,9 +1025,9 @@ void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * pPhysicalAddress)
va_mem = dma_alloc_coherent(NULL, byte_size, &pa_mem,
GFP_KERNEL);
if (va_mem == NULL)
- *pPhysicalAddress = 0;
+ *physical_address = 0;
else
- *pPhysicalAddress = pa_mem;
+ *physical_address = pa_mem;
}
return va_mem;
}
@@ -1037,12 +1037,12 @@ void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * pPhysicalAddress)
* Purpose:
* Free the given block of physically contiguous memory.
*/
-void mem_free_phys_mem(void *pVirtualAddress, u32 pPhysicalAddress,
+void mem_free_phys_mem(void *pVirtualAddress, u32 physical_address,
u32 byte_size)
{
DBC_REQUIRE(pVirtualAddress != NULL);

if (!ext_phys_mem_pool_enabled)
dma_free_coherent(NULL, byte_size, pVirtualAddress,
- pPhysicalAddress);
+ physical_address);
}
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 875a267..77cbc9c 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -289,7 +289,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj,
enum dsp_dcdobjtype obj_type, IN void *handle);
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **lst,
- struct dbll_sect_info *pSectInfo,
+ struct dbll_sect_info *sect_inf,
bool *exists, u32 addr, u32 bytes);
static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype);
@@ -304,11 +304,11 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase, u16 depth);
static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
-static int remote_alloc(void **pRef, u16 mem_sect_type, u32 size,
+static int remote_alloc(void **ref, u16 mem_sect_type, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmentId,
OPTIONAL s32 req, bool reserve);
-static int remote_free(void **pRef, u16 space, u32 dsp_address, u32 size,
+static int remote_free(void **ref, u16 space, u32 dsp_address, u32 size,
bool reserve);

static void unload_lib(struct nldr_nodeobject *nldr_node_obj,
@@ -1072,7 +1072,7 @@ func_end:
*/
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **lst,
- struct dbll_sect_info *pSectInfo,
+ struct dbll_sect_info *sect_inf,
bool *exists, u32 addr, u32 bytes)
{
struct ovly_sect *new_sect = NULL;
@@ -1103,10 +1103,10 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
status = -ENOMEM;
} else {
new_sect->sect_load_addr = addr;
- new_sect->sect_run_addr = pSectInfo->sect_run_addr +
- (addr - pSectInfo->sect_load_addr);
+ new_sect->sect_run_addr = sect_inf->sect_run_addr +
+ (addr - sect_inf->sect_load_addr);
new_sect->size = bytes;
- new_sect->page = pSectInfo->type;
+ new_sect->page = sect_inf->type;
}

/* Add to the list */
@@ -1623,12 +1623,12 @@ func_end:
/*
* ======== remote_alloc ========
*/
-static int remote_alloc(void **pRef, u16 space, u32 size,
+static int remote_alloc(void **ref, u16 space, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmentId, OPTIONAL s32 req,
bool reserve)
{
- struct nldr_nodeobject *hnode = (struct nldr_nodeobject *)pRef;
+ struct nldr_nodeobject *hnode = (struct nldr_nodeobject *)ref;
struct nldr_object *nldr_obj;
struct rmm_target_obj *rmm;
u16 mem_phase_bit = MAXFLAGS;
@@ -1744,10 +1744,10 @@ func_cont:
return status;
}

-static int remote_free(void **pRef, u16 space, u32 dsp_address,
+static int remote_free(void **ref, u16 space, u32 dsp_address,
u32 size, bool reserve)
{
- struct nldr_object *nldr_obj = (struct nldr_object *)pRef;
+ struct nldr_object *nldr_obj = (struct nldr_object *)ref;
struct rmm_target_obj *rmm;
u32 word_size;
int status = -ENOMEM; /* Set to fail */
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index ed26d06..d725ce4 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -1934,13 +1934,13 @@ func_end:
* Purpose:
* Retrieves the processor ID.
*/
-int proc_get_processor_id(void *proc, u32 * procID)
+int proc_get_processor_id(void *proc, u32 * proc_id)
{
int status = 0;
struct proc_object *p_proc_object = (struct proc_object *)proc;

if (p_proc_object)
- *procID = p_proc_object->processor_id;
+ *proc_id = p_proc_object->processor_id;
else
status = -EFAULT;

diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index 53ede23..ac23b09 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -112,7 +112,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
* Retreive the default executable, if any, for this board.
*/
int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
- OUT char *pstrExecFile)
+ OUT char *str_exec_file)
{
int status = 0;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
@@ -120,19 +120,19 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
if (!dev_node_obj)
status = -EFAULT;

- else if (!pstrExecFile || !drv_datap)
+ else if (!str_exec_file || !drv_datap)
status = -EFAULT;

if (strlen(drv_datap->base_img) > ul_buf_size)
status = -EINVAL;

if (DSP_SUCCEEDED(status) && drv_datap->base_img)
- strcpy(pstrExecFile, drv_datap->base_img);
+ strcpy(str_exec_file, drv_datap->base_img);

if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
DBC_ENSURE(((status == 0) &&
- (strlen(pstrExecFile) <= ul_buf_size))
+ (strlen(str_exec_file) <= ul_buf_size))
|| (status != 0));
return status;
}
--
1.6.3.3

2010-07-08 23:12:26

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 15/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
validBit to valid_bit
victimEntryNum to victim_entry_num
virtualAddr to virtual_addr
xType to xtype
actualValue to actual_value
EASIL1_MMUMMU_IRQSTATUSReadRegister32 to easil1_mmummu_irqstatus_read_register32
EASIL1_MMUMMU_LOCKBaseValueWrite32 to easil1_mmummu_lock_base_value_write32
easiNum to easi_num
expectedValue to expected_value
invalidValue to invalid_value
L1_base to l1_base
L2_base to l2_base
lower16Bits to lower16_bits
lower8Bits to lower8_bits
lowerMiddle8Bits to lower_middle8_bits
lowerUpper8Bits to lower_upper8_bits
maxValidValue to max_valid_value
minValidValue to min_valid_value
newValue to new_value
returnCodeIfMismatch to return_code_if_mismatch
spyCodeIfMisMatch to spy_code_if_mis_match
upper16Bits to upper16_bits
upper8Bits to upper8_bits
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/hw/EasiGlobal.h | 2 +-
drivers/staging/tidspbridge/hw/GlobalTypes.h | 72 ++++++++-------
drivers/staging/tidspbridge/hw/MMURegAcM.h | 96 ++++++++++----------
drivers/staging/tidspbridge/hw/hw_mmu.c | 46 +++++-----
drivers/staging/tidspbridge/hw/hw_mmu.h | 20 ++--
.../staging/tidspbridge/include/dspbridge/cmm.h | 6 +-
drivers/staging/tidspbridge/pmgr/cmm.c | 14 ++--
7 files changed, 129 insertions(+), 127 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/hw/GlobalTypes.h

diff --git a/drivers/staging/tidspbridge/hw/EasiGlobal.h b/drivers/staging/tidspbridge/hw/EasiGlobal.h
index 9b45aa7..e48d7f6 100644
--- a/drivers/staging/tidspbridge/hw/EasiGlobal.h
+++ b/drivers/staging/tidspbridge/hw/EasiGlobal.h
@@ -36,6 +36,6 @@
*
* NOTE: We currently dont use this functionality.
*/
-#define _DEBUG_LEVEL1_EASI(easiNum) ((void)0)
+#define _DEBUG_LEVEL1_EASI(easi_num) ((void)0)

#endif /* _EASIGLOBAL_H */
diff --git a/drivers/staging/tidspbridge/hw/GlobalTypes.h b/drivers/staging/tidspbridge/hw/GlobalTypes.h
index 9b55150..8299368
--- a/drivers/staging/tidspbridge/hw/GlobalTypes.h
+++ b/drivers/staging/tidspbridge/hw/GlobalTypes.h
@@ -94,39 +94,39 @@
#define LOWER8BIT_MASK 0x000000FF

/*
- * Definition: RETURN32BITS_FROM16LOWER_AND16UPPER(lower16Bits, upper16Bits)
+ * Definition: RETURN32BITS_FROM16LOWER_AND16UPPER(lower16_bits, upper16_bits)
*
* DESCRIPTION: Returns a 32 bit value given a 16 bit lower value and a 16
* bit upper value
*/
-#define RETURN32BITS_FROM16LOWER_AND16UPPER(lower16Bits, upper16Bits)\
- (((((u32)lower16Bits) & LOWER16BIT_MASK)) | \
- (((((u32)upper16Bits) & LOWER16BIT_MASK) << UPPER16BIT_SHIFT)))
+#define RETURN32BITS_FROM16LOWER_AND16UPPER(lower16_bits, upper16_bits)\
+ (((((u32)lower16_bits) & LOWER16BIT_MASK)) | \
+ (((((u32)upper16_bits) & LOWER16BIT_MASK) << UPPER16BIT_SHIFT)))

/*
- * Definition: RETURN16BITS_FROM8LOWER_AND8UPPER(lower16Bits, upper16Bits)
+ * Definition: RETURN16BITS_FROM8LOWER_AND8UPPER(lower16_bits, upper16_bits)
*
* DESCRIPTION: Returns a 16 bit value given a 8 bit lower value and a 8
* bit upper value
*/
-#define RETURN16BITS_FROM8LOWER_AND8UPPER(lower8Bits, upper8Bits)\
- (((((u32)lower8Bits) & LOWER8BIT_MASK)) | \
- (((((u32)upper8Bits) & LOWER8BIT_MASK) << UPPER8BIT_OF16_SHIFT)))
+#define RETURN16BITS_FROM8LOWER_AND8UPPER(lower8_bits, upper8_bits)\
+ (((((u32)lower8_bits) & LOWER8BIT_MASK)) | \
+ (((((u32)upper8_bits) & LOWER8BIT_MASK) << UPPER8BIT_OF16_SHIFT)))

/*
- * Definition: RETURN32BITS_FROM48BIT_VALUES(lower8Bits, lowerMiddle8Bits,
- * lowerUpper8Bits, upper8Bits)
+ * Definition: RETURN32BITS_FROM48BIT_VALUES(lower8_bits, lower_middle8_bits,
+ * lower_upper8_bits, upper8_bits)
*
* DESCRIPTION: Returns a 32 bit value given four 8 bit values
*/
-#define RETURN32BITS_FROM48BIT_VALUES(lower8Bits, lowerMiddle8Bits,\
- lowerUpper8Bits, upper8Bits)\
- (((((u32)lower8Bits) & LOWER8BIT_MASK)) | \
- (((((u32)lowerMiddle8Bits) & LOWER8BIT_MASK) <<\
+#define RETURN32BITS_FROM48BIT_VALUES(lower8_bits, lower_middle8_bits,\
+ lower_upper8_bits, upper8_bits)\
+ (((((u32)lower8_bits) & LOWER8BIT_MASK)) | \
+ (((((u32)lower_middle8_bits) & LOWER8BIT_MASK) <<\
LOWER_MIDDLE8BIT_SHIFT)) | \
- (((((u32)lowerUpper8Bits) & LOWER8BIT_MASK) <<\
+ (((((u32)lower_upper8_bits) & LOWER8BIT_MASK) <<\
UPPER_MIDDLE8BIT_SHIFT)) | \
- (((((u32)upper8Bits) & LOWER8BIT_MASK) <<\
+ (((((u32)upper8_bits) & LOWER8BIT_MASK) <<\
UPPER8BIT_SHIFT)))

/*
@@ -285,24 +285,26 @@ enum return_code_label {

/* Not sure if this all belongs here */

-#define CHECK_RETURN_VALUE(actualValue, expectedValue, returnCodeIfMismatch,\
- spyCodeIfMisMatch)
-#define CHECK_RETURN_VALUE_RET(actualValue, expectedValue, returnCodeIfMismatch)
-#define CHECK_RETURN_VALUE_RES(actualValue, expectedValue, spyCodeIfMisMatch)
-#define CHECK_RETURN_VALUE_RET_VOID(actualValue, expectedValue,\
- spyCodeIfMisMatch)
-
-#define CHECK_INPUT_PARAM(actualValue, invalidValue, returnCodeIfMismatch,\
- spyCodeIfMisMatch)
-#define CHECK_INPUT_PARAM_NO_SPY(actualValue, invalidValue,\
- returnCodeIfMismatch)
-#define CHECK_INPUT_RANGE(actualValue, minValidValue, maxValidValue,\
- returnCodeIfMismatch, spyCodeIfMisMatch)
-#define CHECK_INPUT_RANGE_NO_SPY(actualValue, minValidValue, maxValidValue,\
- returnCodeIfMismatch)
-#define CHECK_INPUT_RANGE_MIN0(actualValue, maxValidValue,\
- returnCodeIfMismatch, spyCodeIfMisMatch)
-#define CHECK_INPUT_RANGE_NO_SPY_MIN0(actualValue, maxValidValue,\
- returnCodeIfMismatch)
+#define CHECK_RETURN_VALUE(actual_value, expected_value,\
+ return_code_if_mismatch, spy_code_if_mis_match)
+#define CHECK_RETURN_VALUE_RET(actual_value, expected_value,\
+ return_code_if_mismatch)
+#define CHECK_RETURN_VALUE_RES(actual_value, expected_value,\
+ spy_code_if_mis_match)
+#define CHECK_RETURN_VALUE_RET_VOID(actual_value, expected_value,\
+ spy_code_if_mis_match)
+
+#define CHECK_INPUT_PARAM(actual_value, invalid_value,\
+ return_code_if_mismatch, spy_code_if_mis_match)
+#define CHECK_INPUT_PARAM_NO_SPY(actual_value, invalid_value,\
+ return_code_if_mismatch)
+#define CHECK_INPUT_RANGE(actual_value, min_valid_value, max_valid_value,\
+ return_code_if_mismatch, spy_code_if_mis_match)
+#define CHECK_INPUT_RANGE_NO_SPY(actual_value, min_valid_value,\
+ max_valid_value, return_code_if_mismatch)
+#define CHECK_INPUT_RANGE_MIN0(actual_value, max_valid_value,\
+ return_code_if_mismatch, spy_code_if_mis_match)
+#define CHECK_INPUT_RANGE_NO_SPY_MIN0(actual_value, max_valid_value,\
+ return_code_if_mismatch)

#endif /* _GLOBALTYPES_H */
diff --git a/drivers/staging/tidspbridge/hw/MMURegAcM.h b/drivers/staging/tidspbridge/hw/MMURegAcM.h
index c341060..39db036 100644
--- a/drivers/staging/tidspbridge/hw/MMURegAcM.h
+++ b/drivers/staging/tidspbridge/hw/MMURegAcM.h
@@ -33,38 +33,38 @@
{\
const u32 offset = MMU_MMU_SYSCONFIG_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_SYSCONFIG_IDLE_MODE_WRITE32);\
data &= ~(MMU_MMU_SYSCONFIG_IDLE_MODE_MASK);\
- newValue <<= MMU_MMU_SYSCONFIG_IDLE_MODE_OFFSET;\
- newValue &= MMU_MMU_SYSCONFIG_IDLE_MODE_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_SYSCONFIG_IDLE_MODE_OFFSET;\
+ new_value &= MMU_MMU_SYSCONFIG_IDLE_MODE_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_SYSCONFIG_AUTO_IDLE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_SYSCONFIG_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_SYSCONFIG_AUTO_IDLE_WRITE32);\
data &= ~(MMU_MMU_SYSCONFIG_AUTO_IDLE_MASK);\
- newValue <<= MMU_MMU_SYSCONFIG_AUTO_IDLE_OFFSET;\
- newValue &= MMU_MMU_SYSCONFIG_AUTO_IDLE_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_SYSCONFIG_AUTO_IDLE_OFFSET;\
+ new_value &= MMU_MMU_SYSCONFIG_AUTO_IDLE_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_IRQSTATUS_READ_REGISTER32(base_address)\
- (_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQSTATUSReadRegister32),\
+ (_DEBUG_LEVEL1_EASI(easil1_mmummu_irqstatus_read_register32),\
__raw_readl((base_address)+MMU_MMU_IRQSTATUS_OFFSET))

#define MMUMMU_IRQSTATUS_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_IRQSTATUS_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQSTATUS_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_IRQENABLE_READ_REGISTER32(base_address)\
@@ -74,9 +74,9 @@
#define MMUMMU_IRQENABLE_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_IRQENABLE_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_IRQENABLE_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_WALKING_STTWL_RUNNING_READ32(base_address)\
@@ -95,26 +95,26 @@
{\
const u32 offset = MMU_MMU_CNTL_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CNTLTWL_ENABLE_WRITE32);\
data &= ~(MMU_MMU_CNTL_TWL_ENABLE_MASK);\
- newValue <<= MMU_MMU_CNTL_TWL_ENABLE_OFFSET;\
- newValue &= MMU_MMU_CNTL_TWL_ENABLE_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_CNTL_TWL_ENABLE_OFFSET;\
+ new_value &= MMU_MMU_CNTL_TWL_ENABLE_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_CNTLMMU_ENABLE_WRITE32(base_address, value)\
{\
const u32 offset = MMU_MMU_CNTL_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CNTLMMU_ENABLE_WRITE32);\
data &= ~(MMU_MMU_CNTL_MMU_ENABLE_MASK);\
- newValue <<= MMU_MMU_CNTL_MMU_ENABLE_OFFSET;\
- newValue &= MMU_MMU_CNTL_MMU_ENABLE_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_CNTL_MMU_ENABLE_OFFSET;\
+ new_value &= MMU_MMU_CNTL_MMU_ENABLE_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_FAULT_AD_READ_REGISTER32(base_address)\
@@ -124,9 +124,9 @@
#define MMUMMU_TTB_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_TTB_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_TTB_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_LOCK_READ_REGISTER32(base_address)\
@@ -136,9 +136,9 @@
#define MMUMMU_LOCK_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_LOCK_BASE_VALUE_READ32(base_address)\
@@ -151,13 +151,13 @@
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
- _DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCKBaseValueWrite32);\
+ register u32 new_value = (value);\
+ _DEBUG_LEVEL1_EASI(easil1_mmummu_lock_base_value_write32);\
data &= ~(MMU_MMU_LOCK_BASE_VALUE_MASK);\
- newValue <<= MMU_MMU_LOCK_BASE_VALUE_OFFSET;\
- newValue &= MMU_MMU_LOCK_BASE_VALUE_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_LOCK_BASE_VALUE_OFFSET;\
+ new_value &= MMU_MMU_LOCK_BASE_VALUE_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_LOCK_CURRENT_VICTIM_READ32(base_address)\
@@ -170,13 +170,13 @@
{\
const u32 offset = MMU_MMU_LOCK_OFFSET;\
register u32 data = __raw_readl((base_address)+offset);\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LOCK_CURRENT_VICTIM_WRITE32);\
data &= ~(MMU_MMU_LOCK_CURRENT_VICTIM_MASK);\
- newValue <<= MMU_MMU_LOCK_CURRENT_VICTIM_OFFSET;\
- newValue &= MMU_MMU_LOCK_CURRENT_VICTIM_MASK;\
- newValue |= data;\
- __raw_writel(newValue, base_address+offset);\
+ new_value <<= MMU_MMU_LOCK_CURRENT_VICTIM_OFFSET;\
+ new_value &= MMU_MMU_LOCK_CURRENT_VICTIM_MASK;\
+ new_value |= data;\
+ __raw_writel(new_value, base_address+offset);\
}

#define MMUMMU_LOCK_CURRENT_VICTIM_SET32(var, value)\
@@ -192,33 +192,33 @@
#define MMUMMU_LD_TLB_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_LD_TLB_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_LD_TLB_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_CAM_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_CAM_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_CAM_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_RAM_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_RAM_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_RAM_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#define MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32(base_address, value)\
{\
const u32 offset = MMU_MMU_FLUSH_ENTRY_OFFSET;\
- register u32 newValue = (value);\
+ register u32 new_value = (value);\
_DEBUG_LEVEL1_EASI(EASIL1_MMUMMU_FLUSH_ENTRY_WRITE_REGISTER32);\
- __raw_writel(newValue, (base_address)+offset);\
+ __raw_writel(new_value, (base_address)+offset);\
}

#endif /* USE_LEVEL_1_MACROS */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index 28916a7..e61c74f 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -89,7 +89,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
* Description : It indicates the TLB entry is preserved entry
* or not
*
- * Identifier : validBit
+ * Identifier : valid_bit
* Type : const u32
* Description : It indicates the TLB entry is valid entry or not
*
@@ -114,7 +114,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address);
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
const u32 preserved_bit,
- const u32 validBit,
+ const u32 valid_bit,
const u32 virtual_addr_tag);

/*
@@ -193,11 +193,11 @@ hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
}

hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
- u32 victimEntryNum)
+ u32 victim_entry_num)
{
hw_status status = RET_OK;

- MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, victimEntryNum);
+ MMUMMU_LOCK_CURRENT_VICTIM_WRITE32(base_address, victim_entry_num);

return status;
}
@@ -292,7 +292,7 @@ hw_status hw_mmu_twl_disable(const void __iomem *base_address)
return status;
}

-hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
+hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtual_addr,
u32 page_sz)
{
hw_status status = RET_OK;
@@ -321,7 +321,7 @@ hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,
}

/* Generate the 20-bit tag from virtual address */
- virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);
+ virtual_addr_tag = ((virtual_addr & MMU_ADDR_MASK) >> 12);

mmu_set_cam_entry(base_address, pg_size_bits, 0, 0, virtual_addr_tag);

@@ -332,11 +332,11 @@ hw_status hw_mmu_tlb_flush(const void __iomem *base_address, u32 virtualAddr,

hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physical_addr,
- u32 virtualAddr,
+ u32 virtual_addr,
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preserved_bit, s8 validBit)
+ s8 preserved_bit, s8 valid_bit)
{
hw_status status = RET_OK;
u32 lock_reg;
@@ -376,10 +376,10 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,
lock_reg = MMUMMU_LOCK_READ_REGISTER32(base_address);

/* Generate the 20-bit tag from virtual address */
- virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);
+ virtual_addr_tag = ((virtual_addr & MMU_ADDR_MASK) >> 12);

/* Write the fields in the CAM Entry Register */
- mmu_set_cam_entry(base_address, mmu_pg_size, preserved_bit, validBit,
+ mmu_set_cam_entry(base_address, mmu_pg_size, preserved_bit, valid_bit,
virtual_addr_tag);

/* Write the different fields of the RAM Entry Register */
@@ -402,7 +402,7 @@ hw_status hw_mmu_tlb_add(const void __iomem *base_address,

hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
u32 physical_addr,
- u32 virtualAddr,
+ u32 virtual_addr,
u32 page_sz, struct hw_mmu_map_attrs_t *map_attrs)
{
hw_status status = RET_OK;
@@ -412,7 +412,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
switch (page_sz) {
case HW_PAGE_SIZE4KB:
pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SMALL_PAGE_MASK);
pte_val =
((physical_addr & MMU_SMALL_PAGE_MASK) |
@@ -424,7 +424,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
case HW_PAGE_SIZE64KB:
num_entries = 16;
pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_LARGE_PAGE_MASK);
pte_val =
((physical_addr & MMU_LARGE_PAGE_MASK) |
@@ -435,7 +435,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,

case HW_PAGE_SIZE1MB:
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SECTION_ADDR_MASK);
pte_val =
((((physical_addr & MMU_SECTION_ADDR_MASK) |
@@ -447,7 +447,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
case HW_PAGE_SIZE16MB:
num_entries = 16;
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SSECTION_ADDR_MASK);
pte_val =
(((physical_addr & MMU_SSECTION_ADDR_MASK) |
@@ -459,7 +459,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,

case HW_MMU_COARSE_PAGE_SIZE:
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SECTION_ADDR_MASK);
pte_val = (physical_addr & MMU_PAGE_TABLE_MASK) | 1;
break;
@@ -474,7 +474,7 @@ hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
return status;
}

-hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, u32 virtualAddr, u32 page_size)
+hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, u32 virtual_addr, u32 page_size)
{
hw_status status = RET_OK;
u32 pte_addr;
@@ -483,28 +483,28 @@ hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, u32 virtualAddr, u32 page_size)
switch (page_size) {
case HW_PAGE_SIZE4KB:
pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SMALL_PAGE_MASK);
break;

case HW_PAGE_SIZE64KB:
num_entries = 16;
pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_LARGE_PAGE_MASK);
break;

case HW_PAGE_SIZE1MB:
case HW_MMU_COARSE_PAGE_SIZE:
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SECTION_ADDR_MASK);
break;

case HW_PAGE_SIZE16MB:
num_entries = 16;
pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
- virtualAddr &
+ virtual_addr &
MMU_SSECTION_ADDR_MASK);
break;

@@ -538,7 +538,7 @@ static hw_status mmu_flush_entry(const void __iomem *base_address)
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
const u32 preserved_bit,
- const u32 validBit,
+ const u32 valid_bit,
const u32 virtual_addr_tag)
{
hw_status status = RET_OK;
@@ -549,7 +549,7 @@ static hw_status mmu_set_cam_entry(const void __iomem *base_address,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

mmu_cam_reg = (virtual_addr_tag << 12);
- mmu_cam_reg = (mmu_cam_reg) | (page_sz) | (validBit << 2) |
+ mmu_cam_reg = (mmu_cam_reg) | (page_sz) | (valid_bit << 2) |
(preserved_bit << 3);

/* write values to register */
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 6e02b96..6c715f8 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -50,7 +50,7 @@ extern hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
u32 num_locked_entries);

extern hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
- u32 victimEntryNum);
+ u32 victim_entry_num);

/* For MMU faults */
extern hw_status hw_mmu_event_ack(const void __iomem *base_address,
@@ -77,43 +77,43 @@ extern hw_status hw_mmu_twl_enable(const void __iomem *base_address);
extern hw_status hw_mmu_twl_disable(const void __iomem *base_address);

extern hw_status hw_mmu_tlb_flush(const void __iomem *base_address,
- u32 virtualAddr, u32 page_sz);
+ u32 virtual_addr, u32 page_sz);

extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physical_addr,
- u32 virtualAddr,
+ u32 virtual_addr,
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preserved_bit, s8 validBit);
+ s8 preserved_bit, s8 valid_bit);

/* For PTEs */
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
u32 physical_addr,
- u32 virtualAddr,
+ u32 virtual_addr,
u32 page_sz,
struct hw_mmu_map_attrs_t *map_attrs);

extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va,
- u32 page_size, u32 virtualAddr);
+ u32 page_size, u32 virtual_addr);

-static inline u32 hw_mmu_pte_addr_l1(u32 L1_base, u32 va)
+static inline u32 hw_mmu_pte_addr_l1(u32 l1_base, u32 va)
{
u32 pte_addr;
u32 va31_to20;

va31_to20 = va >> (20 - 2); /* Left-shift by 2 here itself */
va31_to20 &= 0xFFFFFFFCUL;
- pte_addr = L1_base + va31_to20;
+ pte_addr = l1_base + va31_to20;

return pte_addr;
}

-static inline u32 hw_mmu_pte_addr_l2(u32 L2_base, u32 va)
+static inline u32 hw_mmu_pte_addr_l2(u32 l2_base, u32 va)
{
u32 pte_addr;

- pte_addr = (L2_base & 0xFFFFFC00) | ((va >> 10) & 0x3FC);
+ pte_addr = (l2_base & 0xFFFFFC00) | ((va >> 10) & 0x3FC);

return pte_addr;
}
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 3944a1e..086ca25 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -370,17 +370,17 @@ extern int cmm_xlator_info(struct cmm_xlatorobject *xlator,
* Parameters:
* xlator: handle to translator.
* paddr address of buffer to translate.
- * xType Type of address xlation. CMM_PA2VA or CMM_VA2PA.
+ * xtype Type of address xlation. CMM_PA2VA or CMM_VA2PA.
* Returns:
* Valid address on success, else NULL.
* Requires:
* refs > 0
* paddr != NULL
- * xType >= CMM_VA2PA) && (xType <= CMM_DSPPA2PA)
+ * xtype >= CMM_VA2PA) && (xtype <= CMM_DSPPA2PA)
* Ensures:
*
*/
extern void *cmm_xlator_translate(struct cmm_xlatorobject *xlator,
- void *paddr, enum cmm_xlatetype xType);
+ void *paddr, enum cmm_xlatetype xtype);

#endif /* CMM_ */
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 2381984..d054e53 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1103,7 +1103,7 @@ int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr,
* ======== cmm_xlator_translate ========
*/
void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,
- enum cmm_xlatetype xType)
+ enum cmm_xlatetype xtype)
{
u32 dw_addr_xlate = 0;
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
@@ -1113,7 +1113,7 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,

DBC_REQUIRE(refs > 0);
DBC_REQUIRE(paddr != NULL);
- DBC_REQUIRE((xType >= CMM_VA2PA) && (xType <= CMM_DSPPA2PA));
+ DBC_REQUIRE((xtype >= CMM_VA2PA) && (xtype <= CMM_DSPPA2PA));

if (!xlator_obj)
goto loop_cont;
@@ -1125,9 +1125,9 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,
if (!allocator)
goto loop_cont;

- if ((xType == CMM_VA2DSPPA) || (xType == CMM_VA2PA) ||
- (xType == CMM_PA2VA)) {
- if (xType == CMM_PA2VA) {
+ if ((xtype == CMM_VA2DSPPA) || (xtype == CMM_VA2PA) ||
+ (xtype == CMM_PA2VA)) {
+ if (xtype == CMM_PA2VA) {
/* Gpp Va = Va Base + offset */
dw_offset = (u8 *) paddr - (u8 *) (allocator->shm_base -
allocator->
@@ -1152,14 +1152,14 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,
dw_addr_xlate = (u32) paddr;
}
/*Now convert address to proper target physical address if needed */
- if ((xType == CMM_VA2DSPPA) || (xType == CMM_PA2DSPPA)) {
+ if ((xtype == CMM_VA2DSPPA) || (xtype == CMM_PA2DSPPA)) {
/* Got Gpp Pa now, convert to DSP Pa */
dw_addr_xlate =
GPPPA2DSPPA((allocator->shm_base - allocator->ul_dsp_size),
dw_addr_xlate,
allocator->dw_dsp_phys_addr_offset *
allocator->c_factor);
- } else if (xType == CMM_DSPPA2PA) {
+ } else if (xtype == CMM_DSPPA2PA) {
/* Got DSP Pa, convert to GPP Pa */
dw_addr_xlate =
DSPPA2GPPPA(allocator->shm_base - allocator->ul_dsp_size,
--
1.6.3.3

2010-07-08 23:14:05

by Sapiens, Rene

[permalink] [raw]
Subject: [PATCH 13/16] staging:ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
segmentId to segmnt_id
SetPageDirty to set_page_dirty
sizeInBytes to size_in_bytes
sleepCode to sleep_code
Status to status
symName to sym_name
szVar to sz_var
Trapped_Args to trapped_args
TTBPhysAddr to ttb_phys_addr
uChirps to chirps
uChnlId to ch_id
uChnlID to ch_id
uContentSize to cont_size
uDDMAChnlId to ddma_chnl_id
uEvents to events
ulAlign to align_mask
========================================

Signed-off-by: Rene Sapiens <[email protected]>
---
drivers/staging/tidspbridge/core/chnl_sm.c | 30 +++---
drivers/staging/tidspbridge/core/tiomap3430.c | 4 +-
drivers/staging/tidspbridge/hw/hw_mmu.c | 4 +-
drivers/staging/tidspbridge/hw/hw_mmu.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbdefs.h | 4 +-
.../tidspbridge/include/dspbridge/dblldefs.h | 2 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 4 +-
.../tidspbridge/include/dspbridge/dspapi-ioctl.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dspapi.h | 112 ++++++++++----------
.../tidspbridge/include/dspbridge/dspchnl.h | 4 +-
.../tidspbridge/include/dspbridge/dspdefs.h | 8 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 20 ++--
.../staging/tidspbridge/include/dspbridge/proc.h | 12 +-
.../staging/tidspbridge/include/dspbridge/pwr.h | 6 +-
drivers/staging/tidspbridge/pmgr/dspapi.c | 116 ++++++++++----------
drivers/staging/tidspbridge/rmgr/drv.c | 5 +-
drivers/staging/tidspbridge/rmgr/drv_interface.c | 6 +-
drivers/staging/tidspbridge/rmgr/nldr.c | 12 +-
drivers/staging/tidspbridge/rmgr/proc.c | 18 ++--
drivers/staging/tidspbridge/rmgr/pwr.c | 6 +-
20 files changed, 189 insertions(+), 188 deletions(-)
mode change 100644 => 100755 drivers/staging/tidspbridge/include/dspbridge/dbdefs.h

diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 97eeda9..ac393b8 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -73,7 +73,7 @@
#define MAILBOX_IRQ INT_MAIL_MPU_IRQ

/* ----------------------------------- Function Prototypes */
-static struct lst_list *create_chirp_list(u32 uChirps);
+static struct lst_list *create_chirp_list(u32 chirps);

static void free_chirp_list(struct lst_list *lst);

@@ -709,18 +709,18 @@ func_end:
* ======== bridge_chnl_get_mgr_info ========
* Retrieve information related to the channel manager.
*/
-int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 uChnlID,
+int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 ch_id,
OUT struct chnl_mgrinfo *mgr_info)
{
int status = 0;
struct chnl_mgr *chnl_mgr_obj = (struct chnl_mgr *)hchnl_mgr;

if (mgr_info != NULL) {
- if (uChnlID <= CHNL_MAXCHANNELS) {
+ if (ch_id <= CHNL_MAXCHANNELS) {
if (hchnl_mgr) {
/* Return the requested information: */
mgr_info->chnl_obj =
- chnl_mgr_obj->ap_channel[uChnlID];
+ chnl_mgr_obj->ap_channel[ch_id];
mgr_info->open_channels =
chnl_mgr_obj->open_channels;
mgr_info->dw_type = chnl_mgr_obj->dw_type;
@@ -776,7 +776,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,
*/
int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr, s8 chnl_mode,
- u32 uChnlId, CONST IN struct chnl_attr *pattrs)
+ u32 ch_id, CONST IN struct chnl_attr *pattrs)
{
int status = 0;
struct chnl_mgr *chnl_mgr_obj = hchnl_mgr;
@@ -794,23 +794,23 @@ int bridge_chnl_open(OUT struct chnl_object **chnl,
if (!hchnl_mgr) {
status = -EFAULT;
} else {
- if (uChnlId != CHNL_PICKFREE) {
- if (uChnlId >= chnl_mgr_obj->max_channels)
+ if (ch_id != CHNL_PICKFREE) {
+ if (ch_id >= chnl_mgr_obj->max_channels)
status = -ECHRNG;
- else if (chnl_mgr_obj->ap_channel[uChnlId] !=
+ else if (chnl_mgr_obj->ap_channel[ch_id] !=
NULL)
status = -EALREADY;
} else {
/* Check for free channel */
status =
- search_free_channel(chnl_mgr_obj, &uChnlId);
+ search_free_channel(chnl_mgr_obj, &ch_id);
}
}
}
if (DSP_FAILED(status))
goto func_end;

- DBC_ASSERT(uChnlId < chnl_mgr_obj->max_channels);
+ DBC_ASSERT(ch_id < chnl_mgr_obj->max_channels);
/* Create channel object: */
pchnl = kzalloc(sizeof(struct chnl_object), GFP_KERNEL);
if (!pchnl) {
@@ -846,7 +846,7 @@ int bridge_chnl_open(OUT struct chnl_object **chnl,
pchnl->free_packets_list) {
/* Initialize CHNL object fields: */
pchnl->chnl_mgr_obj = chnl_mgr_obj;
- pchnl->chnl_id = uChnlId;
+ pchnl->chnl_id = ch_id;
pchnl->chnl_mode = chnl_mode;
pchnl->user_event = sync_event;
pchnl->sync_event = sync_event;
@@ -926,13 +926,13 @@ int bridge_chnl_register_notify(struct chnl_object *chnl_obj,
* Purpose:
* Initialize a queue of channel I/O Request/Completion packets.
* Parameters:
- * uChirps: Number of Chirps to allocate.
+ * chirps: Number of Chirps to allocate.
* Returns:
* Pointer to queue of IRPs, or NULL.
* Requires:
* Ensures:
*/
-static struct lst_list *create_chirp_list(u32 uChirps)
+static struct lst_list *create_chirp_list(u32 chirps)
{
struct lst_list *chirp_list;
struct chnl_irp *chnl_packet_obj;
@@ -943,14 +943,14 @@ static struct lst_list *create_chirp_list(u32 uChirps)
if (chirp_list) {
INIT_LIST_HEAD(&chirp_list->head);
/* Make N chirps and place on queue. */
- for (i = 0; (i < uChirps)
+ for (i = 0; (i < chirps)
&& ((chnl_packet_obj = make_new_chirp()) != NULL); i++) {
lst_put_tail(chirp_list,
(struct list_head *)chnl_packet_obj);
}

/* If we couldn't allocate all chirps, free those allocated: */
- if (i != uChirps) {
+ if (i != chirps) {
free_chirp_list(chirp_list);
chirp_list = NULL;
}
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 2d56f02..0cc61a5 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -1522,7 +1522,7 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
"0x%x\n", paddr, ul_num_bytes);
bad_page_dump(paddr, pg);
} else {
- SetPageDirty(pg);
+ set_page_dirty(pg);
page_cache_release(pg);
}
paddr += HW_PAGE_SIZE4KB;
@@ -1586,7 +1586,7 @@ skip_coarse_page:
"0x%x\n", paddr, ul_num_bytes);
bad_page_dump(paddr, pg);
} else {
- SetPageDirty(pg);
+ set_page_dirty(pg);
page_cache_release(pg);
}
}
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.c b/drivers/staging/tidspbridge/hw/hw_mmu.c
index fd1a4cc..28916a7 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.c
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.c
@@ -258,7 +258,7 @@ hw_status hw_mmu_fault_addr_read(const void __iomem *base_address, u32 *addr)
return status;
}

-hw_status hw_mmu_ttb_set(const void __iomem *base_address, u32 TTBPhysAddr)
+hw_status hw_mmu_ttb_set(const void __iomem *base_address, u32 ttb_phys_addr)
{
hw_status status = RET_OK;
u32 load_ttb;
@@ -267,7 +267,7 @@ hw_status hw_mmu_ttb_set(const void __iomem *base_address, u32 TTBPhysAddr)
CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
RES_MMU_BASE + RES_INVALID_INPUT_PARAM);

- load_ttb = TTBPhysAddr & ~0x7FUL;
+ load_ttb = ttb_phys_addr & ~0x7FUL;
/* write values to register */
MMUMMU_TTB_WRITE_REGISTER32(base_address, load_ttb);

diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 9bcc71b..6e02b96 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -70,7 +70,7 @@ extern hw_status hw_mmu_fault_addr_read(const void __iomem *base_address,

/* Set the TT base address */
extern hw_status hw_mmu_ttb_set(const void __iomem *base_address,
- u32 TTBPhysAddr);
+ u32 ttb_phys_addr);

extern hw_status hw_mmu_twl_enable(const void __iomem *base_address);

diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dbdefs.h
index aba8a86..bed7a56
--- a/drivers/staging/tidspbridge/include/dspbridge/dbdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbdefs.h
@@ -94,8 +94,8 @@
#define DSPWORDSIZE sizeof(DSPWORD)

/* Success & Failure macros */
-#define DSP_SUCCEEDED(Status) likely((s32)(Status) >= 0)
-#define DSP_FAILED(Status) unlikely((s32)(Status) < 0)
+#define DSP_SUCCEEDED(status) likely((s32)(status) >= 0)
+#define DSP_FAILED(status) unlikely((s32)(status) < 0)

/* Power control enumerations */
#define PROC_PWRCONTROL 0x8070
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
index fa4c99f..d2b4fda 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
@@ -420,7 +420,7 @@ typedef int(*dbll_open_fxn) (struct dbll_tar_obj *target, char *file,
*/
typedef int(*dbll_read_sect_fxn) (struct dbll_library_obj *lib,
char *name, char *content,
- u32 uContentSize);
+ u32 cont_size);

/*
* ======== dbll_set_attrs ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index a0f84d4..77674f0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -450,7 +450,7 @@ extern void mem_ext_phys_pool_release(void);
* Allocate physically contiguous, uncached memory
* Parameters:
* byte_size: Number of bytes to allocate.
- * ulAlign: Alignment Mask.
+ * align_mask: Alignment Mask.
* physical_address: Physical address of allocated memory.
* Returns:
* Pointer to a block of memory;
@@ -463,7 +463,7 @@ extern void mem_ext_phys_pool_release(void);
* location of memory.
*/
extern void *mem_alloc_phys_mem(IN u32 byte_size,
- IN u32 ulAlign, OUT u32 *physical_address);
+ IN u32 align_mask, OUT u32 *physical_address);

/*
* ======== mem_free_phys_mem ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h b/drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h
index cc4e75b..fa3ba6b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h
@@ -24,7 +24,7 @@
#include <dspbridge/strmdefs.h>
#include <dspbridge/dbdcd.h>

-union Trapped_Args {
+union trapped_args {

/* MGR Module */
struct {
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspapi.h b/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
index 765a175..c99c687 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspapi.h
@@ -50,7 +50,7 @@
* Ensures:
*/
extern int api_call_dev_ioctl(unsigned int cmd,
- union Trapped_Args *args,
+ union trapped_args *args,
u32 *result, void *pr_ctxt);

/*
@@ -98,70 +98,70 @@ extern int api_init_complete2(void);
extern void api_exit(void);

/* MGR wrapper functions */
-extern u32 mgrwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt);
-extern u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt);
-extern u32 mgrwrap_register_object(union Trapped_Args *args, void *pr_ctxt);
-extern u32 mgrwrap_unregister_object(union Trapped_Args *args, void *pr_ctxt);
-extern u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args,
+extern u32 mgrwrap_enum_node_info(union trapped_args *args, void *pr_ctxt);
+extern u32 mgrwrap_enum_proc_info(union trapped_args *args, void *pr_ctxt);
+extern u32 mgrwrap_register_object(union trapped_args *args, void *pr_ctxt);
+extern u32 mgrwrap_unregister_object(union trapped_args *args, void *pr_ctxt);
+extern u32 mgrwrap_wait_for_bridge_events(union trapped_args *args,
void *pr_ctxt);

-extern u32 mgrwrap_get_process_resources_info(union Trapped_Args *args,
+extern u32 mgrwrap_get_process_resources_info(union trapped_args *args,
void *pr_ctxt);

/* CPRC (Processor) wrapper Functions */
-extern u32 procwrap_attach(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_ctrl(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_detach(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_enum_resources(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_get_state(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_get_trace(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_load(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_register_notify(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_start(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_un_reserve_memory(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_un_map(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_stop(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_invalidate_memory(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_begin_dma(union Trapped_Args *args, void *pr_ctxt);
-extern u32 procwrap_end_dma(union Trapped_Args *args, void *pr_ctxt);
+extern u32 procwrap_attach(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_ctrl(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_detach(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_enum_node_info(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_enum_resources(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_get_state(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_get_trace(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_load(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_register_notify(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_start(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_reserve_memory(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_un_reserve_memory(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_map(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_un_map(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_flush_memory(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_stop(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_invalidate_memory(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_begin_dma(union trapped_args *args, void *pr_ctxt);
+extern u32 procwrap_end_dma(union trapped_args *args, void *pr_ctxt);

/* NODE wrapper functions */
-extern u32 nodewrap_allocate(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_alloc_msg_buf(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_change_priority(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_connect(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_create(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_delete(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_free_msg_buf(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_get_attr(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_get_message(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_pause(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_put_message(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_register_notify(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_run(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_terminate(union Trapped_Args *args, void *pr_ctxt);
-extern u32 nodewrap_get_uuid_props(union Trapped_Args *args, void *pr_ctxt);
+extern u32 nodewrap_allocate(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_alloc_msg_buf(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_change_priority(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_connect(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_create(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_delete(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_free_msg_buf(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_get_attr(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_get_message(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_pause(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_put_message(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_register_notify(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_run(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_terminate(union trapped_args *args, void *pr_ctxt);
+extern u32 nodewrap_get_uuid_props(union trapped_args *args, void *pr_ctxt);

/* STRM wrapper functions */
-extern u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_close(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_get_event_handle(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_get_info(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_idle(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_issue(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_reclaim(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_register_notify(union Trapped_Args *args, void *pr_ctxt);
-extern u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt);
+extern u32 strmwrap_allocate_buffer(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_close(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_free_buffer(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_get_event_handle(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_get_info(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_idle(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_issue(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_open(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_reclaim(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_register_notify(union trapped_args *args, void *pr_ctxt);
+extern u32 strmwrap_select(union trapped_args *args, void *pr_ctxt);

-extern u32 cmmwrap_calloc_buf(union Trapped_Args *args, void *pr_ctxt);
-extern u32 cmmwrap_free_buf(union Trapped_Args *args, void *pr_ctxt);
-extern u32 cmmwrap_get_handle(union Trapped_Args *args, void *pr_ctxt);
-extern u32 cmmwrap_get_info(union Trapped_Args *args, void *pr_ctxt);
+extern u32 cmmwrap_calloc_buf(union trapped_args *args, void *pr_ctxt);
+extern u32 cmmwrap_free_buf(union trapped_args *args, void *pr_ctxt);
+extern u32 cmmwrap_get_handle(union trapped_args *args, void *pr_ctxt);
+extern u32 cmmwrap_get_info(union trapped_args *args, void *pr_ctxt);

#endif /* DSPAPI_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
index cb7e18b..c08cc00 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspchnl.h
@@ -34,7 +34,7 @@ extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);
extern int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
- u32 uChnlId,
+ u32 ch_id,
CONST IN OPTIONAL struct chnl_attr
*pattrs);

@@ -57,7 +57,7 @@ extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,
OUT struct chnl_info *channel_info);

extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
- u32 uChnlID, OUT struct chnl_mgrinfo
+ u32 ch_id, OUT struct chnl_mgrinfo
*mgr_info);

extern int bridge_chnl_idle(struct chnl_object *chnl_obj,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index f68a7ff..64ab068 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -373,7 +373,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* CHNL_GetMgr().
* chnl_mode: One of {CHNL_MODETODSP, CHNL_MODEFROMDSP} specifies
* direction of data transfer.
- * uChnlId: If CHNL_PICKFREE is specified, the channel manager will
+ * ch_id: If CHNL_PICKFREE is specified, the channel manager will
* select a free channel id (default);
* otherwise this field specifies the id of the channel.
* pattrs: Channel attributes. Attribute fields are as follows:
@@ -411,7 +411,7 @@ typedef int(*fxn_chnl_open) (OUT struct chnl_object
**chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
- u32 uChnlId,
+ u32 ch_id,
CONST IN OPTIONAL struct
chnl_attr * pattrs);

@@ -569,7 +569,7 @@ typedef int(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
* Retrieve information related to the channel manager.
* Parameters:
* hchnl_mgr: Handle to a valid channel manager, or NULL.
- * uChnlID: Channel ID.
+ * ch_id: Channel ID.
* mgr_info: Location to store channel manager info.
* Returns:
* 0: Success;
@@ -582,7 +582,7 @@ typedef int(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,
*/
typedef int(*fxn_chnl_getmgrinfo) (struct chnl_mgr
* hchnl_mgr,
- u32 uChnlID,
+ u32 ch_id,
OUT struct chnl_mgrinfo *mgr_info);

/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index cc8885e..bf3590c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -141,20 +141,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* Initialize DSP DMA channel descriptor.
* Parameters:
* hio_mgr: Handle to a I/O manager.
- * uDDMAChnlId: DDMA channel identifier.
+ * ddma_chnl_id: DDMA channel identifier.
* uNumDesc: Number of buffer descriptors(equals # of IOReqs &
* Chirps)
* dsp: Dsp address;
* Returns:
* Requires:
- * uDDMAChnlId < DDMA_MAXDDMACHNLS
+ * ddma_chnl_id < DDMA_MAXDDMACHNLS
* uNumDesc > 0
* pVa != NULL
* pDspPa != NULL
*
* Ensures:
*/
-extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 uDDMAChnlId,
+extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
u32 uNumDesc, void *dsp);

/*
@@ -163,13 +163,13 @@ extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 uDDMAChnlId,
* Clear DSP DMA channel descriptor.
* Parameters:
* hio_mgr: Handle to a I/O manager.
- * uDDMAChnlId: DDMA channel identifier.
+ * ddma_chnl_id: DDMA channel identifier.
* Returns:
* Requires:
- * uDDMAChnlId < DDMA_MAXDDMACHNLS
+ * ddma_chnl_id < DDMA_MAXDDMACHNLS
* Ensures:
*/
-extern void io_ddma_clear_chnl_desc(struct io_mgr *hio_mgr, u32 uDDMAChnlId);
+extern void io_ddma_clear_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id);

/*
* ======== io_ddma_request_chnl ========
@@ -205,7 +205,7 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
* uZId: zero-copy channel identifier.
* Returns:
* Requires:
- * uDDMAChnlId < DDMA_MAXZCPYCHNLS
+ * ddma_chnl_id < DDMA_MAXZCPYCHNLS
* hio_mgr != Null
* Ensures:
*/
@@ -217,14 +217,14 @@ extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 uZId);
* Clear DSP ZC channel descriptor.
* Parameters:
* hio_mgr: Handle to a I/O manager.
- * uChnlId: ZC channel identifier.
+ * ch_id: ZC channel identifier.
* Returns:
* Requires:
* hio_mgr is valid
- * uChnlId < DDMA_MAXZCPYCHNLS
+ * ch_id < DDMA_MAXZCPYCHNLS
* Ensures:
*/
-extern void io_ddzc_clear_chnl_desc(struct io_mgr *hio_mgr, u32 uChnlId);
+extern void io_ddzc_clear_chnl_desc(struct io_mgr *hio_mgr, u32 ch_id);

/*
* ======== io_ddzc_request_chnl ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index 5583bd5..e7a9510 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -365,18 +365,18 @@ extern int proc_register_notify(void *hprocessor,
* Notify the Processor Clients
* Parameters:
* proc : The processor handle.
- * uEvents : Event to be notified about.
+ * events : Event to be notified about.
* Returns:
* 0 : Success.
* -EFAULT : Invalid processor handle.
* -EPERM : Failure to Set or Reset the Event
* Requires:
- * uEvents is Supported or Valid type of Event
+ * events is Supported or Valid type of Event
* proc is a valid handle
* PROC Initialized.
* Ensures:
*/
-extern int proc_notify_clients(void *proc, u32 uEvents);
+extern int proc_notify_clients(void *proc, u32 events);

/*
* ======== proc_notify_all_clients ========
@@ -384,13 +384,13 @@ extern int proc_notify_clients(void *proc, u32 uEvents);
* Notify the Processor Clients
* Parameters:
* proc : The processor handle.
- * uEvents : Event to be notified about.
+ * events : Event to be notified about.
* Returns:
* 0 : Success.
* -EFAULT : Invalid processor handle.
* -EPERM : Failure to Set or Reset the Event
* Requires:
- * uEvents is Supported or Valid type of Event
+ * events is Supported or Valid type of Event
* proc is a valid handle
* PROC Initialized.
* Ensures:
@@ -398,7 +398,7 @@ extern int proc_notify_clients(void *proc, u32 uEvents);
* NODE And STRM would use this function to notify their clients
* about the state changes in NODE or STRM.
*/
-extern int proc_notify_all_clients(void *proc, u32 uEvents);
+extern int proc_notify_all_clients(void *proc, u32 events);

/*
* ======== proc_start ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/pwr.h b/drivers/staging/tidspbridge/include/dspbridge/pwr.h
index 63ccf8c..9f32c89 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/pwr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/pwr.h
@@ -25,7 +25,7 @@
* Signal the DSP to go to sleep.
*
* Parameters:
- * sleepCode: New sleep state for DSP. (Initially, valid codes
+ * sleep_code: New sleep state for DSP. (Initially, valid codes
* are PWR_DEEPSLEEP or PWR_EMERGENCYDEEPSLEEP; both of
* these codes will simply put the DSP in deep sleep.)
*
@@ -39,13 +39,13 @@
* Returns:
* 0: Success.
* 0: Success, but the DSP was already asleep.
- * -EINVAL: The specified sleepCode is not supported.
+ * -EINVAL: The specified sleep_code is not supported.
* -ETIME: A timeout occured while waiting for DSP sleep
* confirmation.
* -EPERM: General failure, unable to send sleep command to
* the DSP.
*/
-extern int pwr_sleep_dsp(IN CONST u32 sleepCode, IN CONST u32 timeout);
+extern int pwr_sleep_dsp(IN CONST u32 sleep_code, IN CONST u32 timeout);

/*
* ======== pwr_wake_dsp ========
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 7597210..7ff2bd0 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -69,7 +69,7 @@

/* Device IOCtl function pointer */
struct api_cmd {
- u32(*fxn) (union Trapped_Args *args, void *pr_ctxt);
+ u32(*fxn) (union trapped_args *args, void *pr_ctxt);
u32 dw_index;
};

@@ -208,10 +208,10 @@ static inline void _cp_to_usr(void __user *to, const void *from,
* Purpose:
* Call the (wrapper) function for the corresponding API IOCTL.
*/
-inline int api_call_dev_ioctl(u32 cmd, union Trapped_Args *args,
+inline int api_call_dev_ioctl(u32 cmd, union trapped_args *args,
u32 *result, void *pr_ctxt)
{
- u32(*ioctl_cmd) (union Trapped_Args *args, void *pr_ctxt) = NULL;
+ u32(*ioctl_cmd) (union trapped_args *args, void *pr_ctxt) = NULL;
int i;

if (_IOC_TYPE(cmd) != DB) {
@@ -411,7 +411,7 @@ int api_init_complete2(void)
/*
* ======== mgrwrap_enum_node_info ========
*/
-u32 mgrwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt)
+u32 mgrwrap_enum_node_info(union trapped_args *args, void *pr_ctxt)
{
u8 *pndb_props;
u32 num_nodes;
@@ -443,7 +443,7 @@ u32 mgrwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== mgrwrap_enum_proc_info ========
*/
-u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt)
+u32 mgrwrap_enum_proc_info(union trapped_args *args, void *pr_ctxt)
{
u8 *processor_info;
u8 num_procs;
@@ -477,7 +477,7 @@ u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== mgrwrap_register_object ========
*/
-u32 mgrwrap_register_object(union Trapped_Args *args, void *pr_ctxt)
+u32 mgrwrap_register_object(union trapped_args *args, void *pr_ctxt)
{
u32 ret;
struct dsp_uuid uuid_obj;
@@ -517,7 +517,7 @@ func_end:
/*
* ======== mgrwrap_unregister_object ========
*/
-u32 mgrwrap_unregister_object(union Trapped_Args *args, void *pr_ctxt)
+u32 mgrwrap_unregister_object(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_uuid uuid_obj;
@@ -537,7 +537,7 @@ func_end:
/*
* ======== mgrwrap_wait_for_bridge_events ========
*/
-u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args, void *pr_ctxt)
+u32 mgrwrap_wait_for_bridge_events(union trapped_args *args, void *pr_ctxt)
{
int status = 0, real_status = 0;
struct dsp_notification *anotifications[MAX_EVENTS];
@@ -572,7 +572,7 @@ u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== MGRWRAP_GetProcessResourceInfo ========
*/
-u32 __deprecated mgrwrap_get_process_resources_info(union Trapped_Args * args,
+u32 __deprecated mgrwrap_get_process_resources_info(union trapped_args * args,
void *pr_ctxt)
{
pr_err("%s: deprecated dspbridge ioctl\n", __func__);
@@ -582,7 +582,7 @@ u32 __deprecated mgrwrap_get_process_resources_info(union Trapped_Args * args,
/*
* ======== procwrap_attach ========
*/
-u32 procwrap_attach(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_attach(union trapped_args *args, void *pr_ctxt)
{
void *processor;
int status = 0;
@@ -608,7 +608,7 @@ func_end:
/*
* ======== procwrap_ctrl ========
*/
-u32 procwrap_ctrl(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_ctrl(union trapped_args *args, void *pr_ctxt)
{
u32 cb_data_size, __user * psize = (u32 __user *)
args->args_proc_ctrl.pargs;
@@ -645,7 +645,7 @@ func_end:
/*
* ======== procwrap_detach ========
*/
-u32 __deprecated procwrap_detach(union Trapped_Args * args, void *pr_ctxt)
+u32 __deprecated procwrap_detach(union trapped_args * args, void *pr_ctxt)
{
/* proc_detach called at bridge_release only */
pr_err("%s: deprecated dspbridge ioctl\n", __func__);
@@ -655,7 +655,7 @@ u32 __deprecated procwrap_detach(union Trapped_Args * args, void *pr_ctxt)
/*
* ======== procwrap_enum_node_info ========
*/
-u32 procwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_enum_node_info(union trapped_args *args, void *pr_ctxt)
{
int status;
void *node_tab[MAX_NODES];
@@ -678,7 +678,7 @@ u32 procwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt)
return status;
}

-u32 procwrap_end_dma(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_end_dma(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -692,7 +692,7 @@ u32 procwrap_end_dma(union Trapped_Args *args, void *pr_ctxt)
return status;
}

-u32 procwrap_begin_dma(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_begin_dma(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -709,7 +709,7 @@ u32 procwrap_begin_dma(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_flush_memory ========
*/
-u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_flush_memory(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -727,7 +727,7 @@ u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_invalidate_memory ========
*/
-u32 procwrap_invalidate_memory(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_invalidate_memory(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -741,7 +741,7 @@ u32 procwrap_invalidate_memory(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_enum_resources ========
*/
-u32 procwrap_enum_resources(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_enum_resources(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_resourceinfo resource_info;
@@ -767,7 +767,7 @@ u32 procwrap_enum_resources(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_get_state ========
*/
-u32 procwrap_get_state(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_get_state(union trapped_args *args, void *pr_ctxt)
{
int status;
struct dsp_processorstate proc_state;
@@ -788,7 +788,7 @@ u32 procwrap_get_state(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_get_trace ========
*/
-u32 procwrap_get_trace(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_get_trace(union trapped_args *args, void *pr_ctxt)
{
int status;
u8 *pbuf;
@@ -814,7 +814,7 @@ u32 procwrap_get_trace(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_load ========
*/
-u32 procwrap_load(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_load(union trapped_args *args, void *pr_ctxt)
{
s32 i, len;
int status = 0;
@@ -930,7 +930,7 @@ func_cont:
/*
* ======== procwrap_map ========
*/
-u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_map(union trapped_args *args, void *pr_ctxt)
{
int status;
void *map_addr;
@@ -957,7 +957,7 @@ u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_register_notify ========
*/
-u32 procwrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_register_notify(union trapped_args *args, void *pr_ctxt)
{
int status;
struct dsp_notification notification;
@@ -979,7 +979,7 @@ u32 procwrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_reserve_memory ========
*/
-u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_reserve_memory(union trapped_args *args, void *pr_ctxt)
{
int status;
void *prsv_addr;
@@ -1004,7 +1004,7 @@ u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_start ========
*/
-u32 procwrap_start(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_start(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1015,7 +1015,7 @@ u32 procwrap_start(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_un_map ========
*/
-u32 procwrap_un_map(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_un_map(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -1027,7 +1027,7 @@ u32 procwrap_un_map(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_un_reserve_memory ========
*/
-u32 procwrap_un_reserve_memory(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_un_reserve_memory(union trapped_args *args, void *pr_ctxt)
{
int status;

@@ -1040,7 +1040,7 @@ u32 procwrap_un_reserve_memory(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== procwrap_stop ========
*/
-u32 procwrap_stop(union Trapped_Args *args, void *pr_ctxt)
+u32 procwrap_stop(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1052,7 +1052,7 @@ u32 procwrap_stop(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_allocate ========
*/
-u32 nodewrap_allocate(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_allocate(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_uuid node_uuid;
@@ -1111,7 +1111,7 @@ func_cont:
/*
* ======== nodewrap_alloc_msg_buf ========
*/
-u32 nodewrap_alloc_msg_buf(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_alloc_msg_buf(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_bufferattr *pattr = NULL;
@@ -1141,7 +1141,7 @@ u32 nodewrap_alloc_msg_buf(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_change_priority ========
*/
-u32 nodewrap_change_priority(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_change_priority(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1154,7 +1154,7 @@ u32 nodewrap_change_priority(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_connect ========
*/
-u32 nodewrap_connect(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_connect(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_strmattr attrs;
@@ -1204,7 +1204,7 @@ func_cont:
/*
* ======== nodewrap_create ========
*/
-u32 nodewrap_create(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_create(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1216,7 +1216,7 @@ u32 nodewrap_create(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_delete ========
*/
-u32 nodewrap_delete(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_delete(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1228,7 +1228,7 @@ u32 nodewrap_delete(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_free_msg_buf ========
*/
-u32 nodewrap_free_msg_buf(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_free_msg_buf(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_bufferattr *pattr = NULL;
@@ -1255,7 +1255,7 @@ u32 nodewrap_free_msg_buf(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_get_attr ========
*/
-u32 nodewrap_get_attr(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_get_attr(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_nodeattr attr;
@@ -1270,7 +1270,7 @@ u32 nodewrap_get_attr(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_get_message ========
*/
-u32 nodewrap_get_message(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_get_message(union trapped_args *args, void *pr_ctxt)
{
int status;
struct dsp_msg msg;
@@ -1286,7 +1286,7 @@ u32 nodewrap_get_message(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_pause ========
*/
-u32 nodewrap_pause(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_pause(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1298,7 +1298,7 @@ u32 nodewrap_pause(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_put_message ========
*/
-u32 nodewrap_put_message(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_put_message(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_msg msg;
@@ -1317,7 +1317,7 @@ u32 nodewrap_put_message(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_register_notify ========
*/
-u32 nodewrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_register_notify(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_notification notification;
@@ -1343,7 +1343,7 @@ u32 nodewrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_run ========
*/
-u32 nodewrap_run(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_run(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1355,7 +1355,7 @@ u32 nodewrap_run(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_terminate ========
*/
-u32 nodewrap_terminate(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_terminate(union trapped_args *args, void *pr_ctxt)
{
int status;
int tempstatus;
@@ -1370,7 +1370,7 @@ u32 nodewrap_terminate(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== nodewrap_get_uuid_props ========
*/
-u32 nodewrap_get_uuid_props(union Trapped_Args *args, void *pr_ctxt)
+u32 nodewrap_get_uuid_props(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_uuid node_uuid;
@@ -1397,7 +1397,7 @@ func_cont:
/*
* ======== strmwrap_allocate_buffer ========
*/
-u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_allocate_buffer(union trapped_args *args, void *pr_ctxt)
{
int status;
u8 **ap_buffer = NULL;
@@ -1428,7 +1428,7 @@ u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_close ========
*/
-u32 strmwrap_close(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_close(union trapped_args *args, void *pr_ctxt)
{
return strm_close(args->args_strm_close.hstream, pr_ctxt);
}
@@ -1436,7 +1436,7 @@ u32 strmwrap_close(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_free_buffer ========
*/
-u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_free_buffer(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
u8 **ap_buffer = NULL;
@@ -1464,7 +1464,7 @@ u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_get_event_handle ========
*/
-u32 __deprecated strmwrap_get_event_handle(union Trapped_Args * args,
+u32 __deprecated strmwrap_get_event_handle(union trapped_args * args,
void *pr_ctxt)
{
pr_err("%s: deprecated dspbridge ioctl\n", __func__);
@@ -1474,7 +1474,7 @@ u32 __deprecated strmwrap_get_event_handle(union Trapped_Args * args,
/*
* ======== strmwrap_get_info ========
*/
-u32 strmwrap_get_info(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_get_info(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct stream_info strm_info;
@@ -1501,7 +1501,7 @@ u32 strmwrap_get_info(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_idle ========
*/
-u32 strmwrap_idle(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_idle(union trapped_args *args, void *pr_ctxt)
{
u32 ret;

@@ -1514,7 +1514,7 @@ u32 strmwrap_idle(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_issue ========
*/
-u32 strmwrap_issue(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_issue(union trapped_args *args, void *pr_ctxt)
{
int status = 0;

@@ -1536,7 +1536,7 @@ u32 strmwrap_issue(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_open ========
*/
-u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_open(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct strm_attr attr;
@@ -1565,7 +1565,7 @@ u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_reclaim ========
*/
-u32 strmwrap_reclaim(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_reclaim(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
u8 *buf_ptr;
@@ -1590,7 +1590,7 @@ u32 strmwrap_reclaim(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_register_notify ========
*/
-u32 strmwrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_register_notify(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct dsp_notification notification;
@@ -1612,7 +1612,7 @@ u32 strmwrap_register_notify(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== strmwrap_select ========
*/
-u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt)
+u32 strmwrap_select(union trapped_args *args, void *pr_ctxt)
{
u32 mask;
struct strm_object *strm_tab[MAX_STREAMS];
@@ -1636,7 +1636,7 @@ u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== cmmwrap_calloc_buf ========
*/
-u32 __deprecated cmmwrap_calloc_buf(union Trapped_Args * args, void *pr_ctxt)
+u32 __deprecated cmmwrap_calloc_buf(union trapped_args * args, void *pr_ctxt)
{
/* This operation is done in kernel */
pr_err("%s: deprecated dspbridge ioctl\n", __func__);
@@ -1646,7 +1646,7 @@ u32 __deprecated cmmwrap_calloc_buf(union Trapped_Args * args, void *pr_ctxt)
/*
* ======== cmmwrap_free_buf ========
*/
-u32 __deprecated cmmwrap_free_buf(union Trapped_Args * args, void *pr_ctxt)
+u32 __deprecated cmmwrap_free_buf(union trapped_args * args, void *pr_ctxt)
{
/* This operation is done in kernel */
pr_err("%s: deprecated dspbridge ioctl\n", __func__);
@@ -1656,7 +1656,7 @@ u32 __deprecated cmmwrap_free_buf(union Trapped_Args * args, void *pr_ctxt)
/*
* ======== cmmwrap_get_handle ========
*/
-u32 cmmwrap_get_handle(union Trapped_Args *args, void *pr_ctxt)
+u32 cmmwrap_get_handle(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct cmm_object *hcmm_mgr;
@@ -1671,7 +1671,7 @@ u32 cmmwrap_get_handle(union Trapped_Args *args, void *pr_ctxt)
/*
* ======== cmmwrap_get_info ========
*/
-u32 cmmwrap_get_info(union Trapped_Args *args, void *pr_ctxt)
+u32 cmmwrap_get_info(union trapped_args *args, void *pr_ctxt)
{
int status = 0;
struct cmm_info cmm_info_obj;
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index cbf03ef..bef52bc 100755
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -1012,14 +1012,15 @@ static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * phys_addr)
* Purpose:
* Allocate physically contiguous, uncached memory
*/
-void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * physical_address)
+void *mem_alloc_phys_mem(u32 byte_size, u32 align_mask,
+ OUT u32 *physical_address)
{
void *va_mem = NULL;
dma_addr_t pa_mem;

if (byte_size > 0) {
if (ext_phys_mem_pool_enabled) {
- va_mem = mem_ext_phys_mem_alloc(byte_size, ulAlign,
+ va_mem = mem_ext_phys_mem_alloc(byte_size, align_mask,
(u32 *) &pa_mem);
} else
va_mem = dma_alloc_coherent(NULL, byte_size, &pa_mem,
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index eb6f00f..56c239c 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -561,7 +561,7 @@ static long bridge_ioctl(struct file *filp, unsigned int code,
{
int status;
u32 retval = 0;
- union Trapped_Args buf_in;
+ union trapped_args buf_in;

DBC_REQUIRE(filp != NULL);
#ifdef CONFIG_BRIDGE_RECOVERY
@@ -581,8 +581,8 @@ static long bridge_ioctl(struct file *filp, unsigned int code,
goto err;
}

- status = copy_from_user(&buf_in, (union Trapped_Args *)args,
- sizeof(union Trapped_Args));
+ status = copy_from_user(&buf_in, (union trapped_args *)args,
+ sizeof(union trapped_args));

if (!status) {
status = api_call_dev_ioctl(code, &buf_in, &retval,
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 13be7ed..2ee7aad 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -296,7 +296,7 @@ static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
static void free_sects(struct nldr_object *nldr_obj,
struct ovly_sect *phase_sects, u16 alloc_num);
static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
- char *symName, struct dbll_sym_val **sym);
+ char *sym_name, struct dbll_sym_val **sym);
static int load_lib(struct nldr_nodeobject *nldr_node_obj,
struct lib_node *root, struct dsp_uuid uuid,
bool root_prstnt,
@@ -306,7 +306,7 @@ static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
static int remote_alloc(void **ref, u16 mem_sect_type, u32 size,
u32 align, u32 *dsp_address,
- OPTIONAL s32 segmentId,
+ OPTIONAL s32 segmnt_id,
OPTIONAL s32 req, bool reserve);
static int remote_free(void **ref, u16 space, u32 dsp_address, u32 size,
bool reserve);
@@ -1625,7 +1625,7 @@ func_end:
*/
static int remote_alloc(void **ref, u16 space, u32 size,
u32 align, u32 *dsp_address,
- OPTIONAL s32 segmentId, OPTIONAL s32 req,
+ OPTIONAL s32 segmnt_id, OPTIONAL s32 req,
bool reserve)
{
struct nldr_nodeobject *hnode = (struct nldr_nodeobject *)ref;
@@ -1651,9 +1651,9 @@ static int remote_alloc(void **ref, u16 space, u32 size,
/* Modify memory 'align' to account for DSP cache line size */
align = find_lcm(GEM_CACHE_LINE_SIZE, align);
dev_dbg(bridge, "%s: memory align to 0x%x\n", __func__, align);
- if (segmentId != -1) {
- rmm_addr_obj->segid = segmentId;
- segid = segmentId;
+ if (segmnt_id != -1) {
+ rmm_addr_obj->segid = segmnt_id;
+ segid = segmnt_id;
mem_load_req = req;
} else {
switch (hnode->phase) {
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index d725ce4..3d345ea 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -111,7 +111,7 @@ DEFINE_MUTEX(proc_lock); /* For critical sections */
static int proc_monitor(struct proc_object *hprocessor);
static s32 get_envp_count(char **envp);
static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
- s32 cnew_envp, char *szVar);
+ s32 cnew_envp, char *sz_var);

/* remember mapping information */
static struct dmm_map_object *add_mapping_info(struct process_context *pr_ctxt,
@@ -1861,14 +1861,14 @@ static s32 get_envp_count(char **envp)
* copy in the existing var=value pairs in the old envp array.
*/
static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
- s32 cnew_envp, char *szVar)
+ s32 cnew_envp, char *sz_var)
{
char **pp_envp = new_envp;

DBC_REQUIRE(new_envp);

/* Prepend new environ var=value string */
- *new_envp++ = szVar;
+ *new_envp++ = sz_var;

/* Copy user's environment into our own. */
while (envp_elems--)
@@ -1886,20 +1886,20 @@ static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
* Purpose:
* Notify the processor the events.
*/
-int proc_notify_clients(void *proc, u32 uEvents)
+int proc_notify_clients(void *proc, u32 events)
{
int status = 0;
struct proc_object *p_proc_object = (struct proc_object *)proc;

DBC_REQUIRE(p_proc_object);
- DBC_REQUIRE(IS_VALID_PROC_EVENT(uEvents));
+ DBC_REQUIRE(IS_VALID_PROC_EVENT(events));
DBC_REQUIRE(refs > 0);
if (!p_proc_object) {
status = -EFAULT;
goto func_end;
}

- ntfy_notify(p_proc_object->ntfy_obj, uEvents);
+ ntfy_notify(p_proc_object->ntfy_obj, events);
func_end:
return status;
}
@@ -1910,12 +1910,12 @@ func_end:
* Notify the processor the events. This includes notifying all clients
* attached to a particulat DSP.
*/
-int proc_notify_all_clients(void *proc, u32 uEvents)
+int proc_notify_all_clients(void *proc, u32 events)
{
int status = 0;
struct proc_object *p_proc_object = (struct proc_object *)proc;

- DBC_REQUIRE(IS_VALID_PROC_EVENT(uEvents));
+ DBC_REQUIRE(IS_VALID_PROC_EVENT(events));
DBC_REQUIRE(refs > 0);

if (!p_proc_object) {
@@ -1923,7 +1923,7 @@ int proc_notify_all_clients(void *proc, u32 uEvents)
goto func_end;
}

- dev_notify_clients(p_proc_object->hdev_obj, uEvents);
+ dev_notify_clients(p_proc_object->hdev_obj, events);

func_end:
return status;
diff --git a/drivers/staging/tidspbridge/rmgr/pwr.c b/drivers/staging/tidspbridge/rmgr/pwr.c
index ec6d181..2d81743 100644
--- a/drivers/staging/tidspbridge/rmgr/pwr.c
+++ b/drivers/staging/tidspbridge/rmgr/pwr.c
@@ -36,7 +36,7 @@
* ======== pwr_sleep_dsp ========
* Send command to DSP to enter sleep state.
*/
-int pwr_sleep_dsp(IN CONST u32 sleepCode, IN CONST u32 timeout)
+int pwr_sleep_dsp(IN CONST u32 sleep_code, IN CONST u32 timeout)
{
struct bridge_drv_interface *intf_fxns;
struct bridge_dev_context *dw_context;
@@ -59,9 +59,9 @@ int pwr_sleep_dsp(IN CONST u32 sleepCode, IN CONST u32 timeout)
&intf_fxns))) {
continue;
}
- if (sleepCode == PWR_DEEPSLEEP)
+ if (sleep_code == PWR_DEEPSLEEP)
ioctlcode = BRDIOCTL_DEEPSLEEP;
- else if (sleepCode == PWR_EMERGENCYDEEPSLEEP)
+ else if (sleep_code == PWR_EMERGENCYDEEPSLEEP)
ioctlcode = BRDIOCTL_EMERGENCYSLEEP;
else
status = -EINVAL;
--
1.6.3.3

2010-07-08 23:32:49

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 00/16] staging: ti dspbridge: Remove CamelCase, reagroup variables.

On Thu, Jul 08, 2010 at 06:11:07PM -0500, Rene Sapiens wrote:
> The intention of this serie of patches is to rename the remaining variables
> with camel case. Words will be renamed avoiding CamelCase and Hungarian
> notation. Also the variables in the prototypes will be renamed to make them
> match with the ones in the function definitions.
>
> The variables to be renamed are:

<snip>

Only the 1st patch in this series applied, probably due to the other
changes that I just accepted into the linux-next tree for this driver.

So, can you rebase the remaining 15 patches against the linux-next tree
of tomorrow and resend them?

thanks,

greg k-h