Received: by 10.213.65.68 with SMTP id h4csp3088174imn; Mon, 9 Apr 2018 14:12:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+axgwwE7UISsEpdnZ4EQROW+EbAMCVB9cFPfoO29A47Z/XIONR/I4GNfCYAyi0QBu5cIdO X-Received: by 10.99.119.74 with SMTP id s71mr26085849pgc.321.1523308352231; Mon, 09 Apr 2018 14:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523308352; cv=none; d=google.com; s=arc-20160816; b=ZoX7v8Qz11UycEv26g5NJrNvkQVHpJfKxDb8zDfq1ttHfXlFNnM+SYlKgHtFYEmpo0 iv4CYowKrN3jO88qfPz0PsWyExsrUcYw7bffEaopns9KS1xwZp5YzQo1qXy6wv5F0G4N 2sVy/G1uj8DcVqEorOm+n0QzfeqFGruLnMCl0sxT5KUZqPtRVIjoeCYzXCINGbwFm9AE MiuhCxpBHtY9OJuhgbLdM3CjHy9xmzLCHTuJD5yo0GQrMODSkKWf0UlwQwBS1j+5MdCm 0dxicnB4d9I5Z7nWaxf8e5LFa0pOmVktBt2PCY7tfpiX37GnUv1nMz55N4PV1UwvxAO6 NLOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NpxMcA4s0kNbESxlWiedvYkAALnJZrKIfvWJzlsBvZo=; b=vEBdvINisci/KEB5INPxdbdCBeXnjgXXprRkBhAOzBDREOsTFnIfCd8KKFP0fM4JCr KRAttFT12w3H0B/Kf9qfpPaz+uzwNRS9vAFGyR4rscSQXahMaAdvadQYOMoWJqeJgJaa bSNhtf29KKoZBzJJxouRcX79BdYWCos10pH5Ufz8wJ+QnwX6EolnwkxmsrgjbE1Kia/i FAGoLXA2yhFia5X9JwmlCCcRw3yt/VB7OERYDKNNVM4Xd5XCDMPLm7Ao9Bkiaq/hInxL /b7RKZsDR1zpmejCJPTcQbIFpgZwbERdmnqXPw3q2CPHeBzeyXomGc183DQeKnbUxS74 kGIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 102-v6si1058352pla.230.2018.04.09.14.11.55; Mon, 09 Apr 2018 14:12:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754737AbeDIVHl (ORCPT + 99 others); Mon, 9 Apr 2018 17:07:41 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:42978 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754129AbeDIVHk (ORCPT ); Mon, 9 Apr 2018 17:07:40 -0400 Received: by mail-pl0-f68.google.com with SMTP id t20-v6so3105711ply.9 for ; Mon, 09 Apr 2018 14:07:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NpxMcA4s0kNbESxlWiedvYkAALnJZrKIfvWJzlsBvZo=; b=jUn6nsQ8VJpCmLceHYKqZwiQfzJDTT3FjNSCuYZpqw1JL0o+9ZSA/66ytIhtmFangB o8+ZtT4CbXy6p6NDiYyaMXJeDU80ScvpQAH0YMeaf3QqIy7XZCJ7e+5VjCEa9Onr0mvb CAIuIGsDdMSPBCS9JgLDVVwGOmMExfCtQWbLrodZ1TKQjc1e5/UMrw5Wpi28A/erE+/h 2mhg06mJ79+8yQfdSVZKO0eOplt933lOBMGvKUBqPNF4XIGLnFzRQp2fsr8upN8Guqwj 1L+rL9gFG+Xerwwmd3cFg/ar7pV2ukBR6X0SWeyOxsgJ4mxNf/ez4rrpNLE6Z6Oc8c7r svBA== X-Gm-Message-State: AElRT7F+dOWlG3uuwYJBV4ObZwlPTlUe7CtwI99B2e3BJVASH0igPPK2 5MJNBRjo6Pr1Cdfi4I7pveVCsQ== X-Received: by 2002:a17:902:8d96:: with SMTP id v22-v6mr41317094plo.373.1523308059905; Mon, 09 Apr 2018 14:07:39 -0700 (PDT) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::1082]) by smtp.gmail.com with ESMTPSA id j19sm2001039pfn.29.2018.04.09.14.07.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 14:07:38 -0700 (PDT) From: Laura Abbott To: Alex Dubov , Arnd Bergmann , Greg Kroah-Hartman Cc: Laura Abbott , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: [PATCH] misc: tifm: Remove VLA Date: Mon, 9 Apr 2018 14:07:32 -0700 Message-Id: <20180409210732.3919-1-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's an ongoing effort to remove VLAs[1] from the kernel to eventually turn on -Wvla. The single VLA can either take a value of 2 or 4 so switch to the upper bound. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Laura Abbott --- drivers/misc/tifm_7xx1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index e5f108713dd8..690eaaea5ce4 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -239,7 +239,8 @@ static int tifm_7xx1_resume(struct pci_dev *dev) unsigned long timeout; unsigned int good_sockets = 0, bad_sockets = 0; unsigned long flags; - unsigned char new_ids[fm->num_sockets]; + /* Maximum number of entries is 4 */ + unsigned char new_ids[4]; DECLARE_COMPLETION_ONSTACK(finish_resume); pci_set_power_state(dev, PCI_D0); -- 2.14.3