mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: gregkh@suse.de, davej@codemonkey.org.uk, arjan@infradead.org,
	linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: [GIT PATCH] More PCI patches for 2.6.13
Date: Fri, 9 Sep 2005 16:36:34 -0700	[thread overview]
Message-ID: <20050909163634.21afe4ca.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0509091613310.3051@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> 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).

  parent reply	other threads:[~2005-09-09 23:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-09 22:07 Greg KH
2005-09-09 22:37 ` Linus Torvalds
2005-09-09 22:54   ` Greg KH
2005-09-09 23:22     ` Linus Torvalds
2005-09-09 23:28       ` Linus Torvalds
2005-09-09 23:36       ` Andrew Morton [this message]
2005-09-10  0:22         ` Linus Torvalds
2005-09-10  1:27           ` Jeff Garzik
2005-09-10 18:33       ` John W. Linville
2005-09-10 18:53         ` Linus Torvalds
2005-09-11 11:33           ` Pavel Machek
2005-09-10 10:05     ` Arjan van de Ven
2005-09-10 21:07 Alan Stern
2005-09-10 21:12 ` Linus Torvalds
2005-09-10 21:58   ` Jeff Garzik
2005-09-10 22:31     ` Andrew Morton
2005-09-10 22:53       ` Linus Torvalds
2005-09-10 23:44         ` Jeff Garzik
2005-09-11  0:02           ` Linus Torvalds
2005-09-11  0:17             ` Jeff Garzik
2005-09-11  0:27               ` Linus Torvalds
2005-09-10 23:02       ` Pavel Machek
2005-09-11 11:38       ` Pavel Machek
2005-09-10 22:32     ` Alistair John Strachan
2005-09-10 23:47       ` Jeff Garzik
2005-09-11  6:47         ` David Woodhouse
2005-09-11  4:41       ` Greg KH
2005-09-11  6:47         ` Alistair John Strachan
2005-09-11  2:34 Gabriel A. Devenyi

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=20050909163634.21afe4ca.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=davej@codemonkey.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®