From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 491EFC433ED for ; Wed, 28 Apr 2021 07:24:29 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 B841C60FDB for ; Wed, 28 Apr 2021 07:24:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B841C60FDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7360383A42; Wed, 28 Apr 2021 07:24:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vEipqtXRsgo8; Wed, 28 Apr 2021 07:24:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 6140E83BD9; Wed, 28 Apr 2021 07:24:27 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 830801BF31B for ; Wed, 28 Apr 2021 07:24:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 726564027A for ; Wed, 28 Apr 2021 07:24:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HOJybq2FFzEL for ; Wed, 28 Apr 2021 07:24:25 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by smtp2.osuosl.org (Postfix) with ESMTPS id 512E94020F for ; Wed, 28 Apr 2021 07:24:25 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id l10-20020a17090a850ab0290155b06f6267so2418258pjn.5 for ; Wed, 28 Apr 2021 00:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5LYTEtiy0oE5g1FSqUSMNy7xj6UIB0dhqsQ/+3S1wk4=; b=SM1AWmw9/8trQ3SQTV6NfuL94tmGNEIptbv5txAgGlF3ZYoDUjIC8lh2ePKnQt14yI 7h8PE5HmubRqW11j6NhcX/6cxE8sP2jiw5oIIhiKJMfMMwftufJpLHjWKxIolmoWTDMH +cV2yWNrvyTBGfDS944AtQw4Gr0XdChhD/R6MrDQBSjsbDf44T6inkRuZq0J9DFScPwP 24Nv8chpauIm9kd5g29y8Tf64ShJ/MFOr1T+ZPiUub/e6N7VMwR7wH+E4DkHAPkTRoIY /n2TGRaJmexM2IeA3LUwc5cx15bd3jzIyKXwFHOqETpjjFVjp0JjCnmUCKyyv+Grwdz9 wxag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5LYTEtiy0oE5g1FSqUSMNy7xj6UIB0dhqsQ/+3S1wk4=; b=tKMVAwdYGlkP9z613WKHKF/fAKCgEjJnIP9E3ILVNDaAluoD3kdN6yp8j/uF05Wop7 sDVhU+HUVk2obkZpIbmtwkRKp4QF3VZVdNyVLe2CC1WUT77zV+lPglb8/jZFGC0Y3Mvr exv3EnMpgAuvx0Ml5t8Kyv52lVoB0sAGsf1pr7qiWYDIEcG8J6fGYAkmSbkddJASKr1F mN+IHP7MHtlUGDxkbQ02y6FkGP98oHdoC5IZ2gb6s94wGF3wVGHVkC4qk7bF12Kp84yi DPkUIbT5hv1dPzHQ1k8nOfZoHGTlWKLdLCBRxbgkRSkA/2zmOTXUhFXBs5rIldWQRCtz IqDg== X-Gm-Message-State: AOAM532L8h/50ClzTrVN14fDu5MktMB2FWvIsR4hHW5JxzcJo4qLs3kh NPPGCzw39ew90VWFnfx7VvQ= X-Google-Smtp-Source: ABdhPJwZaQfdMWK2Qw0BqpI7CLvaQ0aeijie8x34QV+qe7QAlVs/qbx/2qKWa1EXSNRz7nRydjrUiw== X-Received: by 2002:a17:90b:190d:: with SMTP id mp13mr9959682pjb.156.1619594664696; Wed, 28 Apr 2021 00:24:24 -0700 (PDT) Received: from gmail.com ([103.52.209.34]) by smtp.gmail.com with ESMTPSA id u69sm4377552pfc.76.2021.04.28.00.24.21 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Apr 2021 00:24:23 -0700 (PDT) Date: Wed, 28 Apr 2021 12:54:18 +0530 From: Jitendra To: Greg KH Subject: Re: [PATCH] staging: rtl8192e: fix array of flexible structures Message-ID: <20210428072418.GA1035@gmail.com> References: <20210427174945.1323-1-jkhasdev@gmail.com> <20210427185844.GA1030@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Wed, Apr 28, 2021 at 08:01:21AM +0200, Greg KH wrote: >On Wed, Apr 28, 2021 at 12:28:44AM +0530, Jitendra wrote: >> On Tue, Apr 27, 2021 at 08:10:20PM +0200, Greg KH wrote: >> > On Tue, Apr 27, 2021 at 11:19:45PM +0530, Jitendra Khasdev wrote: >> > > This patch fixes sparse warning "array of flexible structures" >> > > for rtllib.h. >> > > >> > > eg. drivers/staging/rtl8192e/rtllib.h:832:48: warning: array of >> > > flexible structures >> > > >> > > Signed-off-by: Jitendra Khasdev >> > > --- >> > > drivers/staging/rtl8192e/rtllib.h | 10 +++++----- >> > > 1 file changed, 5 insertions(+), 5 deletions(-) >> > > >> > > diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h >> > > index 4cabaf2..c7cb318 100644 >> > > --- a/drivers/staging/rtl8192e/rtllib.h >> > > +++ b/drivers/staging/rtl8192e/rtllib.h >> > > @@ -802,7 +802,7 @@ struct rtllib_authentication { >> > > __le16 transaction; >> > > __le16 status; >> > > /*challenge*/ >> > > - struct rtllib_info_element info_element[]; >> > > + struct rtllib_info_element *info_element; >> > >> > You just changed the definition of this structure, and the other >> > structures here. Are you sure this is working properly? >> > >> >> I have compiled the driver and install it on my vm, but I don't this specific >> hardware, so couldn't test it. >> >> I fixed in context of sparse. > >Please verify that this change is correct by looking at how the >structures are being created (i.e. is this being treated as a flexible >array or a pointer?) > >I think we have been through this before and that sparse is not right, >but I can't remember... > Yes, it is getting used as flexible array in code. hence, simply we can drop this patch. Also, looks to me, there is no more sparse warnings to fix in staging. --- Jitendra _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel