From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:46380 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbeCJXoh (ORCPT ); Sat, 10 Mar 2018 18:44:37 -0500 MIME-Version: 1.0 In-Reply-To: <5AA464DE.90100@broadcom.com> References: <1520598613-3641-1-git-send-email-andreaschristofo@gmail.com> <5AA464DE.90100@broadcom.com> From: Daniel Micay Date: Sat, 10 Mar 2018 18:44:35 -0500 Message-ID: (sfid-20180311_004502_229360_1A74CFAD) Subject: Re: [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage To: Arend van Spriel Cc: Andreas Christoforou , Kees Cook , Kernel Hardening , QCA ath9k Development , Kalle Valo , linux-wireless@vger.kernel.org, Netdev , kernel list Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: > Just wondering. Is this actually a VLA. FFT_NUM_SAMPLES was static const so > not really going to show a lot of variation. This array will always have the > same size on the stack. The issue is that unlike in C++, a `static const` can't be used in a constant expression in C. It's unclear why C is defined that way but it's how it is and there isn't currently a GCC extension making more things into constant expressions like C++.