From: Michael Ellerman <michael@ellerman.id.au>
To: Jon Mason <jon.mason@exar.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-pci@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
linux-media@vger.kernel.org, Andrew Gallatin <gallatin@myri.com>,
Brice Goglin <brice@myri.com>,
netdev@vger.kernel.org,
Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
Steve Hodgson <shodgson@solarflare.com>,
Ben Hutchings <bhutchings@solarflare.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Ivo van Doorn <IvDoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>,
linux-wireless@vger.kernel.org, Brian King <brking@us.ibm.com>,
Anil Ravindranath <anil_ravindranath@pmc-sierra.com>,
linux-scsi@vger.kernel.org, Jaya Kumar <jayakumar.alsa@gmail.com>,
boyod.yang@siliconmotion.com.cn
Subject: Re: PCI: make pci_restore_state return void
Date: Mon, 06 Dec 2010 09:46:50 +1100 [thread overview]
Message-ID: <1291589210.8514.17.camel@concordia> (raw)
In-Reply-To: <1291160606-31494-1-git-send-email-jon.mason@exar.com>
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Tue, 2010-11-30 at 17:43 -0600, Jon Mason wrote:
> pci_restore_state only ever returns 0, thus there is no benefit in
> having it return any value. Also, a large majority of the callers do
> not check the return code of pci_restore_state. Make the
> pci_restore_state a void return and avoid the overhead.
It does kind of make me nervous that (basically) no one ever checks the
return code from the PCI config space accessors, even though in theory
they can fail. This code being but one example.
/end random comment :)
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-12-05 22:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 23:43 PCI: make pci_restore_state return void Jon Mason
2010-12-02 16:15 ` Bjorn Helgaas
2010-12-03 13:08 ` Mauro Carvalho Chehab
2010-12-05 22:46 ` Michael Ellerman [this message]
2010-12-10 21:07 ` Jesse Barnes
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=1291589210.8514.17.camel@concordia \
--to=michael@ellerman.id.au \
--cc=IvDoorn@gmail.com \
--cc=anil_ravindranath@pmc-sierra.com \
--cc=bhutchings@solarflare.com \
--cc=boyod.yang@siliconmotion.com.cn \
--cc=brice@myri.com \
--cc=brking@us.ibm.com \
--cc=corbet@lwn.net \
--cc=gallatin@myri.com \
--cc=gwingerde@gmail.com \
--cc=jayakumar.alsa@gmail.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jon.mason@exar.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-net-drivers@solarflare.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=shodgson@solarflare.com \
/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).