Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3880992rwb; Sun, 30 Jul 2023 19:03:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZHL4GFyZOt+Ky9Atxp/+D11WsoSZt4KbN7ekpDoXxZqJVR0BUAMORS7i9jbuermT9khNv X-Received: by 2002:a17:906:649e:b0:99b:bf43:732b with SMTP id e30-20020a170906649e00b0099bbf43732bmr4983601ejm.23.1690768998697; Sun, 30 Jul 2023 19:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690768998; cv=none; d=google.com; s=arc-20160816; b=bENi9LTze1z9wkq4I48ucFFXvLTMAdm3cg+7Bv2wFEB3m1HoVjtj/Olb5nLtKYMtuS 82baKwXwPko4KJBfKwmlnRoJV3KWL5BgKjgayHVkm5aCp96fRYzXtftLKvu71zxsXqMW Fho9PI+ynPe+WQraEqQLtbT19ZPbzwP6pN9FkEhd/2/wlEXdhPSGMsoqjR+ZceqijBDE ELbWs3EqrjaNSBELH66Cv+bDAjHVu0RvAjYxC/V8eDICXgH/IZoijIV/qypx/P7IJN52 uMX2UiWTUIS60Wmazv4eNtV2SnD6STjTN21Py3ZtiMrz8ERpYiIKh2IfHutZukGVVmt4 u7SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xIIhCDOH7Yz5qlTpKDXtZZdnWeyGOEAV1deFecuA5Bk=; fh=STSbrAKVnrUMtCWRto2IYglOscOCUn3sRwHnq5HhtII=; b=pdyYvnxAGCL9Xx9qRA1cll/diy2+aDu0R4AAVwX1Jx7brS7Pase3bBT/f/Gp5/2ssQ RoV0YrxwFWvhIKIsVqUk5+omohAT2+o8KYRE9JiSkIzZJt2augX4oIP9AAMdXrni3FNi N3Wef0VpoRyE1xjrNkvlzKlzj00WKYOJo7dqcqUwB1nKfiiGJexpPXewEwGwWrp+21Xp AksoNjNvWWeoAh2rgp1KtPy0v0Ug1bhEpjVBBZJOWeszofhXC/MXx6pR2R/qzWxgEAdI iAeM5spvznU5LWbiZzX9Nu95pgLeRvdv7fCVD0iQELdqUsBixFEYWJx1fsPdpHGJhHQE 15mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CIMHYVIL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a17090668cd00b00997eac101c7si5958820ejr.980.2023.07.30.19.02.58; Sun, 30 Jul 2023 19:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@gmail.com header.s=20221208 header.b=CIMHYVIL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbjGaB3w (ORCPT + 59 others); Sun, 30 Jul 2023 21:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGaB3v (ORCPT ); Sun, 30 Jul 2023 21:29:51 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 013A0E7F; Sun, 30 Jul 2023 18:29:50 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-563d3e4f73cso2182174a12.3; Sun, 30 Jul 2023 18:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690766990; x=1691371790; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xIIhCDOH7Yz5qlTpKDXtZZdnWeyGOEAV1deFecuA5Bk=; b=CIMHYVILe2Ga9K6PB29WGrUwogEpNfAI7k3CSKpE0izeGeu8/SbFoosF95BUu2DCsx JIB03K673qERBb7DmlesQTmPnwqNekjJgmLl4poc4fJ8Xrpf7Vv6zofSocLGa+hTKJEe tp8ZpygEwFs9xQ2VKk0m/VYYxlUlFie4AvCeLh+285B+aaSZfp3jrDyYGjNV2eM+IFCp NuuCt/aWv95SnxXDenDbb5sdaxKqLOmyzIS7inIh0xrIsfN3BLs8pz1mlhxejez3zC1C NKbfK0rzDVia3XNWtO7FikMzlTKFIeUqqyzygJ06vKXErfk6xQdfojA/q5tiIFnamii1 so9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690766990; x=1691371790; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xIIhCDOH7Yz5qlTpKDXtZZdnWeyGOEAV1deFecuA5Bk=; b=YQsbHgO1t2lORpnvEkuJZuE+Pz80KWM3665FCoBPOF82Wpn0HX29mRSrdTULlFN15y 0FfhyH7BuuTCp3aYLtAOoNmCozNhrVcB56zuLqe38XEtJeHeqZ9pYTNWXckHfutfMJV2 Xn8cAGmj6L7Ql9fP7hAu188h6QmgLUkUXjTs+HePj1xxi+cW1Uvj6ViZlYLopctEkOxH Y/yN4SOQUII3z8nGRUTtnetXJ3SgwKWJvpccLCEQs8C+/l0Pxlf5DlrS0FydkatMBRiT zPg4l6gSIIbrSe6kctCEkE0Ncp+DtyqfVKE2fzfUqBBk+eSKNlNw8KqLcPGkEIVyM0Zt m14A== X-Gm-Message-State: ABy/qLZ0xAXEAdOJITLNXksRsZf+DrETvwYz7JUitAu6/JZ14iF+dxea 4Rt9/eee7nGVRqiqnLFkJALRPJAK3gU9wQ== X-Received: by 2002:a05:6a20:840b:b0:137:514a:9835 with SMTP id c11-20020a056a20840b00b00137514a9835mr10050395pzd.9.1690766990276; Sun, 30 Jul 2023 18:29:50 -0700 (PDT) Received: from rajgad.hsd1.ca.comcast.net ([2601:204:df00:9cd0:f50b:8f24:acc4:e5c]) by smtp.gmail.com with ESMTPSA id v5-20020a170902b7c500b001b891259eddsm7141277plz.197.2023.07.30.18.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 18:29:49 -0700 (PDT) From: Atul Raut To: kvalo@kernel.org Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH] ath6kl: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper Date: Sun, 30 Jul 2023 18:29:41 -0700 Message-Id: <20230731012941.21875-1-rauji.raut@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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-wireless@vger.kernel.org Because zero-length arrays are obsolete, replacing them with C99 flexible-array members. Instead of defining a zero-length array, use the new DECLARE_FLEX_ARRAY() auxiliary macro. This fixes warnings such as: ./drivers/net/wireless/ath/ath6kl/usb.c:109:8-12: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Atul Raut --- drivers/net/wireless/ath/ath6kl/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 5220809841a6..bb3771a3897c 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -106,7 +106,7 @@ struct ath6kl_usb_ctrl_diag_cmd_write { __le32 cmd; __le32 address; __le32 value; - __le32 _pad[1]; + DECLARE_FLEX_ARRAY(__le32, _pad); } __packed; struct ath6kl_usb_ctrl_diag_cmd_read { -- 2.34.1