[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <7f818704-d40c-42da-b2c5-942d31e1d9dc@app.fastmail.com>
Date: Mon, 17 Mar 2025 22:12:46 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Nava kishore Manne" <nava.kishore.manne@....com>, git@....com,
mdf@...nel.org, hao.wu@...el.com, yilun.xu@...el.com,
"Tom Rix" <trix@...hat.com>, "Rob Herring" <robh@...nel.org>,
"Saravana Kannan" <saravanak@...gle.com>, linux-kernel@...r.kernel.org,
linux-fpga@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [RFC v2 1/1] fpga-region: Add generic IOCTL interface for runtime FPGA
programming
> + * FPGA Region Control IOCTLs.
> + */
> +#define FPGA_REGION_MAGIC 'f'
> +#define FPGA_IOW(num, dtype) _IOW(FPGA_REGION_MAGIC, num, dtype)
> +#define FPGA_IOR(num, dtype) _IOR(FPGA_REGION_MAGIC, num, dtype)
> +
> +#define FPGA_REGION_IOCTL_LOAD FPGA_IOW(0, __u32)
> +#define FPGA_REGION_IOCTL_REMOVE FPGA_IOW(1, __u32)
> +#define FPGA_REGION_IOCTL_STATUS FPGA_IOR(2, __u32)
The definition does not appear to match the usage in the driver,
since you don't pass a __u32 structure but instead a
fpga_region_config_info.
Please also remove the extra FPGA_IOW/FPGA_IOR macros and just use
_IOW/IOR directly so it is possible to process the headers when
identifying ioctl command codes.
The 'f' range seems to be rather overloaded already with filesystem
ioctls:
'f' 00-1F linux/ext2_fs.h conflict!
'f' 00-1F linux/ext3_fs.h conflict!
'f' 00-0F fs/jfs/jfs_dinode.h conflict!
'f' 00-0F fs/ext4/ext4.h conflict!
'f' 00-0F linux/fs.h conflict!
'f' 00-0F fs/ocfs2/ocfs2_fs.h conflict!
In particular, the numbers you have defined are very similar to these:
some of these:
#define FS_IOC_GETFLAGS _IOR('f', 1, long)
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
Arnd
Powered by blists - more mailing lists