From 39068456c4d6dba8a00682a093e5c329ee82670b Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Fri, 6 Oct 2023 18:54:54 +0000 Subject: [PATCH] entropy: sam: Remove unused parameter Do not propagate unused parameter. ISR callback is already handling the given flags, there is not need to propagate it through internal calls. Signed-off-by: Flavio Ceolin --- drivers/entropy/entropy_sam.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/entropy/entropy_sam.c b/drivers/entropy/entropy_sam.c index f4c40321f3b..57bdb8f8419 100644 --- a/drivers/entropy/entropy_sam.c +++ b/drivers/entropy/entropy_sam.c @@ -39,10 +39,8 @@ static inline uint32_t _data(Trng * const trng) #endif } -static int entropy_sam_wait_ready(Trng * const trng, uint32_t flags) +static int entropy_sam_wait_ready(Trng * const trng) { - ARG_UNUSED(flags); - /* According to the reference manual, the generator provides * one 32-bit random value every 84 peripheral clock cycles. * MCK may not be smaller than HCLK/4, so it should not take @@ -65,7 +63,7 @@ static int entropy_sam_wait_ready(Trng * const trng, uint32_t flags) static int entropy_sam_get_entropy_internal(const struct device *dev, uint8_t *buffer, - uint16_t length, uint32_t flags) + uint16_t length) { const struct trng_sam_dev_cfg *config = dev->config; Trng *const trng = config->regs; @@ -75,7 +73,7 @@ static int entropy_sam_get_entropy_internal(const struct device *dev, uint32_t value; int res; - res = entropy_sam_wait_ready(trng, flags); + res = entropy_sam_wait_ready(trng); if (res < 0) { return res; } @@ -94,7 +92,7 @@ static int entropy_sam_get_entropy_internal(const struct device *dev, static int entropy_sam_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length) { - return entropy_sam_get_entropy_internal(dev, buffer, length, 0); + return entropy_sam_get_entropy_internal(dev, buffer, length); } static int entropy_sam_get_entropy_isr(const struct device *dev, @@ -135,7 +133,7 @@ static int entropy_sam_get_entropy_isr(const struct device *dev, /* Allowed to busy-wait */ int ret = entropy_sam_get_entropy_internal(dev, - buffer, length, flags); + buffer, length); if (ret == 0) { /* Data retrieved successfully. */