Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 2 files:

Smatch caller information:

net/bluetooth/mgmt.c add_advertising() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
PARAM_VALUE 1 instance 1-255
BUF_SIZE 0 hdev (-1)-s32max
BUF_SIZE 0 hdev (-1)-s32max
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 0 hdev->le_num_of_adv_sets 1
CAPPED_DATA 0 &hdev->lock 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $1
FUZZY_MAX 1 instance 1
PARAM_COMPARE 0 hdev->cur_adv_instance <= $0->le_num_of_adv_sets
PARAM_COMPARE 1 instance <= $0->le_num_of_adv_sets
PARAM_COMPARE 1 instance == $0->cur_adv_instance
NOSPEC 1 instance
RX_PATH
TASK_NOT_RUNNING
UNITS 1 instance unit_byte
LOCK2 global &mgmt_chan_list_lock
LOCK2 sk
LOCK2 0 &hdev->lock
HALF_LOCKED2 &vq->mutex
HALF_LOCKED2 sk
TYPE_LOCK (struct hci_dev)->lock

net/bluetooth/mgmt.c add_ext_adv_data() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
BUF_SIZE 0 hdev (-1)-s32max
BUF_SIZE 0 hdev (-1)-s32max
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 0 &hdev->lock 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $1
PARAM_COMPARE 1 instance == $0->cur_adv_instance
RX_PATH
TASK_NOT_RUNNING
UNITS 1 instance unit_byte
LOCK2 global &mgmt_chan_list_lock
LOCK2 sk
LOCK2 0 &hdev->lock
HALF_LOCKED2 &vq->mutex
HALF_LOCKED2 sk
TYPE_LOCK (struct hci_dev)->lock

net/bluetooth/mgmt.c adv_expire_sync() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $0
UNITS 1 instance unit_byte
LOCK2 0 &hdev->req_lock
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct hci_dev)->req_lock

net/bluetooth/mgmt.c mesh_send_sync() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 0 hdev->le_num_of_adv_sets 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $0
PARAM_COMPARE 0 hdev->cur_adv_instance == $1
PARAM_COMPARE 1 instance == $0->cur_adv_instance
UNITS 1 instance unit_byte
LOCK2 0 &hdev->req_lock
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct hci_dev)->req_lock

net/bluetooth/hci_sync.c hci_clear_adv_instance_sync() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
PARAM_VALUE 1 instance 1-255
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $0
DATA_SOURCE 1 instance $2
PARAM_COMPARE 0 hdev->cur_adv_instance == $1
PARAM_COMPARE 1 instance == $0->cur_adv_instance
UNITS 1 instance unit_byte
LOCK2 0 &hdev->req_lock
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct hci_dev)->req_lock

net/bluetooth/hci_sync.c hci_remove_advertising_sync() -> hci_get_next_instance()

Type Parameter Key Value
PARAM_VALUE 0 hdev 4096-ptr_max
CAPPED_DATA 0 hdev->cur_adv_instance 1
CAPPED_DATA 1 instance 1
DATA_SOURCE 0 hdev $0
DATA_SOURCE 1 instance $2
PARAM_COMPARE 0 hdev->cur_adv_instance == $1
PARAM_COMPARE 1 instance == $0->cur_adv_instance
UNITS 1 instance unit_byte
LOCK2 0 &hdev->req_lock
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct hci_dev)->req_lock