mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-doc@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Haren Myneni <haren@linux.ibm.com>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	Andrew Donnellan <ajd@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Akshay Gupta <akshay.gupta@amd.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	hans@jjverkuil.nl, laurent.pinchart@ideasonboard.com,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Lee Jones <lee@kernel.org>
Subject: [PATCH v2 3/3] samples: rust_misc_device: Bump IOCTL numbers
Date: Tue, 27 May 2025 08:56:48 +0300	[thread overview]
Message-ID: <20250527055648.503884-4-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20250527055648.503884-1-sakari.ailus@linux.intel.com>

Use 0x90 as the IOCTL number base instead of 0x80, thus avoiding using the
same IOCTL numbers as the Media Controller. The change is also in line
with current IOCTL number documentation.

Also use 0xaf, belonging to the samples IOCTL number range, as the
unimplemented IOCTL.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 samples/rust/rust_misc_device.rs | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/samples/rust/rust_misc_device.rs b/samples/rust/rust_misc_device.rs
index c881fd6dbd08..2bd017d7c7c3 100644
--- a/samples/rust/rust_misc_device.rs
+++ b/samples/rust/rust_misc_device.rs
@@ -14,10 +14,10 @@
 //! #include <unistd.h>
 //! #include <sys/ioctl.h>
 //!
-//! #define RUST_MISC_DEV_FAIL _IO('|', 0)
-//! #define RUST_MISC_DEV_HELLO _IO('|', 0x80)
-//! #define RUST_MISC_DEV_GET_VALUE _IOR('|', 0x81, int)
-//! #define RUST_MISC_DEV_SET_VALUE _IOW('|', 0x82, int)
+//! #define RUST_MISC_DEV_FAIL _IO('|', 0xaf)
+//! #define RUST_MISC_DEV_HELLO _IO('|', 0x90)
+//! #define RUST_MISC_DEV_GET_VALUE _IOR('|', 0x91, int)
+//! #define RUST_MISC_DEV_SET_VALUE _IOW('|', 0x92, int)
 //!
 //! int main() {
 //!   int value, new_value;
@@ -110,9 +110,9 @@
     uaccess::{UserSlice, UserSliceReader, UserSliceWriter},
 };
 
-const RUST_MISC_DEV_HELLO: u32 = _IO('|' as u32, 0x80);
-const RUST_MISC_DEV_GET_VALUE: u32 = _IOR::<i32>('|' as u32, 0x81);
-const RUST_MISC_DEV_SET_VALUE: u32 = _IOW::<i32>('|' as u32, 0x82);
+const RUST_MISC_DEV_HELLO: u32 = _IO('|' as u32, 0x90);
+const RUST_MISC_DEV_GET_VALUE: u32 = _IOR::<i32>('|' as u32, 0x91);
+const RUST_MISC_DEV_SET_VALUE: u32 = _IOW::<i32>('|' as u32, 0x92);
 
 module! {
     type: RustMiscDeviceModule,
-- 
2.39.5


  parent reply	other threads:[~2025-05-27  5:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27  5:56 [PATCH v2 0/3] Document Media Controller IOCTL number assignments Sakari Ailus
2025-05-27  5:56 ` [PATCH v2 1/3] Documentation: Bump media IOCTL reserved numbers Sakari Ailus
2025-05-27  5:56 ` [PATCH v2 2/3] media: uapi: Document IOCTL number assignment Sakari Ailus
2025-05-27  5:56 ` Sakari Ailus [this message]
2025-09-05 10:25 ` [PATCH v2 0/3] Document Media Controller IOCTL number assignments Sakari Ailus
2025-09-05 10:32   ` Greg Kroah-Hartman
2025-09-05 11:02     ` Sakari Ailus

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=20250527055648.503884-4-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=ajd@linux.ibm.com \
    --cc=akshay.gupta@amd.com \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans@jjverkuil.nl \
    --cc=haren@linux.ibm.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lee@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mpe@ellerman.id.au \
    /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

all inboxes | Powered by JetHome®