mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
IB/core: Introduce UVERBS_IDR_ANY_OBJECT
Introduce the UVERBS_IDR_ANY_OBJECT type to match any IDR object. Once used, the infrastructure skips checking for the IDR type, it becomes the driver handler responsibility. This enables drivers to get in a given method an object from various of types. Signed-off-by: Yishai Hadas <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
f33cb7e760
commit
4d7e8cc574
4 changed files with 45 additions and 13 deletions
|
|
@ -524,6 +524,12 @@ struct uapi_definition {
|
|||
.u2.objs_arr.max_len = _max_len, \
|
||||
__VA_ARGS__ } })
|
||||
|
||||
/*
|
||||
* Only for use with UVERBS_ATTR_IDR, allows any uobject type to be accepted,
|
||||
* the user must validate the type of the uobject instead.
|
||||
*/
|
||||
#define UVERBS_IDR_ANY_OBJECT 0xFFFF
|
||||
|
||||
#define UVERBS_ATTR_IDR(_attr_id, _idr_type, _access, ...) \
|
||||
(&(const struct uverbs_attr_def){ \
|
||||
.id = _attr_id, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue