From f64d4ce513a53fb1f1b7b4d094692b167d872532 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 10 May 2012 14:31:28 -0400 Subject: [PATCH] Fix: remove padding field after variable sized array Signed-off-by: Mathieu Desnoyers --- libringbuffer/frontend_types.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libringbuffer/frontend_types.h b/libringbuffer/frontend_types.h index 37fabad3..b6b34470 100644 --- a/libringbuffer/frontend_types.h +++ b/libringbuffer/frontend_types.h @@ -46,7 +46,6 @@ enum switch_mode { SWITCH_ACTIVE, SWITCH_FLUSH }; /* channel: collection of per-cpu ring buffers. */ -#define RB_CHANNEL_PADDING 64 struct channel { int record_disabled; unsigned long commit_count_mask; /* @@ -61,12 +60,12 @@ struct channel { //wait_queue_head_t read_wait; /* reader wait queue */ int finalized; /* Has channel been finalized */ size_t priv_data_offset; + /* Note: padding field is missing */ /* * Associated backend contains a variable-length array. Needs to * be last member. */ struct channel_backend backend; /* Associated backend */ - char padding[RB_CHANNEL_PADDING]; } __attribute__((aligned(CAA_CACHE_LINE_SIZE))); /* Per-subbuffer commit counters used on the hot path */ -- 2.34.1