Skip to content

Commit

Permalink
staging: ti dspbridge: Rename words with camel case
Browse files Browse the repository at this point in the history
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 <rene.sapiens@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rene Sapiens authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent 95870a8 commit aa09b09
Show file tree
Hide file tree
Showing 22 changed files with 118 additions and 118 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/core/chnl_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ========
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down
36 changes: 18 additions & 18 deletions drivers/staging/tidspbridge/core/tiomap3430.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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,
Expand All @@ -85,7 +85,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,
Expand All @@ -94,7 +94,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,
Expand All @@ -105,7 +105,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);
Expand Down Expand Up @@ -304,7 +304,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;
Expand All @@ -321,12 +321,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;
}

Expand Down Expand Up @@ -765,7 +765,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;
Expand All @@ -777,10 +777,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);
}

Expand All @@ -794,12 +794,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;
Expand All @@ -825,10 +825,10 @@ static int bridge_dev_create(OUT struct bridge_dev_context
dev_context->atlb_entry[entry_ndx].ul_dsp_va = 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)
Expand Down Expand Up @@ -1147,7 +1147,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;
Expand All @@ -1161,16 +1161,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;
}
Expand Down
16 changes: 8 additions & 8 deletions drivers/staging/tidspbridge/core/tiomap_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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)
{
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/core/tiomap_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand All @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/include/dspbridge/cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ 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.
* -ENODATA: Unable to retreive resource.
* 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 ========
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/tidspbridge/include/dspbridge/cmm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 ========
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/tidspbridge/include/dspbridge/cod.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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[]);

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/include/dspbridge/dbdcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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);

Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/tidspbridge/include/dspbridge/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@
* ======== 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).
* ul_num_bytes: Number of bytes to transfer.
* 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);

Expand Down Expand Up @@ -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 ========
Expand All @@ -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
Expand All @@ -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.
Expand Down
Loading

0 comments on commit aa09b09

Please sign in to comment.