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:
========================================
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 <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 e436d07 commit daa89e6
Show file tree
Hide file tree
Showing 23 changed files with 217 additions and 215 deletions.
50 changes: 25 additions & 25 deletions drivers/staging/tidspbridge/core/chnl_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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)
{
Expand All @@ -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;
Expand Down Expand Up @@ -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 */
Expand All @@ -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);
Expand Down Expand Up @@ -188,7 +188,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf,
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;

Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand All @@ -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))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -700,7 +700,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
}
func_cont:
/* Update User's IOC block: */
*pIOC = ioc;
*chan_ioc = ioc;
func_end:
return status;
}
Expand Down
24 changes: 12 additions & 12 deletions drivers/staging/tidspbridge/hw/hw_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,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
Expand Down Expand Up @@ -158,7 +158,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);
Expand Down Expand Up @@ -332,7 +332,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,
Expand Down Expand Up @@ -385,7 +385,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 */
Expand All @@ -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 physicalAddr,
u32 physical_addr,
u32 virtualAddr,
u32 page_sz, struct hw_mmu_map_attrs_t *map_attrs)
{
Expand All @@ -416,7 +416,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);
Expand All @@ -428,7 +428,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);
Expand All @@ -439,7 +439,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);
Expand All @@ -451,7 +451,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)
Expand All @@ -462,7 +462,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:
Expand Down Expand Up @@ -561,7 +561,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)
Expand All @@ -576,7 +576,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));

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/tidspbridge/hw/hw_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/tidspbridge/include/dspbridge/cmm.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,21 @@ 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:
* 0: Success.
* -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);

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 @@ -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.
Expand All @@ -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 ========
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/tidspbridge/include/dspbridge/dbll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 ========
Expand Down
Loading

0 comments on commit daa89e6

Please sign in to comment.