All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Muhammad Usama Anjum <musamaanjum@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer
Date: Wed, 28 Oct 2020 05:42:32 +0100	[thread overview]
Message-ID: <20201028044232.qtzsnrrh7xgdzsoc@ltop.local> (raw)
In-Reply-To: <20201027112303.GA405023@kroah.com>

On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote:
> 
> 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.

Sparse's warning is not about changing the definition of this member
as if it was the argument of a function. It's about how can you use
an array of structure when this structure has a flexible member.
It's a recent warning, added purposely to catch this.
See https://lore.kernel.org/r/CAHk-=wgJZ05ap8VQdzWDWJVWVtZiOYTc6cnNB8gNeQzEnfm-tw@mail.gmail.com

-- Luc

WARNING: multiple messages have this Message-ID (diff)
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
	Muhammad Usama Anjum <musamaanjum@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer
Date: Wed, 28 Oct 2020 05:42:32 +0100	[thread overview]
Message-ID: <20201028044232.qtzsnrrh7xgdzsoc@ltop.local> (raw)
In-Reply-To: <20201027112303.GA405023@kroah.com>

On Tue, Oct 27, 2020 at 12:23:03PM +0100, Greg KH wrote:
> 
> 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.

Sparse's warning is not about changing the definition of this member
as if it was the argument of a function. It's about how can you use
an array of structure when this structure has a flexible member.
It's a recent warning, added purposely to catch this.
See https://lore.kernel.org/r/CAHk-=wgJZ05ap8VQdzWDWJVWVtZiOYTc6cnNB8gNeQzEnfm-tw@mail.gmail.com

-- Luc
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2020-10-28 23:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 12:14 [PATCH] staging: rtl8192e, rtl8192u: use correct notation to define pointer Muhammad Usama Anjum
2020-10-26 12:14 ` Muhammad Usama Anjum
2020-10-27 11:23 ` Greg KH
2020-10-27 11:23   ` Greg KH
2020-10-27 13:50   ` Dan Carpenter
2020-10-27 13:50     ` Dan Carpenter
2020-10-28  4:42   ` Luc Van Oostenryck [this message]
2020-10-28  4:42     ` Luc Van Oostenryck
2021-02-04 14:51     ` Muhammad Usama Anjum
2021-02-04 14:51       ` Muhammad Usama Anjum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201028044232.qtzsnrrh7xgdzsoc@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=musamaanjum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.