Re: [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]

 



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@xxxxxxxxxxxxxxx>
> > 
> > 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
--
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