Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1073602pxx; Tue, 27 Oct 2020 07:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztqiGXdPPxkvjEX27YJ++hbTkkG7LN1SB5VDFBRGQ5DyJTRiX2T1B3mSmu0vH7o42bId34 X-Received: by 2002:a17:906:2a09:: with SMTP id j9mr2644255eje.355.1603809665349; Tue, 27 Oct 2020 07:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603809665; cv=none; d=google.com; s=arc-20160816; b=ByGe3+g1XVDclGOka71Jg5mXte0015LBE8Ss1gKtfGSs276VWh79ye/sqZLcRbdCrW lpSzmvtK9qwuvJXXApbR4Vd2YazrWnu1/dFZuwnFjKJQor2+JwCLdRnINxijMleLtGc9 M+46fNRgqV7qwPItm7RE/ArJ1pKhrw4Bl3dG7S904wHD+lQ/+ZPRT35xos2vJHJAkmhq 8wJrBObwwfHPVWsA9Dt9/UZz6/UocFV9jVOVSd9CqKJImo61fz01aiIJyUgr2o3zSiAH hMyp64lCCfEvgRcTqWzlrKF35CONW6gj+Y4m05j3MMI3X1KHS1SvmatrmWWExFEWIpgr UsMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1SLQG9hu6o2Ai+ScIK3PIkSuy+AQOitUwUq5cjqWs30=; b=GWcULNz4erH1QOprWogARbxC5e7uAp36Lf9IzxGJa9/FbIruAN+0C3bbm+YLVyw1Jq xMCL9UvNV5mnBA4OgdK+9mZ/uQ8hl34Gui1hdRDqfAQRyXZBc7zTmD/nk11PomDMc1G6 xHsvpZO93gtHDTdR0GVHZdoBmw2bT8DzTmDICyWn7keOlAp+6RQReiERdR9XbCArWsXH HCgNb75YHnuZ3U5xtwnOjWjQ6XlhpXvfA4P66wtNK9bdCZB8DdaXlLHuqfJerrlvQSTN xZGtyGz0KarTzTwdC+LtNQeaHG6rGWrjnzbETGXzZHM01pZaKMDvpoX0s5rQ48KZO59U ZjSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k+8yTyTg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si1147076ejy.301.2020.10.27.07.40.43; Tue, 27 Oct 2020 07:41:05 -0700 (PDT) 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=@kernel.org header.s=default header.b=k+8yTyTg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422262AbgJ0LWL (ORCPT + 99 others); Tue, 27 Oct 2020 07:22:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:42318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438680AbgJ0LWK (ORCPT ); Tue, 27 Oct 2020 07:22:10 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9138C22265; Tue, 27 Oct 2020 11:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603797729; bh=keEF1atJGqkxzQS1pRxnbXeyCt012WhNm5pF5TvhsVU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k+8yTyTgSvrWzQJlBd4p2EelGPxG9SlppibKiPGf6j/gWtX4+MfWH0kodO5S5XxLx 2odmoek3kRu/Qqji/Bflm3Iv32yM5x5UH8YtmQJeS3Ij0bFzJ16VJu95sMnNAgCevX CsIBWe4uUjVBCO0yAP+BmR1uIqtiycAO5pox8yKA= Date: Tue, 27 Oct 2020 12:23:03 +0100 From: Greg KH To: Muhammad Usama Anjum Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer Message-ID: <20201027112303.GA405023@kroah.com> References: <20201026121435.GA782465@LEGION> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201026121435.GA782465@LEGION> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 05:14:35PM +0500, Muhammad Usama Anjum wrote: > Use pointer notation instead of using array notation as info_element is > a pointer not array. > > Warnings from sparse: > drivers/staging/rtl8192u/ieee80211/ieee80211.h:1013:51: warning: array of flexible structures > drivers/staging/rtl8192u/ieee80211/ieee80211.h:985:51: warning: array of flexible structures > drivers/staging/rtl8192u/ieee80211/ieee80211.h:963:51: warning: array of flexible structures > drivers/staging/rtl8192u/ieee80211/ieee80211.h:996:51: warning: array of flexible structures > drivers/staging/rtl8192u/ieee80211/ieee80211.h:974:51: warning: array of flexible structures > > drivers/staging/rtl8192e/rtllib.h:832:48: warning: array of flexible structures > drivers/staging/rtl8192e/rtllib.h:851:48: warning: array of flexible structures > drivers/staging/rtl8192e/rtllib.h:805:48: warning: array of flexible structures > drivers/staging/rtl8192e/rtllib.h:843:48: warning: array of flexible structures > drivers/staging/rtl8192e/rtllib.h:821:48: warning: array of flexible structures > > Signed-off-by: Muhammad Usama Anjum > --- > drivers/staging/rtl8192e/rtllib.h | 10 +++++----- > drivers/staging/rtl8192u/ieee80211/ieee80211.h | 12 ++++++------ > 2 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h > index b84f00b8d18b..1dab9c3d08a8 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; > } __packed; Are you sure these changes are correct? This isn't just a list of structures after this at the end of the structure? Please look at commit 5979afa2c4d1 ("staging: Replace zero-length array with flexible-array member") which made most of these flexible arrays. This is not a pointer, it really is an array, I think sparse is really wrong here, be careful. thanks, greg k-h