summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2022-06-06 12:37:34 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-06-08 16:21:59 +0000
commit970554f90d188cf4a0f97a5fb9ab8210ee420e41 (patch)
treed72f40edab6ef16f9088ff9854e415638556f481
parent7f339c6050c5ddd9c7235d491d80b3841a3dbb67 (diff)
vc/amd/agesa/f15tn: Declare `value` as constant in `GnbRegisterWriteTNDump()`
Do not discard the const qualifier in `GnbRegisterWriteTNDump()` to fix the compiler warning below. CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.o In file included from src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c:53: src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c: In function 'GnbRegisterWriteTN': src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c:836:57: error: passing argument 3 of 'GnbRegisterWriteTNDump' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 836 | GnbRegisterWriteTNDump (RegisterSpaceType, Address, Value); | ^~~~~ src/vendorcode/amd/agesa/f15tn/Proc/GNB/Common/Gnb.h:68:35: note: in definition of macro 'GNB_DEBUG_CODE' 68 | #define GNB_DEBUG_CODE(Code) Code | ^~~~ src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c:86:33: note: expected 'VOID *' {aka 'void *'} but argument is of type 'const VOID *' {aka 'const void *'} 86 | IN VOID *Value | ~~~~~~~~~~~~~~~~~~~~~^~~~~ CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieComplexDataTN.o CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieConfigTN.o CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieEarlyInitTN.o CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieEnvInitTN.o CC libagesa/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/PcieLibTN.o src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c: At top level: cc1: note: unrecognized command-line option '-Wno-pragma-pack' may have been intended to silence earlier diagnostics cc1: all warnings being treated as errors Found-by: gcc (Debian 11.3.0-3) 11.3.0 Change-Id: I2039cf66030030458bd247a31adc0621b9d033e6 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64989 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r--src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c b/src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c
index fa6dafd48c..3154254b0f 100644
--- a/src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c
+++ b/src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GnbRegisterAccTN.c
@@ -83,7 +83,7 @@ VOID
GnbRegisterWriteTNDump (
IN UINT8 RegisterSpaceType,
IN UINT32 Address,
- IN VOID *Value
+ CONST IN VOID *Value
);
AGESA_STATUS
GnbRegisterReadServiceTN (
@@ -1265,7 +1265,7 @@ VOID
GnbRegisterWriteTNDump (
IN UINT8 RegisterSpaceType,
IN UINT32 Address,
- IN VOID *Value
+ CONST IN VOID *Value
)
{
IDS_HDT_CONSOLE (NB_MISC, " R WRITE Space %s Address 0x%04x, Value 0x%04x\n",