Re: [GIT PATCH] More PCI patches for 2.6.13

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <[email protected]> wrote:
>
> 
> 
> On Fri, 9 Sep 2005, Greg KH wrote:
> > 
> > I fixed up all of the PCI core and USB drivers that were flagged by
> > these warnings already.  Biggest area left is network drivers that I
> > saw.
> 
> The reason I really dislike patches like these is that it causes people to 
> do questionable things.
> 
> For example, there may be perfectly valid reasons why somebody doesn't
> care about the result. I don't see much point in forcing people to check
> the return value of "pci_enable_wake()" for example. There's really no
> real reason to ever care, as far as I can tell - if it fails, there's 
> nothing you can really do about it anyway.
> 
> Also, in general, the fact is that things like "pci_set_power_state()" 
> might fail in _theory_, but we just don't care. A driver that doesn't 
> check the return value is in practice as good a driver as one that does, 
> and forcing people to add code that is totally useless in reality - or 
> look at a warning that is irritating - is just not very productive.
> 
> There are functions where it is really _important_ to check the error 
> return, because they return errors often enough - and the error case is 
> something you have to do something about - that it's good to force people 
> to be aware.
> 
> But "pci_set_power_state()"?
> 
> I don't think so.
> 

If something like a PCI power management function fails then it will likely
cause suspend or resume to malfunction, and we have a lot of such problems.

So we-the-developers do need to hear about it when such functions fail.  So
either a) each and every driver has to blurt a printk (dumb) or b) we stick
a warning and a backtrace in the failing function (better).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux