Skip to content

Additional miscdevice fops parameters

Alice Ryhl linux-fsdevel lkml rust-for-linux 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20241203-miscdevice-file-param-5df7f75861da

Versions newest first

  1. v3 Latest3 patches 6 repliesIn review
  2. v22 patches 20 repliesSuperseded
  3. v11 patch 0 repliesSuperseded

Changes in v3 from the cover letter

- Fix build error in fops->open() patch.
- Improve wording of some comments in fops->open() patch.
- Update commit message with more info on why struct miscdevice is
only made available in fops->open() and not other hooks.
- Include Lee's device accessor patch, since it's a needed component to
use the dev_* printing macros with miscdevice.
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: miscdevice: access file in fopsrust/kernel/miscdevice.rs+25 -62 replies
2/3rust: miscdevice: access the `struct miscdevice` from fops->open()rust/kernel/miscdevice.rs+22 -82 replies
3/3rust: miscdevice: Provide accessor to pull out miscdevice::this_devicerust/kernel/miscdevice.rs+11 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLee JonesDanilo Krummrich
SeriesR-b
1/3R-b T-b
2/3R-b T-b
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Additional miscdevice fops parameters

This could not land with the base miscdevice abstractions due to the dependency on File.

The last two patches enable you to use the dev_* macros to print messages in miscdevice drivers.

---
Changes in v3:
- Fix build error in fops->open() patch.
- Improve wording of some comments in fops->open() patch.
- Update commit message with more info on why struct miscdevice is
only made available in fops->open() and not other hooks.
- Include Lee's device accessor patch, since it's a needed component to
use the dev_* printing macros with miscdevice.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Access the struct miscdevice from fops->open().
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Alice Ryhl (2):
rust: miscdevice: access file in fops
rust: miscdevice: access the struct miscdevice from fops->open()

Lee Jones (1):
rust: miscdevice: Provide accessor to pull out miscdevice::this_device

 rust/kernel/miscdevice.rs | 66 +++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 55 insertions(+), 11 deletions(-)

---
base-commit: fac04efc5c793dccbd07e2d59af9f90b7fc0dca4
change-id: 20241203-miscdevice-file-param-5df7f75861da

Best regards,

Signature · 1 line
Alice Ryhl <[email protected]>