SSAM_DEFINE...REQUEST_CL_N(9)
π SSAM_DEFINE_SYNC_REQUEST_CL_N π
okay bestie, welcome to the Kernel API Manual β yes we're in the kernel docs now, and yes you're gonna slay this. This one lives in the SSAM_DEFINE...REQUEST_CL_N(9) page, iykyk.
β¨ NAME β¨
SSAM_DEFINE_SYNC_REQUEST_CL_N β Define synchronous client-device SAM request function with neither argument nor return value.
Like, zero args, zero return value, all vibes. π
πΈ SYNOPSIS πΈ
SSAM_DEFINE_SYNC_REQUEST_CL_N (name , spec... );
π¦ ARGUMENTS π¦
nameβ Name of the generated function. You pick it, it becomes iconic.specβ Specification (struct ssam_request_spec_md) defining the request. This is the blueprint fr fr.
π DESCRIPTION π
Defines a function executing the synchronous SAM request specified by spec, with the request having neither argument nor return value. No notes, that's the whole deal. π
Device specifying parameters are not hard-coded β instead they're provided via the client device, specifically its UID, supplied when calling this function. So the generated function takes care of setting up the request struct, buffer allocation, as well as execution of the request itself, returning once the request has been fully completed. The required transport buffer will be allocated on the stack. (Stack. Not heap. She's lowkey efficient like that. β¨)
The generated function is defined as
static int name(struct ssam_device *sdev)
returning the status of the request, which is zero on success and negative on failure. The sdev parameter specifies both the target device of the request and by association the controller via which the request is sent. Two for one, main character energy honestly. π«Ά
Refer to ssam_request_do_sync_onstack for more details on the behavior of the generated function. That's the deep lore, go read it. π
π SEE ALSO π
Kernel file ./include/linux/surface_aggregator/device.h, plus the whole friend group:
enum ssam_device_domain(9)enum ssam_virtual_tc(9)struct ssam_device_uid(9)SSAM_DEVICE(9)SSAM_VDEV(9)SSAM_SDEV(9)struct ssam_device(9)struct ssam_device_driver(9)is_ssam_device(9)to_ssam_device(9)to_ssam_device_driver(9)ssam_device_mark_hot_removed(9)ssam_device_is_hot_removed(9)ssam_device_get(9)ssam_device_put(9)ssam_device_get_drvdata(9)ssam_device_set_drvdata(9)ssam_device_driver_register(9)module_ssam_device_driver(9)ssam_register_clients(9)ssam_device_register_clients(9)SSAM_DEFINE_SYNC_REQUEST_CL_W(9)SSAM_DEFINE_SYNC_REQUEST_CL_R(9)SSAM_DEFINE_SYNC_REQUEST_CL_WR(9)ssam_device_notifier_register(9)ssam_device_notifier_unregister(9)
π heads up: unlike the_W,_Rand_WRsiblings in that list, this one is the N version β neither argument nor return value. Don't mix them up bestie, that's a vibe check you do not want to fail.
and that's the page!! sourced from ./include/linux/surface_aggreg..., dated October 2026 β go forth and define your requests, you absolute icon ππ§ββοΈβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms