diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2025-08-12 23:35:41 +0900 |
---|---|---|
committer | Uwe Kleine-König <ukleinek@kernel.org> | 2025-09-15 11:39:47 +0200 |
commit | 8f2689f194b8d1bff41150ae316abdfccf191309 (patch) | |
tree | 5d6f0110e6a4416bad222988a57686faa64ae025 /rust/helpers/helpers.c | |
parent | ebd524a3ac3a172aa26f99d20d4d00d57da9a875 (diff) |
pwm: cros-ec: Avoid -Wflex-array-member-not-at-end warnings
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the new TRAILING_OVERLAP() helper to fix the following warnings:
drivers/pwm/pwm-cros-ec.c:53:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/pwm/pwm-cros-ec.c:87:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
This helper creates a union between a flexible-array member (FAM)
and a set of members that would otherwise follow it. This overlays
the trailing members onto the FAM while preserving the original
memory layout.
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/aJtRPZpc-Lv-C6zD@kspp
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions