linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t
@ 2016-06-07 17:48 Andy Shevchenko
  2016-06-08  0:16 ` Rafael J. Wysocki
  2016-06-11  0:19 ` Bjorn Helgaas
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2016-06-07 17:48 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Rafael J . Wysocki, linux-pm; +Cc: Andy Shevchenko

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@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-13 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07 17:48 [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t Andy Shevchenko
2016-06-08  0:16 ` Rafael J. Wysocki
2016-06-11  0:19 ` Bjorn Helgaas
2016-06-13 11:40   ` Andy Shevchenko
2016-06-13 13:13     ` Bjorn Helgaas
2016-06-13 13:19       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).