From: Greg KH <gregkh@linuxfoundation.org>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci/pci-sysfs: Set pci interface in uppercase
Date: Wed, 27 Aug 2014 13:23:01 -0700 [thread overview]
Message-ID: <20140827202301.GA13800@kroah.com> (raw)
In-Reply-To: <1409144277-23379-1-git-send-email-ricardo.ribalda@gmail.com>
On Wed, Aug 27, 2014 at 02:57:57PM +0200, Ricardo Ribalda Delgado wrote:
> There is a missmatch between the way file2alias generates the modalias
> and the way the pci driver generates it.
>
> Some implementations of modprobe will fail to load the driver for a pci
> device automatically when the pci interface is defined on the driver. As
> one will be in uppercase and the other in lowercase.
>
> Fortunatelly not many drivers define this.
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
> drivers/pci/pci-sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 9ff0a90..76ef791 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -177,7 +177,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
> {
> struct pci_dev *pci_dev = to_pci_dev(dev);
>
> - return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
> + return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X\n",
> pci_dev->vendor, pci_dev->device,
> pci_dev->subsystem_vendor, pci_dev->subsystem_device,
> (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8),
As said in the other thread about this issue, no, this code has been
here for over 9 years just fine. Please fix your userspace code that is
trying to compare hex values as a string and not a numeric value, that
is the stuff that is wrong, not the kernel.
thanks,
greg k-h
next prev parent reply other threads:[~2014-08-27 20:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 12:57 [PATCH] pci/pci-sysfs: Set pci interface in uppercase Ricardo Ribalda Delgado
2014-08-27 20:23 ` Greg KH [this message]
2014-08-27 20:51 ` Greg KH
2014-08-27 20:56 ` Ricardo Ribalda Delgado
2014-08-27 21:04 ` Greg KH
2014-08-27 21:10 ` Ricardo Ribalda Delgado
2014-08-27 23:41 ` Greg KH
2014-09-02 19:22 ` Ricardo Ribalda Delgado
2014-09-02 20:13 ` Bjorn Helgaas
2014-09-22 19:17 ` Bjorn Helgaas
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=20140827202301.GA13800@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ricardo.ribalda@gmail.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).