[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL9ddJdgZSktSBA+nDrM6R02Z1Gour+apEbuz+QOoZnFVtrKXg@mail.gmail.com>
Date: Wed, 23 Sep 2020 09:26:26 -0700
From: David Awogbemila <awogbemila@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Catherine Sullivan <csully@...gle.com>,
Yangchun Fu <yangchun@...gle.com>
Subject: Re: [PATCH net-next v2 1/3] gve: Add support for raw addressing
device option
On Tue, Sep 22, 2020 at 10:32 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 22 Sep 2020 08:50:58 -0700 David Awogbemila wrote:
> > + dev_opt = (struct gve_device_option *)((void *)descriptor +
> > + sizeof(*descriptor));
>
> You don't need to cast void pointers to types.
>
> The idiomatic way to get end of structure in C is: &descriptor[1] or
> descriptor + 1.
Ok, I'll adjust this, thanks.
Powered by blists - more mailing lists