diff options
author | Rene Sapiens <rene.sapiens@ti.com> | 2010-07-09 22:24:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 13:45:36 -0400 |
commit | 383b834522b11eec607dbe422835dcf5812730c3 (patch) | |
tree | 195f0be11cc94701884e34485d5111c3770f373f /drivers/staging/tidspbridge/pmgr/cod.c | |
parent | 13b18c29ec01068dce4b266cc179d4e90e79d0e9 (diff) |
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 <rene.sapiens@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tidspbridge/pmgr/cod.c')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/cod.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c index e4fc065b34d..ae44beda759 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) | |||
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
111 | 111 | ||
112 | static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode) | 112 | static struct file *cod_f_open(CONST char *psz_file_name, CONST char *sz_mode) |
113 | { | 113 | { |
114 | mm_segment_t fs; | 114 | mm_segment_t fs; |
115 | struct file *filp; | 115 | struct file *filp; |
@@ -337,17 +337,17 @@ int cod_get_base_lib(struct cod_manager *cod_mgr_obj, | |||
337 | /* | 337 | /* |
338 | * ======== cod_get_base_name ======== | 338 | * ======== cod_get_base_name ======== |
339 | */ | 339 | */ |
340 | int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *pszName, | 340 | int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *sz_name, |
341 | u32 usize) | 341 | u32 usize) |
342 | { | 342 | { |
343 | int status = 0; | 343 | int status = 0; |
344 | 344 | ||
345 | DBC_REQUIRE(refs > 0); | 345 | DBC_REQUIRE(refs > 0); |
346 | DBC_REQUIRE(IS_VALID(cod_mgr_obj)); | 346 | DBC_REQUIRE(IS_VALID(cod_mgr_obj)); |
347 | DBC_REQUIRE(pszName != NULL); | 347 | DBC_REQUIRE(sz_name != NULL); |
348 | 348 | ||
349 | if (usize <= COD_MAXPATHLENGTH) | 349 | if (usize <= COD_MAXPATHLENGTH) |
350 | strncpy(pszName, cod_mgr_obj->sz_zl_file, usize); | 350 | strncpy(sz_name, cod_mgr_obj->sz_zl_file, usize); |
351 | else | 351 | else |
352 | status = -EPERM; | 352 | status = -EPERM; |
353 | 353 | ||
@@ -396,8 +396,8 @@ int cod_get_loader(struct cod_manager *cod_mgr_obj, | |||
396 | * Retrieve the starting address and length of a section in the COFF file | 396 | * Retrieve the starting address and length of a section in the COFF file |
397 | * given the section name. | 397 | * given the section name. |
398 | */ | 398 | */ |
399 | int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, | 399 | int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect, |
400 | OUT u32 *puAddr, OUT u32 *puLen) | 400 | OUT u32 *addr, OUT u32 *puLen) |
401 | { | 401 | { |
402 | struct cod_manager *cod_mgr_obj; | 402 | struct cod_manager *cod_mgr_obj; |
403 | int status = 0; | 403 | int status = 0; |
@@ -405,21 +405,21 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, | |||
405 | DBC_REQUIRE(refs > 0); | 405 | DBC_REQUIRE(refs > 0); |
406 | DBC_REQUIRE(lib != NULL); | 406 | DBC_REQUIRE(lib != NULL); |
407 | DBC_REQUIRE(IS_VALID(lib->cod_mgr)); | 407 | DBC_REQUIRE(IS_VALID(lib->cod_mgr)); |
408 | DBC_REQUIRE(pstrSect != NULL); | 408 | DBC_REQUIRE(str_sect != NULL); |
409 | DBC_REQUIRE(puAddr != NULL); | 409 | DBC_REQUIRE(addr != NULL); |
410 | DBC_REQUIRE(puLen != NULL); | 410 | DBC_REQUIRE(puLen != NULL); |
411 | 411 | ||
412 | *puAddr = 0; | 412 | *addr = 0; |
413 | *puLen = 0; | 413 | *puLen = 0; |
414 | if (lib != NULL) { | 414 | if (lib != NULL) { |
415 | cod_mgr_obj = lib->cod_mgr; | 415 | cod_mgr_obj = lib->cod_mgr; |
416 | status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, pstrSect, | 416 | status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, str_sect, |
417 | puAddr, puLen); | 417 | addr, puLen); |
418 | } else { | 418 | } else { |
419 | status = -ESPIPE; | 419 | status = -ESPIPE; |
420 | } | 420 | } |
421 | 421 | ||
422 | DBC_ENSURE(DSP_SUCCEEDED(status) || ((*puAddr == 0) && (*puLen == 0))); | 422 | DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*puLen == 0))); |
423 | 423 | ||
424 | return status; | 424 | return status; |
425 | } | 425 | } |
@@ -432,23 +432,23 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, | |||
432 | * C symbol. | 432 | * C symbol. |
433 | * | 433 | * |
434 | */ | 434 | */ |
435 | int cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym, | 435 | int cod_get_sym_value(struct cod_manager *hmgr, char *str_sym, |
436 | u32 *pul_value) | 436 | u32 *pul_value) |
437 | { | 437 | { |
438 | struct dbll_sym_val *dbll_sym; | 438 | struct dbll_sym_val *dbll_sym; |
439 | 439 | ||
440 | DBC_REQUIRE(refs > 0); | 440 | DBC_REQUIRE(refs > 0); |
441 | DBC_REQUIRE(IS_VALID(hmgr)); | 441 | DBC_REQUIRE(IS_VALID(hmgr)); |
442 | DBC_REQUIRE(pstrSym != NULL); | 442 | DBC_REQUIRE(str_sym != NULL); |
443 | DBC_REQUIRE(pul_value != NULL); | 443 | DBC_REQUIRE(pul_value != NULL); |
444 | 444 | ||
445 | dev_dbg(bridge, "%s: hmgr: %p pstrSym: %s pul_value: %p\n", | 445 | dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n", |
446 | __func__, hmgr, pstrSym, pul_value); | 446 | __func__, hmgr, str_sym, pul_value); |
447 | if (hmgr->base_lib) { | 447 | if (hmgr->base_lib) { |
448 | if (!hmgr->fxns. | 448 | if (!hmgr->fxns. |
449 | get_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) { | 449 | get_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) { |
450 | if (!hmgr->fxns. | 450 | if (!hmgr->fxns. |
451 | get_c_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) | 451 | get_c_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) |
452 | return -ESPIPE; | 452 | return -ESPIPE; |
453 | } | 453 | } |
454 | } else { | 454 | } else { |
@@ -550,7 +550,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[], | |||
550 | * ======== cod_open ======== | 550 | * ======== cod_open ======== |
551 | * Open library for reading sections. | 551 | * Open library for reading sections. |
552 | */ | 552 | */ |
553 | int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, | 553 | int cod_open(struct cod_manager *hmgr, IN char *sz_coff_path, |
554 | u32 flags, struct cod_libraryobj **lib_obj) | 554 | u32 flags, struct cod_libraryobj **lib_obj) |
555 | { | 555 | { |
556 | int status = 0; | 556 | int status = 0; |
@@ -558,7 +558,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
558 | 558 | ||
559 | DBC_REQUIRE(refs > 0); | 559 | DBC_REQUIRE(refs > 0); |
560 | DBC_REQUIRE(IS_VALID(hmgr)); | 560 | DBC_REQUIRE(IS_VALID(hmgr)); |
561 | DBC_REQUIRE(pszCoffPath != NULL); | 561 | DBC_REQUIRE(sz_coff_path != NULL); |
562 | DBC_REQUIRE(flags == COD_NOLOAD || flags == COD_SYMB); | 562 | DBC_REQUIRE(flags == COD_NOLOAD || flags == COD_SYMB); |
563 | DBC_REQUIRE(lib_obj != NULL); | 563 | DBC_REQUIRE(lib_obj != NULL); |
564 | 564 | ||
@@ -570,15 +570,15 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
570 | 570 | ||
571 | if (DSP_SUCCEEDED(status)) { | 571 | if (DSP_SUCCEEDED(status)) { |
572 | lib->cod_mgr = hmgr; | 572 | lib->cod_mgr = hmgr; |
573 | status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags, | 573 | status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags, |
574 | &lib->dbll_lib); | 574 | &lib->dbll_lib); |
575 | if (DSP_SUCCEEDED(status)) | 575 | if (DSP_SUCCEEDED(status)) |
576 | *lib_obj = lib; | 576 | *lib_obj = lib; |
577 | } | 577 | } |
578 | 578 | ||
579 | if (DSP_FAILED(status)) | 579 | if (DSP_FAILED(status)) |
580 | pr_err("%s: error status 0x%x, pszCoffPath: %s flags: 0x%x\n", | 580 | pr_err("%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n", |
581 | __func__, status, pszCoffPath, flags); | 581 | __func__, status, sz_coff_path, flags); |
582 | return status; | 582 | return status; |
583 | } | 583 | } |
584 | 584 | ||
@@ -587,7 +587,7 @@ int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
587 | * Purpose: | 587 | * Purpose: |
588 | * Open base image for reading sections. | 588 | * Open base image for reading sections. |
589 | */ | 589 | */ |
590 | int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, | 590 | int cod_open_base(struct cod_manager *hmgr, IN char *sz_coff_path, |
591 | dbll_flags flags) | 591 | dbll_flags flags) |
592 | { | 592 | { |
593 | int status = 0; | 593 | int status = 0; |
@@ -595,7 +595,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
595 | 595 | ||
596 | DBC_REQUIRE(refs > 0); | 596 | DBC_REQUIRE(refs > 0); |
597 | DBC_REQUIRE(IS_VALID(hmgr)); | 597 | DBC_REQUIRE(IS_VALID(hmgr)); |
598 | DBC_REQUIRE(pszCoffPath != NULL); | 598 | DBC_REQUIRE(sz_coff_path != NULL); |
599 | 599 | ||
600 | /* if we previously opened a base image, close it now */ | 600 | /* if we previously opened a base image, close it now */ |
601 | if (hmgr->base_lib) { | 601 | if (hmgr->base_lib) { |
@@ -606,17 +606,17 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
606 | hmgr->fxns.close_fxn(hmgr->base_lib); | 606 | hmgr->fxns.close_fxn(hmgr->base_lib); |
607 | hmgr->base_lib = NULL; | 607 | hmgr->base_lib = NULL; |
608 | } | 608 | } |
609 | status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags, &lib); | 609 | status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags, &lib); |
610 | if (DSP_SUCCEEDED(status)) { | 610 | if (DSP_SUCCEEDED(status)) { |
611 | /* hang onto the library for subsequent sym table usage */ | 611 | /* hang onto the library for subsequent sym table usage */ |
612 | hmgr->base_lib = lib; | 612 | hmgr->base_lib = lib; |
613 | strncpy(hmgr->sz_zl_file, pszCoffPath, COD_MAXPATHLENGTH - 1); | 613 | strncpy(hmgr->sz_zl_file, sz_coff_path, COD_MAXPATHLENGTH - 1); |
614 | hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0'; | 614 | hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0'; |
615 | } | 615 | } |
616 | 616 | ||
617 | if (DSP_FAILED(status)) | 617 | if (DSP_FAILED(status)) |
618 | pr_err("%s: error status 0x%x pszCoffPath: %s\n", __func__, | 618 | pr_err("%s: error status 0x%x sz_coff_path: %s\n", __func__, |
619 | status, pszCoffPath); | 619 | status, sz_coff_path); |
620 | return status; | 620 | return status; |
621 | } | 621 | } |
622 | 622 | ||
@@ -625,7 +625,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, | |||
625 | * Purpose: | 625 | * Purpose: |
626 | * Retrieve the content of a code section given the section name. | 626 | * Retrieve the content of a code section given the section name. |
627 | */ | 627 | */ |
628 | int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, | 628 | int cod_read_section(struct cod_libraryobj *lib, IN char *str_sect, |
629 | OUT char *str_content, IN u32 content_size) | 629 | OUT char *str_content, IN u32 content_size) |
630 | { | 630 | { |
631 | int status = 0; | 631 | int status = 0; |
@@ -633,12 +633,12 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, | |||
633 | DBC_REQUIRE(refs > 0); | 633 | DBC_REQUIRE(refs > 0); |
634 | DBC_REQUIRE(lib != NULL); | 634 | DBC_REQUIRE(lib != NULL); |
635 | DBC_REQUIRE(IS_VALID(lib->cod_mgr)); | 635 | DBC_REQUIRE(IS_VALID(lib->cod_mgr)); |
636 | DBC_REQUIRE(pstrSect != NULL); | 636 | DBC_REQUIRE(str_sect != NULL); |
637 | DBC_REQUIRE(str_content != NULL); | 637 | DBC_REQUIRE(str_content != NULL); |
638 | 638 | ||
639 | if (lib != NULL) | 639 | if (lib != NULL) |
640 | status = | 640 | status = |
641 | lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect, | 641 | lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, str_sect, |
642 | str_content, content_size); | 642 | str_content, content_size); |
643 | else | 643 | else |
644 | status = -ESPIPE; | 644 | status = -ESPIPE; |