[PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When cast pci_power_t type of variables a static analizer tool complains on
that.

	include/linux/pci.h:119:37: warning: cast from restricted pci_power_t

Enforce type casting to make static analizer happy.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 include/linux/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index b67e4df..8d74834 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -116,7 +116,7 @@ extern const char *pci_power_names[];
 
 static inline const char *pci_power_name(pci_power_t state)
 {
-	return pci_power_names[1 + (int) state];
+	return pci_power_names[1 + (__force int) state];
 }
 
 #define PCI_PM_D2_DELAY		200
-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux