mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
Bluetooth: hci_core: Add minimal context analysis annotations
Add minimal compiler context analysis annotations, required for compilation to pass. compiler-context-analysis.h doesn't have tools to deal with the conditional SRCU locking on return value used here, so just disable the analysis in places instead of refactoring, in order to not make code changes here. Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
252862a031
commit
2c704850f1
|
|
@ -62,6 +62,7 @@ static DEFINE_IDA(hci_index_ida);
|
|||
/* Get HCI device by index.
|
||||
* Device is held on return. */
|
||||
static struct hci_dev *__hci_dev_get(int index, int *srcu_index)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
struct hci_dev *hdev = NULL, *d;
|
||||
|
||||
|
|
@ -89,11 +90,13 @@ struct hci_dev *hci_dev_get(int index)
|
|||
}
|
||||
|
||||
static struct hci_dev *hci_dev_get_srcu(int index, int *srcu_index)
|
||||
__context_unsafe(/* conditional locking vs return */)
|
||||
{
|
||||
return __hci_dev_get(index, srcu_index);
|
||||
}
|
||||
|
||||
static void hci_dev_put_srcu(struct hci_dev *hdev, int srcu_index)
|
||||
__context_unsafe(/* conditional locking vs return */)
|
||||
{
|
||||
srcu_read_unlock(&hdev->srcu, srcu_index);
|
||||
hci_dev_put(hdev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user