From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t
Date: Tue, 7 Jun 2016 20:48:33 +0300 [thread overview]
Message-ID: <1465321713-146178-1-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
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
next reply other threads:[~2016-06-07 17:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 17:48 Andy Shevchenko [this message]
2016-06-08 0:16 ` [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465321713-146178-1-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).