diff options
| author | Taticharla Venkata Sai <venkatasai.taticharla@amd.com> | 2025-07-21 15:06:20 +0530 |
|---|---|---|
| committer | Venkata Sai Taticharla <venkatasai.taticharla@amd.com> | 2026-01-08 16:31:27 +0000 |
| commit | 18f8d11e5489ed140917007294ae681265150c7d (patch) | |
| tree | f74423ad8d1361a6320defd3296920070eedb5cd | |
| parent | bf7901cd6dd76a0d73c581ad7a788225590ba699 (diff) | |
| download | arm-trusted-firmware-18f8d11e5489ed140917007294ae681265150c7d.tar.gz arm-trusted-firmware-18f8d11e5489ed140917007294ae681265150c7d.zip | |
fix(optee): move function to conditional block
This corrects the MISRA violation C2012-8.4:
A compatible declaration shall be visible when an object or
function with external linkage is defined.
Moving the function definition to match its usage scope.
The function is only called within a conditional compilation
block, so it should be defined within the same conditional scope.
Change-Id: I51071c9bb18591a3017e9ae4a2de1d7fca37de16
Signed-off-by: Taticharla Venkata Sai <venkatasai.taticharla@amd.com>
| -rw-r--r-- | services/spd/opteed/opteed_main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c index 4d589e70c..c2c5c05dc 100644 --- a/services/spd/opteed/opteed_main.c +++ b/services/spd/opteed/opteed_main.c @@ -64,18 +64,17 @@ DEFINE_SVC_UUID2(optee_image_load_uuid, 0xb1eafba3, 0x5d31, 0x4612, 0xb9, 0x06, 0xc4, 0xc7, 0xa4, 0xbe, 0x3c, 0xc0); +static uint64_t dual32to64(uint32_t high, uint32_t low) +{ + return ((uint64_t)high << 32) | low; +} + #define OPTEED_FDT_SIZE 1024 static uint8_t fdt_buf[OPTEED_FDT_SIZE] __aligned(CACHE_WRITEBACK_GRANULE); #else static int32_t opteed_init(void); #endif - -uint64_t dual32to64(uint32_t high, uint32_t low) -{ - return ((uint64_t)high << 32) | low; -} - /******************************************************************************* * This function is the handler registered for S-EL1 interrupts by the * OPTEED. It validates the interrupt and upon success arranges entry into |
