lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211104080017.589-1-guozhengkui@vivo.com>
Date:   Thu,  4 Nov 2021 15:59:41 +0800
From:   Guo Zhengkui <guozhengkui@...o.com>
To:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Jeremy Szu <jeremy.szu@...onical.com>,
        Kailang Yang <kailang@...ltek.com>,
        Hui Wang <hui.wang@...onical.com>,
        Chris Chiu <chris.chiu@...onical.com>,
        Cameron Berkenpas <cam@...-zeon.de>,
        PeiSen Hou <pshou@...ltek.com>,
        Werner Sembach <wse@...edocomputers.com>,
        Sami Loone <sami@...ne.fi>, Elia Devito <eliadevito@...il.com>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Cc:     kernel@...o.com, Guo Zhengkui <guozhengkui@...o.com>
Subject: [PATCH] ALSA: hda/realtek: fix flexible_array.cocci warning

Fix following coccicheck warnings:
./sound/pci/hda/patch_realtek.c:128:4-24: WARNING use
flexible-array member instead.

There is a regular need in the kernel to provide a way
to declare having a dynamically sized set of trailing
elements in a structure. Kernel code should always use
“flexible array members” for these cases. The older style
of one-element or zero-length arrays should no longer be used.

Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
 sound/pci/hda/patch_realtek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6322fac9e694..7935c363092e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -125,7 +125,7 @@ struct alc_spec {
 	unsigned int pll_coef_idx, pll_coef_bit;
 	unsigned int coef0;
 	struct input_dev *kb_dev;
-	u8 alc_mute_keycode_map[1];
+	u8 alc_mute_keycode_map[];
 };
 
 /*
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ