aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/elkhartlake
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-04-05 13:02:45 +0200
committerAngel Pons <th3fanbus@gmail.com>2021-04-21 14:21:44 +0000
commit0c0d49229db9ef68a5ea9267296e900ac7274da8 (patch)
tree80982c6cb55bd90d9abb0fe82449c48d4d13854f /src/soc/intel/elkhartlake
parent73a22edcc8894c34df1234ae02d5318f18e3f7b8 (diff)
soc/intel: Replace open-coded buffer length calculation
Use `sizeof(value)` instead of manually calculating the buffer size. Change-Id: Ibe49e40b1c4f2c0b661d94e59059a95bdb204197 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52107 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/soc/intel/elkhartlake')
-rw-r--r--src/soc/intel/elkhartlake/chip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/soc/intel/elkhartlake/chip.c b/src/soc/intel/elkhartlake/chip.c
index 3917ea0af8..ad634819f2 100644
--- a/src/soc/intel/elkhartlake/chip.c
+++ b/src/soc/intel/elkhartlake/chip.c
@@ -105,11 +105,9 @@ static void soc_fill_gpio_pm_configuration(void)
const config_t *config = config_of_soc();
if (config->gpio_override_pm)
- memcpy(value, config->gpio_pm, sizeof(uint8_t) *
- TOTAL_GPIO_COMM);
+ memcpy(value, config->gpio_pm, sizeof(value));
else
- memset(value, MISCCFG_GPIO_PM_CONFIG_BITS, sizeof(uint8_t) *
- TOTAL_GPIO_COMM);
+ memset(value, MISCCFG_GPIO_PM_CONFIG_BITS, sizeof(value));
gpio_pm_configure(value, TOTAL_GPIO_COMM);
}