mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
PCI/MSI: Use bool for MSI enable state tracking
Convert pci_msi_enable and pci_msi_enabled() to use bool type for clarity. No functional changes, only code cleanup. Signed-off-by: Hans Zhang <hans.zhang@cixtech.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250516165223.125083-2-18255117159@163.com
This commit is contained in:
committed by
Thomas Gleixner
parent
9442427876
commit
4e7bca76e3
@@ -399,7 +399,7 @@ EXPORT_SYMBOL_GPL(pci_restore_msi_state);
|
||||
* Return: true if MSI has not been globally disabled through ACPI FADT,
|
||||
* PCI bridge quirks, or the "pci=nomsi" kernel command-line option.
|
||||
*/
|
||||
int pci_msi_enabled(void)
|
||||
bool pci_msi_enabled(void)
|
||||
{
|
||||
return pci_msi_enable;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "../pci.h"
|
||||
#include "msi.h"
|
||||
|
||||
int pci_msi_enable = 1;
|
||||
bool pci_msi_enable = true;
|
||||
|
||||
/**
|
||||
* pci_msi_supported - check whether MSI may be enabled on a device
|
||||
@@ -970,5 +970,5 @@ EXPORT_SYMBOL(msi_desc_to_pci_dev);
|
||||
|
||||
void pci_no_msi(void)
|
||||
{
|
||||
pci_msi_enable = 0;
|
||||
pci_msi_enable = false;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ static inline __attribute_const__ u32 msi_multi_mask(struct msi_desc *desc)
|
||||
void msix_prepare_msi_desc(struct pci_dev *dev, struct msi_desc *desc);
|
||||
|
||||
/* Subsystem variables */
|
||||
extern int pci_msi_enable;
|
||||
extern bool pci_msi_enable;
|
||||
|
||||
/* MSI internal functions invoked from the public APIs */
|
||||
void pci_msi_shutdown(struct pci_dev *dev);
|
||||
|
||||
@@ -1669,7 +1669,7 @@ void pci_disable_msi(struct pci_dev *dev);
|
||||
int pci_msix_vec_count(struct pci_dev *dev);
|
||||
void pci_disable_msix(struct pci_dev *dev);
|
||||
void pci_restore_msi_state(struct pci_dev *dev);
|
||||
int pci_msi_enabled(void);
|
||||
bool pci_msi_enabled(void);
|
||||
int pci_enable_msi(struct pci_dev *dev);
|
||||
int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
|
||||
int minvec, int maxvec);
|
||||
@@ -1702,7 +1702,7 @@ static inline void pci_disable_msi(struct pci_dev *dev) { }
|
||||
static inline int pci_msix_vec_count(struct pci_dev *dev) { return -ENOSYS; }
|
||||
static inline void pci_disable_msix(struct pci_dev *dev) { }
|
||||
static inline void pci_restore_msi_state(struct pci_dev *dev) { }
|
||||
static inline int pci_msi_enabled(void) { return 0; }
|
||||
static inline bool pci_msi_enabled(void) { return false; }
|
||||
static inline int pci_enable_msi(struct pci_dev *dev)
|
||||
{ return -ENOSYS; }
|
||||
static inline int pci_enable_msix_range(struct pci_dev *dev,
|
||||
|
||||
Reference in New Issue
Block a user