From patchwork Thu Jan 13 08:55:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 532412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4EE0C433F5 for ; Thu, 13 Jan 2022 08:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233378AbiAMI6O (ORCPT ); Thu, 13 Jan 2022 03:58:14 -0500 Received: from mail-dm6nam11on2067.outbound.protection.outlook.com ([40.107.223.67]:58624 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233422AbiAMI5a (ORCPT ); Thu, 13 Jan 2022 03:57:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OOpxyhhfsHfF8iV+FF5mgYaTOiJqdJnicOX9JSiPUMKx7WNtc8J8Gs4pb2ivgEhTwknKtWoefh09M/xeGE3aAxnD3Ds62G/t6cs+MtveFgWEFRC8Wa41ZDSmNPE7JauNpw4UG10+SB+oA/pATpBHBTzgLe7VwSF0lUbz+1V/Zh/TT0cw1UAKYqKS+ulPNqWtLG4t+ihM88geovCT2lQCkDrM/4CeK3uA/vYrO2VZbr8hcmIMSoi7PXFFzNx4CN3/Pjt6MmkZ28GaXYm8X4MiPd6pp8CLgZ9MEeB1CScayqsQ7IS1gsZLDuesAViyJMzcx9TVOBISMGFTMxPx/SGFyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pG21vyC3xFQoCuo6lUwFIbPoAQR3xI8/mNdq+O8nT/c=; b=MPLfVhhO7FECaLzWTWKqqBD+mU6UKDjAUClofWqDxx/ATXU7BNVSuKSR9cR5uNmoPHbu0aHnQkFxV8lLg6OTPS6dle9yS12sG5px9L3ad+D3RK6QDjoFGIA50m1OuqPG0Pwfj7wmge3IW/hNc9OLxscPUS1w2TUfbpHAfLe5pa9nqXdp8sskIVXmcfsbh4HFCkVk4ziLk/cP5kHq1hOuY0q1Lp25KN4D5/gO1aTJlGhdnfcPDqjEqNlx1KoWpmAkawfrEhBuwNxGVPuEWomiFn6bl7Aa3VdDMDIqVk/hMEj0EL0fFtxIXjd6pfCtkRXCatRYdF1dIv4tMZ1R7jJiDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pG21vyC3xFQoCuo6lUwFIbPoAQR3xI8/mNdq+O8nT/c=; b=LVM1o/0nq7TVnVbfMAtWxC/1Lwgo9ka3KnEFCYMyhwqaAvtcXD38PZQD1nHxtm6PnV5lCacw0njRdrqJil73RDnp8OBtjXiGb5dGqgfDV8pP14UoY71gC8AhTuJfxm8JI1Qr8FP1ks84QQnPR7q225lLMQWtg0wzD4iPt2RwDas= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:26 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:26 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 24/31] staging: wfx: replace compiletime_assert() by BUILD_BUG_ON_MSG() Date: Thu, 13 Jan 2022 09:55:17 +0100 Message-Id: <20220113085524.1110708-25-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe5f0037-45f6-4e9e-e0f7-08d9d67294d0 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XXQNQm7RvCQmVuFZynaP+dfeRtc0NudZVkT0DWuYoIwYKc9tY9aZ8eRWkWsvbDbzJtJXXO72iVyySqZoPAavNnXbg1+py4RNiNuc8O9hjTqYIh4SJ82uQbrUGVpzV39HccpAr1Aua2hW3So5sc2KodhFofe3FGjV+XmM8ONzSP8qZi/J1wDctIAw2SNsrQyN9coAA9cTxgiwreNpCd+AydLwdAotSHIWz/SeglTmxx4sQ5PzvxHT+VGx4TsU0t1HMWhyK3arzv9LkK1aqV2oXF5J12gxepqVM9TakSS2WFo2rizKQ/URTc/Q5+i0l9t8rXHUHyK0x93P2cNEKngnyXGvO+LusvkLJpbchDQda4MBaPyTXVci0dF7CJXFgNYtpHLq6dIhZprb2uHB30d2b5ZDq4xJQeMoPi0ZcUPkvR9w7efS6+rDALrOWSKkSPzNAYEXX9H66HtK3PtwSsEN16VI0YYUcN1ZmfCi6b0vxclvTVrGb/T7HVCNQFQR2LMqtqwVfK50VZpm7ipqKtcSFeGJgdOUp9VCMxfqc/I2ECKXp9aWC3xq68FnRua/N9dGiVm20lrALkyU5QzNE/p7hlyMBLIUbiDZhoaZZ4Hc6Oi/Z65pi9T2lXvPCxi4e5xyugnQHPux4zIaHitYOAXMxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AKcALdLaIjWkkKRAVy/N66qf39ph?= =?utf-8?q?Fu/h6q2m2CKDgSCzCOt8soPoIZVRIBR2DlaeG0XN8gsmqE6ZQjtFBfJY7djZ1A2Ym?= =?utf-8?q?V6SPyDd07t7ka2WnCv91mPZNenukMCD1XjJlx7I5mRMkWYNkN/T37EZ/lAd+WGmOR?= =?utf-8?q?VWYFHpCpWOnG9QskPgmAEYlHssrQbiOhSrQfXMSv53a+L2ZUgUPLJujLU3AY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4PRu?= =?utf-8?q?WmzLMnDXD1qzZl6nHaTT/amFT8KNZTod/+45m8Z384mkQq8KzHllFR2ZmBegxHfh2?= =?utf-8?q?ajiy44o7p9Yw411yiAgb5yZ6B7VgaJeqACzdD6a85yX1IY3+qnAtp/C+lklE+JKra?= =?utf-8?q?UACT4cxAWpHVdGxJEfjSddQw/UsI6oOqz+joUWVINmRp0xkH9u3IVtLFwopik55Nm?= =?utf-8?q?KenOAHYlg9nSDsJtb4mTppt+MCawGlZTfnxbOE24Y+42XX49mlB31PzUeAUuDhtH+?= =?utf-8?q?hkqDZekIP6SCVJCrPznVmzK3T/TBfl02o+QhDhybEQMwxkqj0hEq78HXLgKndB77v?= =?utf-8?q?Q7bzatJqEWQ0SBaKjOfV/S/7lUiCagPJmyeq6J6m52ktJccfGNgWlzxOlJhDw4uq6?= =?utf-8?q?X3vRdY8FPFhmNo2mKuPxb98EZecQ5Nr1XkCLGEJjv2KPhvqAhjh+OIL022cJlV1QH?= =?utf-8?q?ezW3JWRqtFmlTJkpUpymz787M9JWyDQdYnbDAKUe4QSYtmwn+E5n7Jie4FuboJKqr?= =?utf-8?q?Qmja8NcxXGN/XX6YKXMTLaDtjtAuQKdXrSoU0Y/+6eeDcn3+Pbp6g0=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe5f0037-45f6-4e9e-e0f7-08d9d67294d0 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:26.3156 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N1DAGF4U2NOiFKHoEGJ9IEk0HFtPmmhwP10rd86i/I4bW0JptZIYjlt/ennYef4cl90GIfeZa4ka64iVbJP/Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It seems that BUILD_BUG_ON_MSG() is a bit more popular. Signed-off-by: Jérôme Pouiller --- 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)