From patchwork Thu Nov 4 07:59:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guo Zhengkui X-Patchwork-Id: 12602681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91329C433EF for ; Thu, 4 Nov 2021 08:03:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D74560EB4 for ; Thu, 4 Nov 2021 08:03:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3D74560EB4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vivo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C071D165D; Thu, 4 Nov 2021 09:02:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C071D165D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1636012982; bh=kOhBfqQxuNnzAnW47rQnHEip+c9hHFrrJYPAZC855qY=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=gABnXpG2fh+Qz4O1YL1YuVo4Nj4eeufOUZx5a/4iN15th7a7HZ8nrA7dAVqQ94vf1 LPwuvGKl/3oSwRDuiFYixTlZ3Ta+ibp1319kxT3LVEsBpmkUV2dSVf1RZwdYQAouqy n9nXHDDS5W8i0dXTKD4yfcLbYfPdYb0OA5tOvyoI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4EC7BF80229; Thu, 4 Nov 2021 09:02:12 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FA0BF8025D; Thu, 4 Nov 2021 09:02:07 +0100 (CET) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-hk2apc01on071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:febc::71e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6642F80125 for ; Thu, 4 Nov 2021 09:01:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6642F80125 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=vivo0.onmicrosoft.com header.i=@vivo0.onmicrosoft.com header.b="daisJbed" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XfRvkf5ig3T814/yiFQ4QFku0DMyJ7vPbvTOeV0h+mwVeSydHMjBhplHCkN4CNK0GRdZRIqlC43b/aMFAj7q9t1AIqd8JKOG/weTFb82PlRe8w3AGudv4/GKDB3cElevMRPPLn1Wy0S8/lgxQs5gpnjSfgsiTntCsIBho6zyp/mpsb/hQEocNj3dDMYCw+iplY8d8Y/rdn17b6WgzbhCETbRRWb1RfTA6fKtis+Db+dQ0Bpexu04e5+Y0CBM8/2WFWJlw7PsGPbptP900k94zx28jZiGlacbF/PBwqFHdgiZY9EFiqcRJFGAvSC8YSscRD8dvaptpiE+YSZjOOllfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=USEQJsSq8P0LRj8o7+Qc8h96Ror9gUlvtGDei+onOIs=; b=QtDsgi0W12tmcKMOsDuGXxDoYnQ7vngrl1jO+qxMkX3o9Up/ltb638bWv0laPUyL4htTs2ngb0rEZQRBo29OUsf6IT0uaPmVLHk57kkAfZLTIFWL/yTYwxK00il/LueOkoBZSu/es40ncKWIKTE1eUdxGkPl7EHcXS1+yRZsIU8OGc6ZqEEMamutocorNQVBYYkf0l9pK6GVXyqMhNRNqJMzq0gytMGCIMKqMyZYhqT3b0JBVw3sUh/ODIAhyDczHNETguEvasq6p+uP79IDEWEqKCYhQK/ajfwacY8pTj/ecflfzQsnQdIXPdsSC1q8sK+oXZsqOvW1etXA1BEAcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=USEQJsSq8P0LRj8o7+Qc8h96Ror9gUlvtGDei+onOIs=; b=daisJbedodmDPoeIANjpecuvJMXuc9rR2e7HmRmB2XBpaL7FJc6EZSfzy9UolBft7cpP4OFgLR0HZTeMRAhr5YMnDCz080TfBC3ZpHz+DdACxycugZ5kbKCk1hmFZtoCZCwYLBuZ9yesE47uPUJycRZl0nzDU2LnYo0knQpEttE= Authentication-Results: perex.cz; dkim=none (message not signed) header.d=none;perex.cz; dmarc=none action=none header.from=vivo.com; Received: from HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) by HK0PR06MB2356.apcprd06.prod.outlook.com (2603:1096:203:42::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Thu, 4 Nov 2021 08:01:48 +0000 Received: from HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::814a:4668:a3bd:768]) by HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::814a:4668:a3bd:768%7]) with mapi id 15.20.4669.011; Thu, 4 Nov 2021 08:01:48 +0000 From: Guo Zhengkui To: Jaroslav Kysela , Takashi Iwai , Jeremy Szu , Kailang Yang , Hui Wang , Chris Chiu , Cameron Berkenpas , PeiSen Hou , Werner Sembach , Sami Loone , Elia Devito , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: hda/realtek: fix flexible_array.cocci warning Date: Thu, 4 Nov 2021 15:59:41 +0800 Message-Id: <20211104080017.589-1-guozhengkui@vivo.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: HK2PR06CA0017.apcprd06.prod.outlook.com (2603:1096:202:2e::29) To HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) MIME-Version: 1.0 Received: from localhost.localdomain (218.213.202.190) by HK2PR06CA0017.apcprd06.prod.outlook.com (2603:1096:202:2e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17 via Frontend Transport; Thu, 4 Nov 2021 08:01:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84d04080-349d-4a3c-fa67-08d99f695a0f X-MS-TrafficTypeDiagnostic: HK0PR06MB2356: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5crAR9UiXpHTXCM227024CEgkCiWRs67b0fvywymlqvsg4k1DyVfT0q57nCZR52PxhKvy2wovasY+B63MBvo1etuSrVFNFaEkxv1E3gl0W17Ho5VgijpAObCaxKIiKj5NxNhvgVSfq5tVyBBLdTZZBV6raf3D2rJZphbgsIsZav48zh377lRxAPbl4F/zkaS6kFhX0zEhYHFWWS/J6YohLVo8XEEageHG05OTCAs+2sacAJX8Eux/0x0x/iSZisQ6n0/rhM76y/a3NuR9FIIpZ/eT8D39nfb9R7SAcpK/4kvvXlmoqT5trbDFMzFdqeP2UX7y/MQljGSYQJB55K+0FDvaP/7xdZGXXHFIQiC+zzajskWlgl4AQkz9zFzc9WbMNIMa5i7vPIurrCXcmdj/NKkBsTYl1NSjiemgIq7OBzAvY5TZRoCT/+c1uhEjKrWv5b+u0WAcnsxPNaPvNBrWBPSf0f8bUr0WacnpNZPgPBb+n7MZK7uZnFsuj8APmyJmariEeAHnG2y7JZmm24pyRcMiJQXfk2haJ49ZiQ3FubITC3KTZ0bfdAc7/+tnijGFet9Gi+tXORGGuQwtdKHj4+/es9viugNYGR7lPGEAyiTJtbf3SgkTYEBIAuBIuRMkT5Meb3SyYpw+P1hW7f/VLKwo7yuQdcKT4YkH2rqgQIcMzRjM0m95Vnjl68llHWnduFv/DZEl5y6A1ewh4cEaTIxtRtF2SqS6bhFUDsIlDQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HK2PR06MB3492.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(508600001)(2906002)(110136005)(86362001)(36756003)(956004)(66946007)(2616005)(66556008)(66476007)(921005)(6486002)(6506007)(6512007)(8936002)(8676002)(316002)(107886003)(5660300002)(83380400001)(52116002)(26005)(1076003)(38100700002)(7416002)(4326008)(6666004)(38350700002)(4744005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7ddT4BEfbhxh3i7O5Je/PWpSrrYv?= =?utf-8?q?GRJ6YHoNOWmfe7D3j+aSW9plzmhIa0Ah0X5LEXmYviWW9R6gCyVh+naURnKVlulxu?= =?utf-8?q?CPsn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?q?n68iemKzq92Hj37kyC/5eVgRjeGlk3szhda9S27+JjqkxhTwElBLouHXAQmJWOfqk?= =?utf-8?q?jaj0A3dlzbWOcRzw/vOcukov+S4qYgJ/FyHnBaeJ6WKcaGFj2IBoF7hop9AhOL6t/?= =?utf-8?q?krkzAxCs0A5ragmc8WiqcH6WqcRUIujpsRWOxJlRPDgIlArRKf9adi3LptCwGiOz/?= =?utf-8?q?fs4IvkG002gjUSgNLMh3uRsbaNs2BWBQHGBVPaODaAa30+1zmmV98Oltm753GYL5s?= =?utf-8?q?DH4lEebT4MQoBczu5BM5VnYT5V19lyg+R+oW93Qp8BHsyAvXwvAvb5pCqGl5P86O2?= =?utf-8?q?9ewIhunByNJC8HO1IPPFaASjHS2UPvv1pMcBdX1uBdz1eO7a0WBSXJAaWL5ZC0bqi?= =?utf-8?q?Ij83E03HbUSa69hsycSqvw5KSQgW+pOXaobyTrzBw5ax0EpLw6wY0xrTOhmwmSpRM?= =?utf-8?q?vtdnTV6o8c0mq9FaeP6fx350nPJp7SVBlmB0PEaidurthn2//xrBQQDjfSL3zj61P?= =?utf-8?q?sys/e4XdZ3sRWeokmHENYZwnvaFziTNLR5nBcXyIKA/Q0AKZbT4nYfGXPXqiwRIu0?= =?utf-8?q?oET6y80Wh/VaFsOhVCPH2yYMT2mVwh0RcTRXJpWZXnqk+uPk8VWfyIw=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84d04080-349d-4a3c-fa67-08d99f695a0f X-MS-Exchange-CrossTenant-AuthSource: HK2PR06MB3492.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2021 08:01:48.2813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l72F7MkeGN5ILSm9jZ2VIUAgtXo5Zx/V7rec/DbNGMOnua0FVk4qyeHjfOtclNKB0Cl+v5yumX2o15TvU2CmRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR06MB2356 Cc: kernel@vivo.com, Guo Zhengkui X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- 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[]; }; /*