Commit 383b8345 authored by Rene Sapiens's avatar Rene Sapiens Committed by Greg Kroah-Hartman

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: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 13b18c29
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
* Note: snprintf format specifier is: * Note: snprintf format specifier is:
* %[flags] [width] [.precision] [{h | l | I64 | L}]type * %[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) IN s32 size)
{ {
s32 i; /* return result from snprintf. */ 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", "%.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->ul_data1, uuid_obj->us_data2, uuid_obj->us_data3,
uuid_obj->uc_data4, uuid_obj->uc_data5, uuid_obj->uc_data4, uuid_obj->uc_data5,
...@@ -75,39 +75,39 @@ static s32 uuid_hex_to_bin(char *buf, s32 len) ...@@ -75,39 +75,39 @@ static s32 uuid_hex_to_bin(char *buf, s32 len)
* Purpose: * Purpose:
* Converts a string to a struct dsp_uuid. * 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)
{ {
s32 j; s32 j;
uuid_obj->ul_data1 = uuid_hex_to_bin(pszUuid, 8); uuid_obj->ul_data1 = uuid_hex_to_bin(sz_uuid, 8);
pszUuid += 8; sz_uuid += 8;
/* Step over underscore */ /* Step over underscore */
pszUuid++; sz_uuid++;
uuid_obj->us_data2 = (u16) uuid_hex_to_bin(pszUuid, 4); uuid_obj->us_data2 = (u16) uuid_hex_to_bin(sz_uuid, 4);
pszUuid += 4; sz_uuid += 4;
/* Step over underscore */ /* Step over underscore */
pszUuid++; sz_uuid++;
uuid_obj->us_data3 = (u16) uuid_hex_to_bin(pszUuid, 4); uuid_obj->us_data3 = (u16) uuid_hex_to_bin(sz_uuid, 4);
pszUuid += 4; sz_uuid += 4;
/* Step over underscore */ /* Step over underscore */
pszUuid++; sz_uuid++;
uuid_obj->uc_data4 = (u8) uuid_hex_to_bin(pszUuid, 2); uuid_obj->uc_data4 = (u8) uuid_hex_to_bin(sz_uuid, 2);
pszUuid += 2; sz_uuid += 2;
uuid_obj->uc_data5 = (u8) uuid_hex_to_bin(pszUuid, 2); uuid_obj->uc_data5 = (u8) uuid_hex_to_bin(sz_uuid, 2);
pszUuid += 2; sz_uuid += 2;
/* Step over underscore */ /* Step over underscore */
pszUuid++; sz_uuid++;
for (j = 0; j < 6; j++) { for (j = 0; j < 6; j++) {
uuid_obj->uc_data6[j] = (u8) uuid_hex_to_bin(pszUuid, 2); uuid_obj->uc_data6[j] = (u8) uuid_hex_to_bin(sz_uuid, 2);
pszUuid += 2; sz_uuid += 2;
} }
} }
...@@ -155,20 +155,20 @@ extern void cfg_get_perf_value(OUT bool *enable_perf); ...@@ -155,20 +155,20 @@ extern void cfg_get_perf_value(OUT bool *enable_perf);
* Parameters: * Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying. * dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer. * 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: * Returns:
* 0: Success. * 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. * -ENODATA: couldn't find the ZLFileName.
* Requires: * Requires:
* CFG initialized. * CFG initialized.
* Ensures: * Ensures:
* 0: Not more than buf_size bytes were copied into * 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. * for this devnode.
*/ */
extern int cfg_get_zl_file(IN struct cfg_devnode *dev_node_obj, 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 ======== * ======== cfg_init ========
......
...@@ -78,7 +78,7 @@ extern void cod_close(struct cod_libraryobj *lib); ...@@ -78,7 +78,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* using the cod_get_sym_value() function. * using the cod_get_sym_value() function.
* Parameters: * Parameters:
* manager: created manager object * 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 * attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used. * will cause default attrs to be used.
* Returns: * Returns:
...@@ -88,11 +88,11 @@ extern void cod_close(struct cod_libraryobj *lib); ...@@ -88,11 +88,11 @@ extern void cod_close(struct cod_libraryobj *lib);
* non default values of attrs. * non default values of attrs.
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* pstrZLFile != NULL * str_zl_file != NULL
* Ensures: * Ensures:
*/ */
extern int cod_create(OUT struct cod_manager **manager, extern int cod_create(OUT struct cod_manager **manager,
char *pstrZLFile, char *str_zl_file,
IN OPTIONAL CONST struct cod_attrs *attrs); IN OPTIONAL CONST struct cod_attrs *attrs);
/* /*
...@@ -149,7 +149,7 @@ extern int cod_get_base_lib(struct cod_manager *cod_mgr_obj, ...@@ -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. * Get the name of the base image DBL library.
* Parameters: * Parameters:
* cod_mgr_obj: handle of manager to be deleted * 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. * usize: size of name buffer.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -157,11 +157,11 @@ extern int cod_get_base_lib(struct cod_manager *cod_mgr_obj, ...@@ -157,11 +157,11 @@ extern int cod_get_base_lib(struct cod_manager *cod_mgr_obj,
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* valid cod_mgr_obj. * valid cod_mgr_obj.
* pszName != NULL. * sz_name != NULL.
* Ensures: * Ensures:
*/ */
extern int cod_get_base_name(struct cod_manager *cod_mgr_obj, extern int cod_get_base_name(struct cod_manager *cod_mgr_obj,
char *pszName, u32 usize); char *sz_name, u32 usize);
/* /*
* ======== cod_get_entry ======== * ======== cod_get_entry ========
...@@ -206,8 +206,8 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj, ...@@ -206,8 +206,8 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* given the section name. * given the section name.
* Parameters: * Parameters:
* lib Library handle returned from cod_open(). * lib Library handle returned from cod_open().
* pstrSect: name of the section, with or without leading "." * str_sect: name of the section, with or without leading "."
* puAddr: Location to store address. * addr: Location to store address.
* puLen: Location to store length. * puLen: Location to store length.
* Returns: * Returns:
* 0: Success * 0: Success
...@@ -216,18 +216,18 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj, ...@@ -216,18 +216,18 @@ extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* valid cod_mgr_obj. * valid cod_mgr_obj.
* pstrSect != NULL; * str_sect != NULL;
* puAddr != NULL; * addr != NULL;
* puLen != NULL; * puLen != NULL;
* Ensures: * Ensures:
* 0: *puAddr and *puLen contain the address and length of the * 0: *addr and *puLen contain the address and length of the
* section. * section.
* else: *puAddr == 0 and *puLen == 0; * else: *addr == 0 and *puLen == 0;
* *
*/ */
extern int cod_get_section(struct cod_libraryobj *lib, extern int cod_get_section(struct cod_libraryobj *lib,
IN char *pstrSect, IN char *str_sect,
OUT u32 *puAddr, OUT u32 *puLen); OUT u32 *addr, OUT u32 *puLen);
/* /*
* ======== cod_get_sym_value ======== * ======== cod_get_sym_value ========
...@@ -246,12 +246,12 @@ extern int cod_get_section(struct cod_libraryobj *lib, ...@@ -246,12 +246,12 @@ extern int cod_get_section(struct cod_libraryobj *lib,
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* Valid cod_mgr_obj. * Valid cod_mgr_obj.
* pstrSym != NULL. * str_sym != NULL.
* pul_value != NULL. * pul_value != NULL.
* Ensures: * Ensures:
*/ */
extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj, 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 ======== * ======== cod_init ========
...@@ -304,7 +304,7 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj, ...@@ -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. * Open a library for reading sections. Does not load or set the base.
* Parameters: * Parameters:
* hmgr: manager to load the code with * 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 * flags: COD_NOLOAD (don't load symbols) or COD_SYMB (load
* symbols). * symbols).
* lib_obj: Handle returned that can be used in calls to cod_close * 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, ...@@ -316,11 +316,11 @@ extern int cod_load_base(struct cod_manager *cod_mgr_obj,
* COD module initialized. * COD module initialized.
* hmgr is valid. * hmgr is valid.
* flags == COD_NOLOAD || flags == COD_SYMB. * flags == COD_NOLOAD || flags == COD_SYMB.
* pszCoffPath != NULL. * sz_coff_path != NULL.
* Ensures: * Ensures:
*/ */
extern int cod_open(struct cod_manager *hmgr, extern int cod_open(struct cod_manager *hmgr,
IN char *pszCoffPath, IN char *sz_coff_path,
u32 flags, OUT struct cod_libraryobj **lib_obj); u32 flags, OUT struct cod_libraryobj **lib_obj);
/* /*
...@@ -329,7 +329,7 @@ extern int cod_open(struct cod_manager *hmgr, ...@@ -329,7 +329,7 @@ extern int cod_open(struct cod_manager *hmgr,
* Open base image for reading sections. Does not load the base. * Open base image for reading sections. Does not load the base.
* Parameters: * Parameters:
* hmgr: manager to load the code with * 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. * flags: Specifies whether to load symbols.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -337,10 +337,10 @@ extern int cod_open(struct cod_manager *hmgr, ...@@ -337,10 +337,10 @@ extern int cod_open(struct cod_manager *hmgr,
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* hmgr is valid. * hmgr is valid.
* pszCoffPath != NULL. * sz_coff_path != NULL.
* Ensures: * 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); dbll_flags flags);
/* /*
...@@ -349,7 +349,7 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -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. * Retrieve the content of a code section given the section name.
* Parameters: * Parameters:
* cod_mgr_obj - manager in which to search for the symbol * 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. * str_content - buffer to store content of the section.
* Returns: * Returns:
* 0: on success, error code on failure * 0: on success, error code on failure
...@@ -357,13 +357,13 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -357,13 +357,13 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Requires: * Requires:
* COD module initialized. * COD module initialized.
* valid cod_mgr_obj. * valid cod_mgr_obj.
* pstrSect != NULL; * str_sect != NULL;
* str_content != NULL; * str_content != NULL;
* Ensures: * Ensures:
* 0: *str_content 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, extern int cod_read_section(struct cod_libraryobj *lib,
IN char *pstrSect, IN char *str_sect,
OUT char *str_content, IN u32 content_size); OUT char *str_content, IN u32 content_size);
#endif /* COD_ */ #endif /* COD_ */
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* special COFF section called ".dcd_register" * special COFF section called ".dcd_register"
* Parameters: * Parameters:
* hdcd_mgr: A DCD manager handle. * 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. * objects to be registered.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* ".dcd_register", which is used for auto registration. * ".dcd_register", which is used for auto registration.
*/ */
extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr, extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
IN char *pszCoffPath); IN char *sz_coff_path);
/* /*
* ======== dcd_auto_unregister ======== * ======== dcd_auto_unregister ========
...@@ -54,7 +54,7 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr, ...@@ -54,7 +54,7 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* special COFF section called ".dcd_register" * special COFF section called ".dcd_register"
* Parameters: * Parameters:
* hdcd_mgr: A DCD manager handle. * 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. * DCD objects to be unregistered.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -69,14 +69,14 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr, ...@@ -69,14 +69,14 @@ extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* ".dcd_register", which is used for auto unregistration. * ".dcd_register", which is used for auto unregistration.
*/ */
extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
IN char *pszCoffPath); IN char *sz_coff_path);
/* /*
* ======== dcd_create_manager ======== * ======== dcd_create_manager ========
* Purpose: * Purpose:
* This function creates a DCD module manager. * This function creates a DCD module manager.
* Parameters: * 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. * dcd_mgr: A pointer to a DCD manager handle.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -84,12 +84,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, ...@@ -84,12 +84,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* -EPERM: General failure. * -EPERM: General failure.
* Requires: * Requires:
* DCD initialized. * DCD initialized.
* pszZlDllName is non-NULL. * sz_zl_dll_name is non-NULL.
* dcd_mgr is non-NULL. * dcd_mgr is non-NULL.
* Ensures: * Ensures:
* A DCD manager handle is created. * 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); OUT struct dcd_manager **dcd_mgr);
/* /*
...@@ -214,7 +214,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr, ...@@ -214,7 +214,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* hdcd_mgr: A DCD manager handle. * hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS * uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object. * 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. * buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load * phase: Which phase to load
* phase_split: Are phases in multiple libraries * phase_split: Are phases in multiple libraries
...@@ -224,14 +224,14 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr, ...@@ -224,14 +224,14 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Requires: * Requires:
* DCD initialized. * DCD initialized.
* Valid hdcd_mgr. * Valid hdcd_mgr.
* pstrLibName != NULL. * str_lib_name != NULL.
* uuid_obj != NULL * uuid_obj != NULL
* buff_size != NULL. * buff_size != NULL.
* Ensures: * Ensures:
*/ */
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr, extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj, IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName, IN OUT char *str_lib_name,
IN OUT u32 *buff_size, IN OUT u32 *buff_size,
IN enum nldr_phase phase, IN enum nldr_phase phase,
OUT bool *phase_split); OUT bool *phase_split);
...@@ -276,7 +276,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr, ...@@ -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. * unregister nodes from the node database, and 3) add overlay nodes.
* Parameters: * Parameters:
* hdcd_mgr: A DCD manager handle. * 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. * objects.
* registerFxn: Callback fxn to be applied on each located * registerFxn: Callback fxn to be applied on each located
* DCD object. * DCD object.
...@@ -295,7 +295,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr, ...@@ -295,7 +295,7 @@ extern int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
* ".dcd_register", which is used for auto registration. * ".dcd_register", which is used for auto registration.
*/ */
extern int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, extern int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
IN char *pszCoffPath, IN char *sz_coff_path,
dcd_registerfxn registerFxn, void *handle); dcd_registerfxn registerFxn, void *handle);
/* /*
......
...@@ -368,7 +368,7 @@ typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib, ...@@ -368,7 +368,7 @@ typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
* Ensures: * Ensures:
*/ */
typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib, typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
char *pszSectName, char *sz_sect_name,
struct dbll_attrs *attrs); struct dbll_attrs *attrs);
/* /*
...@@ -471,7 +471,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library, ...@@ -471,7 +471,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,
* Ensures: * Ensures:
*/ */
typedef int(*dbll_unload_sect_fxn) (struct dbll_library_obj *lib, typedef int(*dbll_unload_sect_fxn) (struct dbll_library_obj *lib,
char *pszSectName, char *sz_sect_name,
struct dbll_attrs *attrs); struct dbll_attrs *attrs);
struct dbll_fxns { struct dbll_fxns {
......
...@@ -475,7 +475,7 @@ extern int dev_get_node_manager(struct dev_object ...@@ -475,7 +475,7 @@ extern int dev_get_node_manager(struct dev_object
* Parameters: * Parameters:
* hdev_obj: Handle to device object created with * hdev_obj: Handle to device object created with
* dev_create_device(). * dev_create_device().
* pstrSym: Name of symbol to look up. * str_sym: Name of symbol to look up.
* pul_value: Ptr to symbol value. * pul_value: Ptr to symbol value.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -483,14 +483,14 @@ extern int dev_get_node_manager(struct dev_object ...@@ -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 * -ESPIPE: Symbols couldn not be found or have not been loaded onto
* the board. * the board.
* Requires: * Requires:
* pstrSym != NULL. * str_sym != NULL.
* pul_value != NULL. * pul_value != NULL.
* DEV Initialized. * DEV Initialized.
* Ensures: * Ensures:
* 0: *pul_value contains the symbol value; * 0: *pul_value contains the symbol value;
*/ */
extern int dev_get_symbol(struct dev_object *hdev_obj, 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 ======== * ======== dev_get_bridge_context ========
......
...@@ -39,7 +39,7 @@ extern void nldr_delete(struct nldr_object *nldr_obj); ...@@ -39,7 +39,7 @@ extern void nldr_delete(struct nldr_object *nldr_obj);
extern void nldr_exit(void); extern void nldr_exit(void);
extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, 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, extern int nldr_get_rmm_manager(struct nldr_object *nldr,
OUT struct rmm_target_obj **rmm_mgr); OUT struct rmm_target_obj **rmm_mgr);
......
...@@ -210,21 +210,21 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj); ...@@ -210,21 +210,21 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj);
* *
* Parameters: * Parameters:
* nldr_node_obj: Handle returned from nldr_allocate(). * nldr_node_obj: Handle returned from nldr_allocate().
* pstrFxn: Name of function. * str_fxn: Name of function.
* pulAddr: Location to store function address. * addr: Location to store function address.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -ESPIPE: Address of function not found. * -ESPIPE: Address of function not found.
* Requires: * Requires:
* nldr_init(void) called. * nldr_init(void) called.
* Valid nldr_node_obj. * Valid nldr_node_obj.
* pulAddr != NULL; * addr != NULL;
* pstrFxn != NULL; * str_fxn != NULL;
* Ensures: * Ensures:
*/ */
typedef int(*nldr_getfxnaddrfxn) (struct nldr_nodeobject typedef int(*nldr_getfxnaddrfxn) (struct nldr_nodeobject
* nldr_node_obj, * nldr_node_obj,
char *pstrFxn, u32 * pulAddr); char *str_fxn, u32 * addr);
/* /*
* ======== nldr_init ======== * ======== nldr_init ========
......
...@@ -303,9 +303,9 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj, ...@@ -303,9 +303,9 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj,
* Parameters: * Parameters:
* stream_obj: Stream handle returned from strm_open(). * stream_obj: Stream handle returned from strm_open().
* buf_ptr: Location to store pointer to reclaimed buffer. * 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. * 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 * pdw_arg: Location where user argument that travels with
* the buffer will be written. * the buffer will be written.
* Returns: * Returns:
...@@ -317,13 +317,13 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj, ...@@ -317,13 +317,13 @@ extern int strm_prepare_buffer(struct strm_object *stream_obj,
* Requires: * Requires:
* strm_init(void) called. * strm_init(void) called.
* buf_ptr != NULL. * buf_ptr != NULL.
* pulBytes != NULL. * nbytes != NULL.
* pdw_arg != NULL. * pdw_arg != NULL.
* Ensures: * Ensures:
*/ */
extern int strm_reclaim(struct strm_object *stream_obj, extern int strm_reclaim(struct strm_object *stream_obj,
OUT u8 **buf_ptr, u32 * pulBytes, OUT u8 **buf_ptr, u32 * nbytes,
u32 *pulBufSize, u32 *pdw_arg); u32 *buff_size, u32 *pdw_arg);
/* /*
* ======== strm_register_notify ======== * ======== strm_register_notify ========
......
...@@ -27,18 +27,18 @@ ...@@ -27,18 +27,18 @@
* Converts a dsp_uuid to an ANSI string. * Converts a dsp_uuid to an ANSI string.
* Parameters: * Parameters:
* uuid_obj: Pointer to a dsp_uuid object. * 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. * string.
* size: Maximum size of the pszUuid string. * size: Maximum size of the sz_uuid string.
* Returns: * Returns:
* Requires: * Requires:
* uuid_obj & pszUuid are non-NULL values. * uuid_obj & sz_uuid are non-NULL values.
* Ensures: * Ensures:
* Lenghth of pszUuid is less than MAXUUIDLEN. * Lenghth of sz_uuid is less than MAXUUIDLEN.
* Details: * Details:
* UUID string limit currently set at MAXUUIDLEN. * 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); s32 size);
/* /*
...@@ -46,17 +46,17 @@ void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid, ...@@ -46,17 +46,17 @@ void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
* Purpose: * Purpose:
* Converts an ANSI string to a dsp_uuid. * Converts an ANSI string to a dsp_uuid.
* Parameters: * 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. * uuid_obj: Pointer to a dsp_uuid object.
* Returns: * Returns:
* Requires: * Requires:
* uuid_obj & pszUuid are non-NULL values. * uuid_obj & sz_uuid are non-NULL values.
* Ensures: * Ensures:
* Details: * Details:
* We assume the string representation of a UUID has the following format: * We assume the string representation of a UUID has the following format:
* "12345678_1234_1234_1234_123456789abc". * "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); OUT struct dsp_uuid *uuid_obj);
#endif /* UUIDUTIL_ */ #endif /* UUIDUTIL_ */
...@@ -109,7 +109,7 @@ static s32 cod_f_close(struct file *filp) ...@@ -109,7 +109,7 @@ static s32 cod_f_close(struct file *filp)
return 0; 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; mm_segment_t fs;
struct file *filp; struct file *filp;
...@@ -337,17 +337,17 @@ int cod_get_base_lib(struct cod_manager *cod_mgr_obj, ...@@ -337,17 +337,17 @@ int cod_get_base_lib(struct cod_manager *cod_mgr_obj,
/* /*
* ======== cod_get_base_name ======== * ======== 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) u32 usize)
{ {
int status = 0; int status = 0;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj)); DBC_REQUIRE(IS_VALID(cod_mgr_obj));
DBC_REQUIRE(pszName != NULL); DBC_REQUIRE(sz_name != NULL);
if (usize <= COD_MAXPATHLENGTH) if (usize <= COD_MAXPATHLENGTH)
strncpy(pszName, cod_mgr_obj->sz_zl_file, usize); strncpy(sz_name, cod_mgr_obj->sz_zl_file, usize);
else else
status = -EPERM; status = -EPERM;
...@@ -396,8 +396,8 @@ int cod_get_loader(struct cod_manager *cod_mgr_obj, ...@@ -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 * Retrieve the starting address and length of a section in the COFF file
* given the section name. * given the section name.
*/ */
int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
OUT u32 *puAddr, OUT u32 *puLen) OUT u32 *addr, OUT u32 *puLen)
{ {
struct cod_manager *cod_mgr_obj; struct cod_manager *cod_mgr_obj;
int status = 0; int status = 0;
...@@ -405,21 +405,21 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, ...@@ -405,21 +405,21 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL); DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr)); DBC_REQUIRE(IS_VALID(lib->cod_mgr));
DBC_REQUIRE(pstrSect != NULL); DBC_REQUIRE(str_sect != NULL);
DBC_REQUIRE(puAddr != NULL); DBC_REQUIRE(addr != NULL);
DBC_REQUIRE(puLen != NULL); DBC_REQUIRE(puLen != NULL);
*puAddr = 0; *addr = 0;
*puLen = 0; *puLen = 0;
if (lib != NULL) { if (lib != NULL) {
cod_mgr_obj = lib->cod_mgr; cod_mgr_obj = lib->cod_mgr;
status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, pstrSect, status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, str_sect,
puAddr, puLen); addr, puLen);
} else { } else {
status = -ESPIPE; status = -ESPIPE;
} }
DBC_ENSURE(DSP_SUCCEEDED(status) || ((*puAddr == 0) && (*puLen == 0))); DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*puLen == 0)));
return status; return status;
} }
...@@ -432,23 +432,23 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, ...@@ -432,23 +432,23 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
* C symbol. * 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) u32 *pul_value)
{ {
struct dbll_sym_val *dbll_sym; struct dbll_sym_val *dbll_sym;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr)); DBC_REQUIRE(IS_VALID(hmgr));
DBC_REQUIRE(pstrSym != NULL); DBC_REQUIRE(str_sym != NULL);
DBC_REQUIRE(pul_value != NULL); DBC_REQUIRE(pul_value != NULL);
dev_dbg(bridge, "%s: hmgr: %p pstrSym: %s pul_value: %p\n", dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n",
__func__, hmgr, pstrSym, pul_value); __func__, hmgr, str_sym, pul_value);
if (hmgr->base_lib) { if (hmgr->base_lib) {
if (!hmgr->fxns. 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. 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; return -ESPIPE;
} }
} else { } else {
...@@ -550,7 +550,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[], ...@@ -550,7 +550,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
* ======== cod_open ======== * ======== cod_open ========
* Open library for reading sections. * 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) u32 flags, struct cod_libraryobj **lib_obj)
{ {
int status = 0; int status = 0;
...@@ -558,7 +558,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -558,7 +558,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr)); 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(flags == COD_NOLOAD || flags == COD_SYMB);
DBC_REQUIRE(lib_obj != NULL); DBC_REQUIRE(lib_obj != NULL);
...@@ -570,15 +570,15 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -570,15 +570,15 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
lib->cod_mgr = hmgr; 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); &lib->dbll_lib);
if (DSP_SUCCEEDED(status)) if (DSP_SUCCEEDED(status))
*lib_obj = lib; *lib_obj = lib;
} }
if (DSP_FAILED(status)) if (DSP_FAILED(status))
pr_err("%s: error status 0x%x, pszCoffPath: %s flags: 0x%x\n", pr_err("%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n",
__func__, status, pszCoffPath, flags); __func__, status, sz_coff_path, flags);
return status; return status;
} }
...@@ -587,7 +587,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -587,7 +587,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
* Purpose: * Purpose:
* Open base image for reading sections. * 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) dbll_flags flags)
{ {
int status = 0; int status = 0;
...@@ -595,7 +595,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -595,7 +595,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr)); 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 we previously opened a base image, close it now */
if (hmgr->base_lib) { if (hmgr->base_lib) {
...@@ -606,17 +606,17 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -606,17 +606,17 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
hmgr->fxns.close_fxn(hmgr->base_lib); hmgr->fxns.close_fxn(hmgr->base_lib);
hmgr->base_lib = NULL; 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)) { if (DSP_SUCCEEDED(status)) {
/* hang onto the library for subsequent sym table usage */ /* hang onto the library for subsequent sym table usage */
hmgr->base_lib = lib; 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'; hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0';
} }
if (DSP_FAILED(status)) if (DSP_FAILED(status))
pr_err("%s: error status 0x%x pszCoffPath: %s\n", __func__, pr_err("%s: error status 0x%x sz_coff_path: %s\n", __func__,
status, pszCoffPath); status, sz_coff_path);
return status; return status;
} }
...@@ -625,7 +625,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -625,7 +625,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Purpose: * Purpose:
* Retrieve the content of a code section given the section name. * 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) OUT char *str_content, IN u32 content_size)
{ {
int status = 0; int status = 0;
...@@ -633,12 +633,12 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, ...@@ -633,12 +633,12 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL); DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr)); DBC_REQUIRE(IS_VALID(lib->cod_mgr));
DBC_REQUIRE(pstrSect != NULL); DBC_REQUIRE(str_sect != NULL);
DBC_REQUIRE(str_content != NULL); DBC_REQUIRE(str_content != NULL);
if (lib != NULL) if (lib != NULL)
status = 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); str_content, content_size);
else else
status = -ESPIPE; status = -ESPIPE;
......
...@@ -691,18 +691,18 @@ int dev_get_node_manager(struct dev_object *hdev_obj, ...@@ -691,18 +691,18 @@ int dev_get_node_manager(struct dev_object *hdev_obj,
* ======== dev_get_symbol ======== * ======== dev_get_symbol ========
*/ */
int dev_get_symbol(struct dev_object *hdev_obj, 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; int status = 0;
struct cod_manager *cod_mgr; struct cod_manager *cod_mgr;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(pstrSym != NULL && pul_value != NULL); DBC_REQUIRE(str_sym != NULL && pul_value != NULL);
if (hdev_obj) { if (hdev_obj) {
status = dev_get_cod_mgr(hdev_obj, &cod_mgr); status = dev_get_cod_mgr(hdev_obj, &cod_mgr);
if (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); pul_value);
else else
status = -EFAULT; status = -EFAULT;
......
...@@ -81,16 +81,16 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr, ...@@ -81,16 +81,16 @@ static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
* Parses the supplied image and resigsters with DCD. * Parses the supplied image and resigsters with DCD.
*/ */
int dcd_auto_register(IN struct dcd_manager *hdcd_mgr, int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
IN char *pszCoffPath) IN char *sz_coff_path)
{ {
int status = 0; int status = 0;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
if (hdcd_mgr) if (hdcd_mgr)
status = dcd_get_objects(hdcd_mgr, pszCoffPath, status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object, (dcd_registerfxn) dcd_register_object,
(void *)pszCoffPath); (void *)sz_coff_path);
else else
status = -EFAULT; status = -EFAULT;
...@@ -103,14 +103,14 @@ int dcd_auto_register(IN struct dcd_manager *hdcd_mgr, ...@@ -103,14 +103,14 @@ int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
* Parses the supplied DSP image and unresiters from DCD. * Parses the supplied DSP image and unresiters from DCD.
*/ */
int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
IN char *pszCoffPath) IN char *sz_coff_path)
{ {
int status = 0; int status = 0;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
if (hdcd_mgr) if (hdcd_mgr)
status = dcd_get_objects(hdcd_mgr, pszCoffPath, status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object, (dcd_registerfxn) dcd_register_object,
NULL); NULL);
else else
...@@ -124,7 +124,7 @@ int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, ...@@ -124,7 +124,7 @@ int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* Purpose: * Purpose:
* Creates DCD manager. * 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) OUT struct dcd_manager **dcd_mgr)
{ {
struct cod_manager *cod_mgr; /* COD manager handle */ struct cod_manager *cod_mgr; /* COD manager handle */
...@@ -134,7 +134,7 @@ int dcd_create_manager(IN char *pszZlDllName, ...@@ -134,7 +134,7 @@ int dcd_create_manager(IN char *pszZlDllName,
DBC_REQUIRE(refs >= 0); DBC_REQUIRE(refs >= 0);
DBC_REQUIRE(dcd_mgr); 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)) if (DSP_FAILED(status))
goto func_end; goto func_end;
...@@ -534,7 +534,7 @@ int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr, ...@@ -534,7 +534,7 @@ int dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,
* ======== dcd_get_objects ======== * ======== dcd_get_objects ========
*/ */
int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, 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) void *handle)
{ {
struct dcd_manager *dcd_mgr_obj = hdcd_mgr; struct dcd_manager *dcd_mgr_obj = hdcd_mgr;
...@@ -556,7 +556,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, ...@@ -556,7 +556,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
} }
/* Open DSP coff file, don't load symbols. */ /* 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)) { if (DSP_FAILED(status)) {
status = -EACCES; status = -EACCES;
goto func_cont; goto func_cont;
...@@ -572,7 +572,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, ...@@ -572,7 +572,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
/* Allocate zeroed buffer. */ /* Allocate zeroed buffer. */
psz_coff_buf = kzalloc(ul_len + 4, GFP_KERNEL); psz_coff_buf = kzalloc(ul_len + 4, GFP_KERNEL);
#ifdef _DB_TIOMAP #ifdef _DB_TIOMAP
if (strstr(pszCoffPath, "iva") == NULL) { if (strstr(sz_coff_path, "iva") == NULL) {
/* Locate section by objectID and read its content. */ /* Locate section by objectID and read its content. */
status = cod_read_section(lib, DCD_REGISTER_SECTION, status = cod_read_section(lib, DCD_REGISTER_SECTION,
psz_coff_buf, ul_len); psz_coff_buf, ul_len);
...@@ -587,7 +587,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, ...@@ -587,7 +587,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
#endif #endif
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
/* Compress DSP buffer to conform to PC format. */ /* 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); compress_buf(psz_coff_buf, ul_len, DSPWORDSIZE);
} else { } else {
compress_buf(psz_coff_buf, ul_len, 1); compress_buf(psz_coff_buf, ul_len, 1);
...@@ -644,7 +644,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr, ...@@ -644,7 +644,7 @@ int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
*/ */
int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr, int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj, IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName, IN OUT char *str_lib_name,
IN OUT u32 *buff_size, IN OUT u32 *buff_size,
enum nldr_phase phase, OUT bool *phase_split) enum nldr_phase phase, OUT bool *phase_split)
{ {
...@@ -656,12 +656,12 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr, ...@@ -656,12 +656,12 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
struct dcd_key_elem *dcd_key = NULL; struct dcd_key_elem *dcd_key = NULL;
DBC_REQUIRE(uuid_obj != NULL); DBC_REQUIRE(uuid_obj != NULL);
DBC_REQUIRE(pstrLibName != NULL); DBC_REQUIRE(str_lib_name != NULL);
DBC_REQUIRE(buff_size != NULL); DBC_REQUIRE(buff_size != NULL);
DBC_REQUIRE(hdcd_mgr); DBC_REQUIRE(hdcd_mgr);
dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p," dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, str_lib_name %p,"
" buff_size %p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName, " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, str_lib_name,
buff_size); buff_size);
/* /*
...@@ -768,7 +768,7 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr, ...@@ -768,7 +768,7 @@ int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
} }
if (DSP_SUCCEEDED(status)) 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; return status;
} }
......
...@@ -682,7 +682,7 @@ void nldr_exit(void) ...@@ -682,7 +682,7 @@ void nldr_exit(void)
* ======== nldr_get_fxn_addr ======== * ======== nldr_get_fxn_addr ========
*/ */
int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, 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 dbll_sym_val *dbll_sym;
struct nldr_object *nldr_obj; struct nldr_object *nldr_obj;
...@@ -692,8 +692,8 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, ...@@ -692,8 +692,8 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
struct lib_node root = { NULL, 0, NULL }; struct lib_node root = { NULL, 0, NULL };
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(nldr_node_obj); DBC_REQUIRE(nldr_node_obj);
DBC_REQUIRE(pulAddr != NULL); DBC_REQUIRE(addr != NULL);
DBC_REQUIRE(pstrFxn != NULL); DBC_REQUIRE(str_fxn != NULL);
nldr_obj = nldr_node_obj->nldr_obj; nldr_obj = nldr_node_obj->nldr_obj;
/* Called from node_create(), node_delete(), or node_run(). */ /* Called from node_create(), node_delete(), or node_run(). */
...@@ -717,10 +717,10 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, ...@@ -717,10 +717,10 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
root = nldr_node_obj->root; root = nldr_node_obj->root;
} }
status1 = 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) if (!status1)
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); &dbll_sym);
/* If symbol not found, check dependent libraries */ /* If symbol not found, check dependent libraries */
...@@ -728,13 +728,13 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, ...@@ -728,13 +728,13 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
for (i = 0; i < root.dep_libs; i++) { for (i = 0; i < root.dep_libs; i++) {
status1 = status1 =
nldr_obj->ldr_fxns.get_addr_fxn(root.dep_libs_tree nldr_obj->ldr_fxns.get_addr_fxn(root.dep_libs_tree
[i].lib, pstrFxn, [i].lib, str_fxn,
&dbll_sym); &dbll_sym);
if (!status1) { if (!status1) {
status1 = status1 =
nldr_obj->ldr_fxns. nldr_obj->ldr_fxns.
get_c_addr_fxn(root.dep_libs_tree[i].lib, get_c_addr_fxn(root.dep_libs_tree[i].lib,
pstrFxn, &dbll_sym); str_fxn, &dbll_sym);
} }
if (status1) { if (status1) {
/* Symbol found */ /* Symbol found */
...@@ -748,12 +748,12 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, ...@@ -748,12 +748,12 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
status1 = status1 =
nldr_obj->ldr_fxns. nldr_obj->ldr_fxns.
get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib, get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib,
pstrFxn, &dbll_sym); str_fxn, &dbll_sym);
if (!status1) { if (!status1) {
status1 = status1 =
nldr_obj->ldr_fxns. nldr_obj->ldr_fxns.
get_c_addr_fxn(nldr_node_obj->pers_lib_table get_c_addr_fxn(nldr_node_obj->pers_lib_table
[i].lib, pstrFxn, &dbll_sym); [i].lib, str_fxn, &dbll_sym);
} }
if (status1) { if (status1) {
/* Symbol found */ /* Symbol found */
...@@ -763,7 +763,7 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, ...@@ -763,7 +763,7 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
} }
if (status1) if (status1)
*pulAddr = dbll_sym->value; *addr = dbll_sym->value;
else else
status = -ESPIPE; status = -ESPIPE;
......
...@@ -620,7 +620,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, ...@@ -620,7 +620,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index,
* Relcaims a buffer from a stream. * Relcaims a buffer from a stream.
*/ */
int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr, 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 bridge_drv_interface *intf_fxns;
struct chnl_ioc chnl_ioc_obj; struct chnl_ioc chnl_ioc_obj;
...@@ -629,7 +629,7 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr, ...@@ -629,7 +629,7 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(buf_ptr != NULL); DBC_REQUIRE(buf_ptr != NULL);
DBC_REQUIRE(pulBytes != NULL); DBC_REQUIRE(nbytes != NULL);
DBC_REQUIRE(pdw_arg != NULL); DBC_REQUIRE(pdw_arg != NULL);
if (!stream_obj) { if (!stream_obj) {
...@@ -643,9 +643,9 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr, ...@@ -643,9 +643,9 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
stream_obj->utimeout, stream_obj->utimeout,
&chnl_ioc_obj); &chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
*pulBytes = chnl_ioc_obj.byte_size; *nbytes = chnl_ioc_obj.byte_size;
if (pulBufSize) if (buff_size)
*pulBufSize = chnl_ioc_obj.buf_size; *buff_size = chnl_ioc_obj.buf_size;
*pdw_arg = chnl_ioc_obj.dw_arg; *pdw_arg = chnl_ioc_obj.dw_arg;
if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) { if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
...@@ -692,9 +692,9 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr, ...@@ -692,9 +692,9 @@ int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
status == -ETIME || status == -ESRCH || status == -ETIME || status == -ESRCH ||
status == -EPERM); 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, "pdw_arg: %p status 0x%x\n", __func__, stream_obj,
buf_ptr, pulBytes, pdw_arg, status); buf_ptr, nbytes, pdw_arg, status);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment