From: Matthew Wilcox <matthew@wil.cx>
To: Jean Delvare <khali@linux-fr.org>
Cc: Enrico Bartky <DOSProfi@web.de>,
linux-pci@atrey.karlin.mff.cuni.cz,
LM Sensors <sensors@stimpy.netroedge.com>,
LKML <linux-kernel@vger.kernel.org>,
Maarten Deprez <maartendeprez@scarlet.be>,
Greg KH <gregkh@suse.de>
Subject: Re: M7101
Date: Sun, 6 Feb 2005 15:06:11 +0000 [thread overview]
Message-ID: <20050206150611.GR20386@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20050206152615.1ab7498c.khali@linux-fr.org>
On Sun, Feb 06, 2005 at 03:26:15PM +0100, Jean Delvare wrote:
> Maarten Deprez then converted it to the proper kernel coding-style:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=110726276414532
>
> I invite you to test the new patch and confirm that it works for you.
>
> Any chance we could get the PCI folks to review the code and push it
> upwards if it is OK?
Looks pretty good to me. For clarity, I'd change:
- m7101 = pci_scan_single_device(dev->bus, 0x18);
+ m7101 = pci_scan_single_device(dev->bus, PCI_DEVFN(3, 0));
and then test m7101 for being NULL -- if it fails, you'll get a NULL
ptr dereference from pci_read_config_byte():
- if (pci_read_config_byte(m7101, 0x5B, &val)) {
+ if (!m7101 || pci_read_config_byte(m7101, 0x5B, &val)) {
I don't think you need to bother checking the subsequent write for failure:
if (val & 0x06) {
- if (pci_write_config_byte(m7101, 0x5B, val & ~0x06)) {
- printk(KERN_INFO "PCI: Failed to enable M7101 SMBus Controller\n");
- return;
- }
+ pci_write_config_byte(m7101, 0x5B, val & ~0x06);
}
So conceptually, I approve, just some details need fixing.
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2005-02-06 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-05 21:18 M7101 Enrico Bartky
2005-02-06 14:26 ` M7101 Jean Delvare
2005-02-06 15:06 ` Matthew Wilcox [this message]
2005-02-08 11:13 ` M7101 Ivan Kokshaysky
2005-02-08 20:39 ` M7101 Ondrej Zary
2005-02-07 3:42 ` M7101 Grant Grundler
2005-02-12 18:52 ` M7101 Jean Delvare
2005-02-07 20:43 ` M7101 Greg KH
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=20050206150611.GR20386@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=DOSProfi@web.de \
--cc=gregkh@suse.de \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=maartendeprez@scarlet.be \
--cc=sensors@stimpy.netroedge.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
all inboxes | Powered by JetHome®