public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Typo in include/asm-x86_64/pci-direct.h ?
Date: Thu, 12 Feb 2004 03:01:29 -0800	[thread overview]
Message-ID: <402B5D09.6030909@google.com> (raw)

Hi Andi,

I noticed that the return value of read_pci_config_16() was a u8, which looks a bit suspicious. The 
only users of it are in kernel/aperture.c, and appear to work despite only getting 8 bits back, due 
to lucky circumstances. Patch applies to both 2.4 and 2.6.

Paul

--- linux/include/asm-x86_64/pci-direct.h.old	2004-02-12 02:37:53 -0800
+++ linux/include/asm-x86_64/pci-direct.h	2004-02-12 02:37:15 -0800
@@ -28,7 +28,7 @@
  	return v;
  }

-static inline u8 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset)
+static inline u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset)
  {
  	u16 v;
  	outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);



             reply	other threads:[~2004-02-12 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12 11:01 Paul Menage [this message]
2004-02-12 16:51 ` [PATCH] Typo in include/asm-x86_64/pci-direct.h ? Andi Kleen

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=402B5D09.6030909@google.com \
    --to=menage@google.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.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