linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Nava kishore Manne" <nava.kishore.manne@amd.com>,
	git@amd.com, mdf@kernel.org, hao.wu@intel.com,
	yilun.xu@intel.com, "Tom Rix" <trix@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Saravana Kannan" <saravanak@google.com>,
	linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [RFC v2 1/1] fpga-region: Add generic IOCTL interface for runtime FPGA programming
Date: Mon, 17 Mar 2025 22:12:46 +0100	[thread overview]
Message-ID: <7f818704-d40c-42da-b2c5-942d31e1d9dc@app.fastmail.com> (raw)
In-Reply-To: <20241029091734.3288005-2-nava.kishore.manne@amd.com>

> + * 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

  parent reply	other threads:[~2025-03-17 21:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  9:17 [RFC v2 0/1]Add user space interaction for FPGA programming Nava kishore Manne
2024-10-29  9:17 ` [RFC v2 1/1] fpga-region: Add generic IOCTL interface for runtime " Nava kishore Manne
2024-11-19  4:14   ` Xu Yilun
2024-11-21 10:07     ` Manne, Nava kishore
2024-11-27  1:49       ` Xu Yilun
2024-12-04  6:40         ` Manne, Nava kishore
2024-12-10  9:03           ` Xu Yilun
2024-12-19  9:47             ` Manne, Nava kishore
2023-03-19 15:38               ` Xu Yilun
2025-02-11 11:50                 ` Manne, Nava kishore
2024-11-25 11:26     ` Marco Pagani
2024-11-28  1:34       ` Xu Yilun
2025-01-26 21:13         ` Marco Pagani
2025-02-06  6:04           ` Xu Yilun
2025-02-17 15:18             ` Marco Pagani
2025-03-01  9:27               ` Xu Yilun
2025-03-16 21:55                 ` Marco Pagani
2025-03-17  6:08                   ` Xu Yilun
2025-03-17 21:12   ` Arnd Bergmann [this message]
2024-11-18  6:11 ` [RFC v2 0/1]Add user space interaction for " Manne, Nava kishore

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=7f818704-d40c-42da-b2c5-942d31e1d9dc@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=nava.kishore.manne@amd.com \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).