[PATCH 1/9] VC04_SERVICES: Add compat ioctl data structures

Michael Zoran mzoran at crowfest.net
Wed Jan 18 09:30:32 PST 2017


On Wed, 2017-01-18 at 18:23 +0100, Greg KH wrote:
> On Wed, Jan 18, 2017 at 09:18:43AM -0800, Michael Zoran wrote:
> > On Wed, 2017-01-18 at 18:13 +0100, Greg KH wrote:
> > > On Wed, Jan 18, 2017 at 07:04:45AM -0800, Michael Zoran wrote:
> > > > This change adds the compatibility data structures for
> > > > compatibility
> > > > ioctls and defines compatibility ioctl definitions for the
> > > > ioctls
> > > > that have changed.
> > > > 
> > > > Signed-off-by: Michael Zoran <mzoran at crowfest.net>
> > > > ---
> > > >  .../interface/vchiq_arm/vchiq_ioctl.h              | 96
> > > > ++++++++++++++++++++++
> > > >  1 file changed, 96 insertions(+)
> > > > 
> > > > diff --git
> > > > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl
> > > > .h
> > > > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl
> > > > .h
> > > > index 6137ae9de1c1..1681b7792ef2 100644
> > > > ---
> > > > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl
> > > > .h
> > > > +++
> > > > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl
> > > > .h
> > > > @@ -35,6 +35,9 @@
> > > >  #define VCHIQ_IOCTLS_H
> > > >  
> > > >  #include <linux/ioctl.h>
> > > > +#if defined(CONFIG_COMPAT)
> > > > +#include <linux/compat.h>
> > > > +#endif
> > > 
> > > Are you sure this ifdef is needed?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > You're correct, that specific ifdef isn't necessary.  I think the
> > one
> > around the structure definitions is necessary through.
> 
> Really?  Do other compat structures have it in their .h files?
> 

Yes it is necessary to prevent a break, but it appears that most of the
other drivers in the kernel either put the compat structures directly
in the .c file of the driver or they put it in a header that's just for
compat.





More information about the linux-rpi-kernel mailing list