From: Bjorn Helgaas <helgaas@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t
Date: Fri, 10 Jun 2016 19:19:56 -0500 [thread overview]
Message-ID: <20160611001956.GH16462@localhost> (raw)
In-Reply-To: <1465321713-146178-1-git-send-email-andriy.shevchenko@linux.intel.com>
On Tue, Jun 07, 2016 at 08:48:33PM +0300, Andy Shevchenko wrote:
> 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>
Applied to pci/pm for v4.8, thanks, Andy.
> ---
> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-11 0:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20160611001956.GH16462@localhost \
--to=helgaas@kernel.org \
--cc=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).