[coreboot-gerrit] New patch to review for coreboot: 639bb99 ASRock E350M1: PlatformGnbPcie.c: Do not return anything for void return type

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Fri Mar 29 13:06:56 CET 2013


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2954

-gerrit

commit 639bb991bbac2a470f33ddb2b6fd8b8b8a40dda3
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Fri Mar 29 12:51:31 2013 +0100

    ASRock E350M1: PlatformGnbPcie.c: Do not return anything for void return type
    
    Building the ASRock E350M1, the following warning is shown.
    
        $ make
        […]
            CC         mainboard/asrock/e350m1/PlatformGnbPcie.romstage.o
            CC         mainboard/asrock/e350m1/agesawrapper.romstage.o
            CC         mainboard/asrock/e350m1/buildOpts.romstage.o
        src/mainboard/asrock/e350m1/PlatformGnbPcie.c: In function 'OemCustomizeInitEarly':
        src/mainboard/asrock/e350m1/PlatformGnbPcie.c:131:5: warning: 'return' with a value, in function returning void [enabled by default]
        […]
    
    The function signature is (the return type might not be part of this though [1]),
    
        VOID
        OemCustomizeInitEarly (
          IN  OUT AMD_EARLY_PARAMS    *InitEarly
          )
    
    so do not return anything.
    
    All other AMD Family 14 boards already have the correct code. For example
    following commit fixed this for AMD Persimmon.
    
        commit d7a696d0f229abccc95ff411f28d91b9b796ab74
        Author: efdesign98 <efdesign98 at gmail.com>
        Date:   Thu Sep 15 15:24:26 2011 -0600
    
            Persimmon updates for AMD F14 rev C0
    
            Reviewed-on: http://review.coreboot.org/137
    
    [1] http://cboard.cprogramming.com/cplusplus-programming/117286-what-exactly-function-signature.html
    
    Change-Id: Ie60246bd9bb8452efd096e6838d8610f6364a6aa
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/mainboard/asrock/e350m1/PlatformGnbPcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mainboard/asrock/e350m1/PlatformGnbPcie.c b/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
index a580567..cef3e37 100644
--- a/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
+++ b/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
@@ -128,7 +128,7 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
   if ( Status!= AGESA_SUCCESS) {
     // Could not allocate buffer for PCIe_COMPLEX_DESCRIPTOR , PCIe_PORT_DESCRIPTOR and PCIe_DDI_DESCRIPTOR
     ASSERT(FALSE);
-    return Status;
+    return;
   }
 
   BrazosPcieComplexListPtr  =  (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;



More information about the coreboot-gerrit mailing list