diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-13 22:25:17 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-13 22:25:17 +0000 |
| commit | 18b3ba7a3f35f47856a1940428219ebf86f85a4e (patch) | |
| tree | 65cbc147e850d2bdd423673e2b27eedef4ec14c6 | |
| parent | 99ad6f4f54c86845d6e3f03541913c07fcdeef59 (diff) | |
| -rw-r--r-- | dfs_pattern_detector.c | 4 | ||||
| -rw-r--r-- | dfs_pri_detector.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dfs_pattern_detector.c b/dfs_pattern_detector.c index 700da9f4531e..ce5a6a39c0ad 100644 --- a/dfs_pattern_detector.c +++ b/dfs_pattern_detector.c @@ -199,7 +199,7 @@ channel_detector_create(struct dfs_pattern_detector *dpd, u16 freq) u32 i; struct channel_detector *cd; - cd = kzalloc(struct_size(cd, detectors, dpd->num_radar_types), GFP_ATOMIC); + cd = kzalloc_flex(*cd, detectors, dpd->num_radar_types, GFP_ATOMIC); if (cd == NULL) goto fail; @@ -354,7 +354,7 @@ dfs_pattern_detector_init(struct ath_common *common, if (!IS_ENABLED(CONFIG_CFG80211_CERTIFICATION_ONUS)) return NULL; - dpd = kmalloc(sizeof(*dpd), GFP_KERNEL); + dpd = kmalloc_obj(*dpd); if (dpd == NULL) return NULL; diff --git a/dfs_pri_detector.c b/dfs_pri_detector.c index d07c454c9c00..388f9d1913bd 100644 --- a/dfs_pri_detector.c +++ b/dfs_pri_detector.c @@ -202,7 +202,7 @@ static bool pulse_queue_enqueue(struct pri_detector *pde, u64 ts) { struct pulse_elem *p = pool_get_pulse_elem(); if (p == NULL) { - p = kmalloc(sizeof(*p), GFP_ATOMIC); + p = kmalloc_obj(*p, GFP_ATOMIC); if (p == NULL) { DFS_POOL_STAT_INC(pulse_alloc_error); return false; @@ -284,7 +284,7 @@ static bool pseq_handler_create_sequences(struct pri_detector *pde, ps.deadline_ts = ps.first_ts + ps.dur; new_ps = pool_get_pseq_elem(); if (new_ps == NULL) { - new_ps = kmalloc(sizeof(*new_ps), GFP_ATOMIC); + new_ps = kmalloc_obj(*new_ps, GFP_ATOMIC); if (new_ps == NULL) { DFS_POOL_STAT_INC(pseq_alloc_error); return false; @@ -418,7 +418,7 @@ struct pri_detector *pri_detector_init(const struct radar_detector_specs *rs) { struct pri_detector *de; - de = kzalloc(sizeof(*de), GFP_ATOMIC); + de = kzalloc_obj(*de, GFP_ATOMIC); if (de == NULL) return NULL; de->exit = pri_detector_exit; |
