Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3017596pxb; Tue, 19 Jan 2021 11:28:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqppHOybNz0fVo+avBEDoCwKjzKCHk2w9BmlvD9gacYqzEZp2aAut2qNk0ppiJLhBBxgqc X-Received: by 2002:a17:906:1914:: with SMTP id a20mr4014853eje.278.1611084534556; Tue, 19 Jan 2021 11:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611084534; cv=none; d=google.com; s=arc-20160816; b=hb0JIIlcaHwt26LkuqUABGI+PGaMW7GD8GjpLPOq2RoWdLWx5/4a4aPV0U3mR5RdKo +xRSGC/u81JaGWcDXEd4qe/ktPizE6Se10TrfSlMHLRbWYMkC1JPXRdiF8C9nlcYqbD6 gIg5q/2aqI0KFCQP/bPZhSN0dBMLeiluQqHSDCZ30kAA4Ks2S1maHek5sPbVR4aGA4nl yqpcUKD1bJUsO1OnXZAspYIa/uRnBMqhAH6BXzNek56RHoqQMdla/Keue81xHWnYr4dB SMjBWasUNvKQLmOg/lXSkut98lnN1ZwOTemMj92iiN9QVmEQKnELR5fLmDGDrlW71iO7 T9QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EjMT7wy0I3au65qf7KQzj6Sfm9enWQl80vCDCkue1vM=; b=SwY+cesVJLMTCRCG/DH5cwB5lKJzmkR8M2u3nD1Kg8y1t59FpJwuuFblNNnAaJBym2 0i7JcHv66KbAGJ9BwKCXf/+46pfvxX+CHtljmosBvzmCcPfbcFOP6IK9Wcy7zG72dHHm pzpvtLybt1rvjF2CutGGhpBKR8ng1GLshhm+7uHkPCrLcuy2cVfv/7nILylTkDrq3nNo VZJtGZuqWLl4T5/aDqrXrHjqpVMLX52sbObPYBF2DY83V5eFv1O4A6GHfh8fPIVAJKG0 Dbb7K7Hjt5iPSw+2pDN8uw7dNZNgp9O+Oh1HrlnPhuAqs0yVvWV3go0S3nYj20bMewzk EWKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CkzEjvUr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs7si9549746ejc.82.2021.01.19.11.28.30; Tue, 19 Jan 2021 11:28:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CkzEjvUr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729672AbhASTZx (ORCPT + 99 others); Tue, 19 Jan 2021 14:25:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390680AbhASTMX (ORCPT ); Tue, 19 Jan 2021 14:12:23 -0500 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C75C061574 for ; Tue, 19 Jan 2021 11:11:42 -0800 (PST) Received: by mail-oo1-xc2e.google.com with SMTP id i18so5185521ooh.5 for ; Tue, 19 Jan 2021 11:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EjMT7wy0I3au65qf7KQzj6Sfm9enWQl80vCDCkue1vM=; b=CkzEjvUreKeWVVae5rT3JvRCspan9QX3/eg9rdt2OiUoCCDs7bz0HuW5RMeks5o7Bv eRrznhzjXOO29PXC8V8/LLSMRVUIfyUDYXGLZkciPj1qvlWw+XfkBQ5ji4bLwR+hgRd2 D0KP8bBemEWuajX/igR1eIdySrhTYsjkgHm/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EjMT7wy0I3au65qf7KQzj6Sfm9enWQl80vCDCkue1vM=; b=EN3iI+10M9iZSB+nVbOq+ZM0hcy2oRm/2OtXJ7gxBLTNWM4OGqIMLQ5FJIJyNjqmzz KUM2PdpnwG5LyEJOkXlb9civlCNRcWA+/DLmcFnmYLSjIfBSMDrbC+mEk3106/L4mzKz N0yhZ1EMRJhl72XYPWVdRm9wbcFPZodOX++l/RHTEb55ZP5rBukG7I5HSGuG/Belf8tq BubCVQar8FmdTpm6fxnCBFGKhzBv9NtBNhKQguUP10PV1J2csItSy09DjhItdmLifwvO CgUvAMKSWaWuwoAGuiFiJqORJFZiBPknlciWKZ3tOBta0MprSNbT9rIoDvsZMy329/32 /84w== X-Gm-Message-State: AOAM5332e10WLhaQGGvozVoBPzEJ9QyNqNOvQmbZMraYPPAUSE76W03W 0hSM0euXa7DGXM5O6dodkdGnt9Sx33B67w== X-Received: by 2002:a4a:d148:: with SMTP id o8mr3842119oor.16.1611083501026; Tue, 19 Jan 2021 11:11:41 -0800 (PST) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com. [209.85.210.51]) by smtp.gmail.com with ESMTPSA id n124sm1832059oig.33.2021.01.19.11.11.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jan 2021 11:11:39 -0800 (PST) Received: by mail-ot1-f51.google.com with SMTP id v1so2815935ott.10 for ; Tue, 19 Jan 2021 11:11:39 -0800 (PST) X-Received: by 2002:a9d:744a:: with SMTP id p10mr4554986otk.203.1611083499205; Tue, 19 Jan 2021 11:11:39 -0800 (PST) MIME-Version: 1.0 References: <1610703513-933-1-git-send-email-abaci-bugfix@linux.alibaba.com> In-Reply-To: <1610703513-933-1-git-send-email-abaci-bugfix@linux.alibaba.com> From: Brian Norris Date: Tue, 19 Jan 2021 11:11:27 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] marvell/mwifiex: replace one-element array with flexible-array member. To: Jiapeng Zhong Cc: amit karwar , Ganapathi Bhat , Xinming Hu , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless , Linux Kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Jan 15, 2021 at 1:39 AM Jiapeng Zhong wrote: > > Fix the follow coccicheck warnings: > > ./drivers/net/wireless/marvell/mwifiex/fw.h: WARNING use flexible-array > member instead(https://www.kernel.org/doc/html/latest/process/ > deprecated.html#zero-length-and-one-element-arrays) > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Zhong Past experience unfortunately requires me to ask: did you test your changes? I understand that's a mostly legit warning, and a good deprecation notice, but that doesn't mean this is the right fix. One probably should instead audit the usage sites to see if they *are* already making proper sizeof (or other) comparisons, and if not, fix those first. And if any sites *are* doing correct sizeof computations using the existing struct layouts, then you are probably breaking them. Or if you have audited the usage of these structs, it's nice to make a small explanation of why this is correct, so I (and other readers) don't have to ask these questions :) Regards, Brian