Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3586135rwe; Mon, 29 Aug 2022 15:12:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ULhqFBNDFZxAH+xj6zv4PRWO/IQWWJjeTcH3dIbebJsuh3Yqkeb9ZurQAmvyy/4vloWtP X-Received: by 2002:a17:906:eecb:b0:73c:5c85:142b with SMTP id wu11-20020a170906eecb00b0073c5c85142bmr14880582ejb.433.1661811157769; Mon, 29 Aug 2022 15:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661811157; cv=none; d=google.com; s=arc-20160816; b=gUJ3vIrc3+Eo7mL4ngxWz8boMUfl5S94lqDQGBqCTFiQJt2IFk6q8+XgCFlROQ1xAB MBkHDig20VwuO/UxmtvcpTSw9T0GJjKnDushArUZSb9rQuu5T592OfW41wM0WXjOpyZY eJ6p1ypX0yJpyF0qcW/kym1gLEWxTKqp9Ckt64pTR0ZchmjZOp2cRmtyL7m71OqPaKgF 5yy5PLznbOwpXGERpGoDUbM6kZa23zbyh+xs6nztC4ZVWjxIzSpJPeEL5rbBUAq/FsAE 9x362R9nFatibzXrDlJ5ST6AZKSVWLumBaoB0anqdlAt+vxJM+EX+2wp047IEy0yXhIY CwuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=oM9PylBpAAtV5HJZf6jPv6iV6WP40ji76+7wQnEVWIc=; b=rpwk7gZ6pplSVRXpL2tqHGAcq1d+/tKk85E16F/WLUwyjGR2abrbebh+c0VmF7V+E4 7PMvNyMhHtfNTIsr/23UDn12uFAqClP76r2CKUPweL6I15NmoWPdW3CmfGFLZ5ahk5qw 7KlcUcwmgLd9GcAw216At/q/ICCxM9fks1YNQS44fHjPpivVcnnYe1mb6HaIrmv5mQy0 /ZWtHfhNJ1RdMgprPMDAyA6MOBy0a8PpbBWt72xb2gXfp+j2qcuK4VkCuGxwaRCFRpmg aRmEOpPd6m86Lue4bSESnJavaPyRHwhw9HJzFVyxz5zBDDijhuKoQjv7ebSk6bOLkAT8 mLiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SWAzvLQH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a50fb09000000b00445e9f07800si6527055edq.501.2022.08.29.15.12.12; Mon, 29 Aug 2022 15:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SWAzvLQH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiH2VvK (ORCPT + 99 others); Mon, 29 Aug 2022 17:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiH2VvI (ORCPT ); Mon, 29 Aug 2022 17:51:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 418A37CB49; Mon, 29 Aug 2022 14:51:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D3A96611B8; Mon, 29 Aug 2022 21:51:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4834C433D7; Mon, 29 Aug 2022 21:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661809865; bh=fXRYrMEM8Kk9+epg4G5pFtUERqSSGU8XuYoO6vErhkM=; h=Date:From:To:Cc:Subject:From; b=SWAzvLQHq6MKKoZVJQRmwywvjem5AjdbGmOtmsa8n4SdUSrwzoKWS04r1Q7uzGnAp e2Nocsr45XUJtOl78NNUowJa74WDxeB242k9Sx2Unu76qCw1sDOHMpirZWfXRaGaBT mkXvf1D4Hw/Yjyz5WRG394hiET42VHptEduU+2UokaFstMkjo84qCBT/AyeiJ0Osa/ oPZzRWiI3ZQHnUoDC57GZw9AP1xmgUAPPwFB5nfg1zV6zUftGjHgXfDBzTm4KlWCPQ 4IRP51HBalW+LP0mnJ6G1TFTzGkpNs9vuZcO/VEzTAoJdSgS5KOHPG3Zw4ggPjlWq5 b2aFUnLyiL+dQ== Date: Mon, 29 Aug 2022 16:50:59 -0500 From: "Gustavo A. R. Silva" To: Vincent Mailhol , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH][next] can: etas_es58x: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length array declaration in union es58x_urb_cmd with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for a flexible-array member in a union. Link: https://github.com/KSPP/linux/issues/193 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva --- drivers/net/can/usb/etas_es58x/es58x_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.h b/drivers/net/can/usb/etas_es58x/es58x_core.h index d769bdf740b7..640fe0a1df63 100644 --- a/drivers/net/can/usb/etas_es58x/es58x_core.h +++ b/drivers/net/can/usb/etas_es58x/es58x_core.h @@ -222,7 +222,7 @@ union es58x_urb_cmd { u8 cmd_type; u8 cmd_id; } __packed; - u8 raw_cmd[0]; + DECLARE_FLEX_ARRAY(u8, raw_cmd); }; /** -- 2.34.1