entropy: Use proper flexible array
Use proper flexible array instead of a GNU extension. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
cbb9613d83
commit
90870eb9b1
3 changed files with 5 additions and 3 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <zephyr/drivers/entropy.h>
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/sys/atomic.h>
|
||||
#include <zephyr/sys/util.h>
|
||||
#include <soc.h>
|
||||
#include <hal/nrf_rng.h>
|
||||
#include <zephyr/irq.h>
|
||||
|
|
@ -76,7 +77,7 @@ struct rng_pool {
|
|||
uint8_t last;
|
||||
uint8_t mask;
|
||||
uint8_t threshold;
|
||||
uint8_t buffer[0];
|
||||
FLEXIBLE_ARRAY_DECLARE(uint8_t, buffer);
|
||||
};
|
||||
|
||||
#define RNG_POOL_DEFINE(name, len) uint8_t name[sizeof(struct rng_pool) + (len)]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <DA1469xAB.h>
|
||||
#include <zephyr/pm/device.h>
|
||||
#include <zephyr/pm/policy.h>
|
||||
#include <zephyr/sys/util.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(smartbond_entropy, CONFIG_ENTROPY_LOG_LEVEL);
|
||||
|
|
@ -27,7 +28,7 @@ struct rng_pool {
|
|||
uint8_t last;
|
||||
uint8_t mask;
|
||||
uint8_t threshold;
|
||||
uint8_t buffer[0];
|
||||
FLEXIBLE_ARRAY_DECLARE(uint8_t, buffer);
|
||||
};
|
||||
|
||||
#define RNG_POOL_DEFINE(name, len) uint8_t name[sizeof(struct rng_pool) + (len)]
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ struct rng_pool {
|
|||
uint8_t last;
|
||||
uint8_t mask;
|
||||
uint8_t threshold;
|
||||
uint8_t buffer[0];
|
||||
FLEXIBLE_ARRAY_DECLARE(uint8_t, buffer);
|
||||
};
|
||||
|
||||
#define RNG_POOL_DEFINE(name, len) uint8_t name[sizeof(struct rng_pool) + (len)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue