diff options
| author | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-14 22:49:45 -0400 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-14 22:49:45 -0400 |
| commit | db8b4d2bf2d3e02b4ff78bbf69d00e11795840de (patch) | |
| tree | 8ef41ebe2a95ac0e3a0e4ce7a32f4fa20fe33689 /include/linux | |
| parent | 92821c2358c78345909889793918af8763808bd4 (diff) | |
| parent | 782a516e8f432f5ded4adab206bb809e29593c54 (diff) | |
Merge patch series "scsi: Enable context analysis for most drivers"
Bart Van Assche <bvanassche@acm.org> says:
This patch series enables lock context analysis for all SCSI drivers in the
drivers/scsi/ directory except scsi_debug. The advantages are as follows:
- The compiler (only Clang) verifies whether the lock and unlock calls match
what has been declared via __must_hold(), __acquires() or __releases().
This is useful for catching locking bugs in error paths.
- Support for __guarded_by() is enabled. If a member variable is annotated
with __guarded_by(lock), the compiler will issue a warning if that member
variable is accessed without holding 'lock'.
Please consider this patch series for the next merge window.
Thanks,
Bart.
[mkp: Left out BusLogic changes and excluded that driver from context
analysis]
Link: https://patch.msgid.link/cover.1790360262.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index d31a8d107b1e..68166c9f8158 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -611,7 +611,10 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) struct pci_dev *pci_alloc_dev(struct pci_bus *bus); -#define to_pci_dev(n) container_of(n, struct pci_dev, dev) +static inline struct pci_dev *to_pci_dev(const struct device *dev) +{ + return container_of(dev, struct pci_dev, dev); +} #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) #define for_each_pci_dev_reverse(d) \ while ((d = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
