Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7047274pxu; Thu, 24 Dec 2020 23:36:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzh5zvQT8NeY3STGQP34xMoPt8+SO3y7iMdBwpsCKNX2rAoGSUwrj//XkrT+5Bbv42p/kPn X-Received: by 2002:aa7:c0c2:: with SMTP id j2mr31625536edp.343.1608881774909; Thu, 24 Dec 2020 23:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608881774; cv=none; d=google.com; s=arc-20160816; b=SC9pEWBa/a/i3kmGoFNqrgsdc79oH5TjGrDRgnXohX13pvSKIctp8hKa0WYZmPC2IO WrLEcylFMcAPI3lcL5q7u6iayO2mrFDhE6cLJ3f6GrcLo71gZAKuzS2fMV3kGDLMAJi5 6mAJzZu9fvwNkioNkLf8rBmcJttOP+HwJ46kVSkqHWo53KSr3UD6PAaesoHNOnUezDN0 Ctt3t5Da3vX3f6grRRcVhHRL4bkrrHsgzhGgE9sSSNMunqn8MuRM468lWXdyYIVmgkZC BGB8wVoMXLDmn37DcDvK43tWhNsj3OcwHuYhNINqF8RSeU/leqU7fhcUtm5B3c6I5snp I8ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=9kjEHL3j6GIAwTvUwhveqAVTOnnfmVAoW1rCX6bpfqI=; b=tsHRPl3xvamF3xSTXn4LwGlfynNys6mOBtmEm9v/n8uIYNcLWKellViq2JmmuFCnb8 GhYef0zV/7+HVgu0mA9kaVXe9Zg6xysBogPVoYvN6BzWc2jyPYsKTrqfqTFmHkqYG+iT g9q0rgk5jBcLznc1R/8V72z0qHDJhG0UGXd9NgtOCGik0gF/Dk99q46hCuGVIhDkGaJu HdmJ0pH4NdF1X2PZBoln9tWn2Td3ssCpugDby7HOaHIOy96qIXOYrulE2vAKjqD4gyMs /YGDZ9VBxN5dFNivFtBxvGwivYZpWsO/q2h9BLWSQCQW/pgzTukrsVGkngYBEAyX1waf YsOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si16929378edc.491.2020.12.24.23.35.48; Thu, 24 Dec 2020 23:36:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726136AbgLYHfq (ORCPT + 99 others); Fri, 25 Dec 2020 02:35:46 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:10364 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgLYHfq (ORCPT ); Fri, 25 Dec 2020 02:35:46 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4D2Jbs611wz7Kvw; Fri, 25 Dec 2020 15:34:17 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Fri, 25 Dec 2020 15:34:59 +0800 From: Tian Tao To: , , , , CC: Subject: [PATCH] wilc1000: use flexible-array member instead of zero-length array Date: Fri, 25 Dec 2020 15:35:03 +0800 Message-ID: <1608881703-37060-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. [1]. https://patchwork.kernel.org/patch/11394197/ Signed-off-by: Tian Tao --- drivers/net/wireless/microchip/wilc1000/fw.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/fw.h b/drivers/net/wireless/microchip/wilc1000/fw.h index a76e1de..1114530 100644 --- a/drivers/net/wireless/microchip/wilc1000/fw.h +++ b/drivers/net/wireless/microchip/wilc1000/fw.h @@ -44,20 +44,20 @@ struct wilc_drv_handler { struct wilc_wep_key { u8 index; u8 key_len; - u8 key[0]; + u8 key[]; } __packed; struct wilc_sta_wpa_ptk { u8 mac_addr[ETH_ALEN]; u8 key_len; - u8 key[0]; + u8 key[]; } __packed; struct wilc_ap_wpa_ptk { u8 mac_addr[ETH_ALEN]; u8 index; u8 key_len; - u8 key[0]; + u8 key[]; } __packed; struct wilc_gtk_key { @@ -65,7 +65,7 @@ struct wilc_gtk_key { u8 rsc[8]; u8 index; u8 key_len; - u8 key[0]; + u8 key[]; } __packed; struct wilc_op_mode { -- 2.7.4