lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080703164939.GA13326@suse.de>
Date:	Thu, 3 Jul 2008 09:49:39 -0700
From:	Greg KH <gregkh@...e.de>
To:	David Miller <davem@...emloft.net>,
	Jesse Barnes <jbarnes@...tuousgeek.org>
Cc:	kay.sievers@...y.org, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sparc64: fix up bus_id changes in sparc core code

On Thu, Jul 03, 2008 at 03:35:56AM -0700, David Miller wrote:
> From: Greg Kroah-Hartman <gregkh@...e.de>
> Date: Wed, 2 Jul 2008 08:36:51 -0700
> 
> > --- a/arch/sparc64/kernel/pci.c
> > +++ b/arch/sparc64/kernel/pci.c
> > @@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct
> >  	dev->class = class >> 8;
> >  	dev->revision = class & 0xff;
> >  
> > -	sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
> > +	dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
> >  		dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
> >  
> >  	if (ofpci_verbose)
> 
> Those lines read:
> 
> 	sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
> 		dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
> 
> in Linus's current tree.
> 
> What are you patching against?  That first argument is not
> dev->dev.bus_id in any tree I have sitting here, it's always
> pci_name() :-)

Argh, I'm patching against a previous patch that was only sent to Jesse
for the PCI core, sorry for the confusion.

The patch for that is below.  It's probably easier for Jesse to take
both of these in his tree if you like, or I can send you just the Sparc
one, based on HEAD right now, and then the intermediate step in the PCI
patch would not be needed.

thanks,

greg k-h

From: Greg Kroah-Hartman <gregkh@...e.de>
Subject: PCI: make pci_name use dev_name

Also fixes up the sparc code that was assuming this is not a constant.

Signed-off-by: Kay Sievers <kay.sievers@...y.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>

---
 arch/sparc64/kernel/pci.c |    2 +-
 include/linux/pci.h       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct
 	dev->class = class >> 8;
 	dev->revision = class & 0xff;
 
-	sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
+	sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
 		dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
 
 	if (ofpci_verbose)
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -977,9 +977,9 @@ static inline void pci_set_drvdata(struc
 /* If you want to know what to call your pci_dev, ask this function.
  * Again, it's a wrapper around the generic device.
  */
-static inline char *pci_name(struct pci_dev *pdev)
+static inline const char *pci_name(struct pci_dev *pdev)
 {
-	return pdev->dev.bus_id;
+	return dev_name(&pdev->dev);
 }
 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ