From patchwork Wed Feb 28 14:26:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10247613 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3AF4860211 for ; Wed, 28 Feb 2018 14:27:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B6F928D3E for ; Wed, 28 Feb 2018 14:27:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2065B28D48; Wed, 28 Feb 2018 14:27:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C929C28D3E for ; Wed, 28 Feb 2018 14:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbeB1O1Z (ORCPT ); Wed, 28 Feb 2018 09:27:25 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:41376 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbeB1O1Y (ORCPT ); Wed, 28 Feb 2018 09:27:24 -0500 Received: by mail-wr0-f194.google.com with SMTP id f14so2612494wre.8 for ; Wed, 28 Feb 2018 06:27:24 -0800 (PST) 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:in-reply-to :references; bh=FK8rR40v/ktkrkqCkXpzjTut9DbcgP2QZf6o0h7au9Q=; b=htFbzPeEI2hrnwFbYkfHwTnbPSaC/qhukz3wNLe0JlfFvKVaBKCRpHuvXTOw5BW9AD qPZeyJGKIe+o5RNCmFbHFQPiFwJEUzWFYWs5HkAxsDnVnrWBWsBLb6OLhFm5k0c+XnaZ oC+6LTlMJKLrlcJLnTIhevMLsllP1DSvO2P7meYqoCVA9V9WRWENj6gXSX2CXNJSFidI opU3fgC30MWV5rF1He4C1OjD9nJwUa24aHC5dib75NfrYMW8t4Fwvqpfqitp3YpoXkym iP2tC2/sEMB4bX3W6+xmTknCtnSKYAJITI1Xkg5m1eiC2zngAIu0LY8s0FRoxi8FOvOR BlNQ== X-Gm-Message-State: APf1xPCBgb0N2MEngClj0aGQcPAnlb03mdzqGJg2mw4lThqJr6OaSGEY V1f6SRemLE7PcmXnNJktk2Je9c7A9vc= X-Google-Smtp-Source: AH8x224kGLlqgp8stGStbVPjPOAnZwlcx13ej17U286WZdc4HFtNTbCdgOEeLxaeXeh1m5CqhGWT+w== X-Received: by 10.223.175.44 with SMTP id z41mr15294875wrc.129.1519828043340; Wed, 28 Feb 2018 06:27:23 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id 78sm3489419wmm.22.2018.02.28.06.27.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 06:27:22 -0800 (PST) From: Lorenzo Bianconi To: kubakici@wp.pl Cc: linux-wireless@vger.kernel.org Subject: [PATCH] mt7601u: remove a warning in mt7601u_efuse_physical_size_check() Date: Wed, 28 Feb 2018 15:26:57 +0100 Message-Id: <2850551da4495924bde846dd237b736e41913d0f.1519827461.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following sparse warning in mt7601u_efuse_physical_size_check: - drivers/net/wireless/mediatek/mt7601u/eeprom.c:77:27: warning: Variable length array is used Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski --- drivers/net/wireless/mediatek/mt7601u/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/eeprom.c b/drivers/net/wireless/mediatek/mt7601u/eeprom.c index da6faea092d6..a462064b5c91 100644 --- a/drivers/net/wireless/mediatek/mt7601u/eeprom.c +++ b/drivers/net/wireless/mediatek/mt7601u/eeprom.c @@ -74,7 +74,7 @@ static int mt7601u_efuse_physical_size_check(struct mt7601u_dev *dev) { const int map_reads = DIV_ROUND_UP(MT_EFUSE_USAGE_MAP_SIZE, 16); - u8 data[map_reads * 16]; + u8 data[round_up(MT_EFUSE_USAGE_MAP_SIZE, 16)]; int ret, i; u32 start = 0, end = 0, cnt_free;