linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Mon, 13 Jun 2016 08:13:46 -0500	[thread overview]
Message-ID: <20160613131346.GA11051@localhost> (raw)
In-Reply-To: <1465818054.30123.10.camel@linux.intel.com>

On Mon, Jun 13, 2016 at 02:40:54PM +0300, Andy Shevchenko wrote:
> On Fri, 2016-06-10 at 19:19 -0500, Bjorn Helgaas wrote:
> > 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.
> 
> Thanks.
> 
> By the way, what was the main point to use __bitwise annotation to this
> type in the first place?

I don't know.  It looks like pci_power_t was the first use of __bitwise in
pci.h, added by e8191db240d2 ("[PATCH] PCI: Cleanup PCI power states").
That changelog mentions type-safety, but I must admit that doesn't make it
obvious to me.

Bjorn

  reply	other threads:[~2016-06-13 13:13 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
2016-06-13 11:40   ` Andy Shevchenko
2016-06-13 13:13     ` Bjorn Helgaas [this message]
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=20160613131346.GA11051@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).