From patchwork Sat Feb 13 20:09:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 382609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06684C433E0 for ; Sat, 13 Feb 2021 20:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C6B261492 for ; Sat, 13 Feb 2021 20:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbhBMUKi (ORCPT ); Sat, 13 Feb 2021 15:10:38 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:2625 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbhBMUKh (ORCPT ); Sat, 13 Feb 2021 15:10:37 -0500 X-IronPort-AV: E=Sophos;i="5.81,176,1610406000"; d="scan'208";a="492853387" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2021 21:09:55 +0100 Date: Sat, 13 Feb 2021 21:09:55 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Peter Geis , Greg Kroah-Hartman , Dmitry Osipenko , Peter Chen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org cc: linux-usb@vger.kernel.org, kbuild-all@lists.01.org Subject: [PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: kernel test robot Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci Fixes: fc53d5279094 ("usb: chipidea: tegra: Support host mode") CC: Peter Geis Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Dmitry Osipenko --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next head: 7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7 commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode :::::: branch date: 19 hours ago :::::: commit date: 4 weeks ago host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -32,7 +32,7 @@ struct ehci_ci_priv { struct ci_hdrc_dma_aligned_buffer { void *kmalloc_ptr; void *old_xfer_buffer; - u8 data[0]; + u8 data[]; }; static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)