lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 5/8] qaic: Implement data path
On Thu, May 14, 2020 at 10:12:03AM -0600, Jeffrey Hugo wrote:
> On 5/14/2020 9:56 AM, Greg KH wrote:
> > On Thu, May 14, 2020 at 09:06:53AM -0600, Jeffrey Hugo wrote:
> > > On 5/14/2020 8:14 AM, Greg KH wrote:
> > > > On Thu, May 14, 2020 at 08:07:43AM -0600, Jeffrey Hugo wrote:
> > > > > +struct qaic_execute {
> > > > > + __u16 ver; /* struct version, must be 1 */
> > > >
> > > > No need for structures to be versioned. If you change something, then
> > > > add a new ioctl if you really needed it.
> > >
> > > Huh. We had thought the botching ioctls document advised having a version,
> > > but as I double check that document, it infact does not.
> > >
> > > Will remove.
> >
> > Thanks, you can also remove the "reserved" variables as well as those
> > will not be needed either.
>
> Are you sure?
>
> Documentation/process/botching-up-ioctls.rst
> Starting at Line 38:
>
> "Pad the entire struct to a multiple of 64-bits if the structure contains
> 64-bit types - the structure size will otherwise differ on 32-bit versus
> 64-bit. Having a different structure size hurts when passing arrays of
> structures to the kernel, or if the kernel checks the structure size, which
> e.g. the drm core does."
>
> The "reserved" variables seem to be in line with that.

Padding is fine to use, but don't use that as a "I'm reserving this to
use it for later" type of thing which is how I read the structure
definitions. I might be totally wrong, but you should be explicit here.

thanks,

greg k-h

\
 
 \ /
  Last update: 2020-05-14 18:38    [W:0.070 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site