lkml.org 
[lkml]   [2022]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 24/31] staging: wfx: replace compiletime_assert() by BUILD_BUG_ON_MSG()
Date
From: Jérôme Pouiller <jerome.pouiller@silabs.com>

It seems that BUILD_BUG_ON_MSG() is a bit more popular.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
drivers/staging/wfx/data_tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index ca2f24b92d24..bfc3d4412ac6 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -391,8 +391,8 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struc
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
size_t driver_data_room = sizeof_field(struct ieee80211_tx_info, rate_driver_data);

- compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room,
- "struct tx_priv is too large");
+ BUILD_BUG_ON_MSG(sizeof(struct wfx_tx_priv) > driver_data_room,
+ "struct tx_priv is too large");
WARN(skb->next || skb->prev, "skb is already member of a list");
/* control.vif can be NULL for injected frames */
if (tx_info->control.vif)
--
2.34.1
\
 
 \ /
  Last update: 2022-01-13 09:58    [W:0.158 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site