All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: make pci_name use dev_name
@ 2008-07-02 15:35 Greg Kroah-Hartman
  2008-07-02 15:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 15:35 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Kay Sievers, linux-kernel, linux-pci, davem

From: Greg Kroah-Hartman <gregkh@suse.de>

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

This is done in anticipation of removing the bus_id field from struct
driver.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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);
 }
 
 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-02 15:35 [PATCH] PCI: make pci_name use dev_name Greg Kroah-Hartman
@ 2008-07-02 15:51 ` Greg Kroah-Hartman
  2008-07-02 15:58   ` Jesse Barnes
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 15:51 UTC (permalink / raw)
  To: Jesse Barnes, Kay Sievers, linux-kernel, linux-pci, davem

On Wed, Jul 02, 2008 at 08:35:24AM -0700, Greg Kroah-Hartman wrote:
> From: Greg Kroah-Hartman <gregkh@suse.de>
> 
> Also fixes up the sparc PCI code that was assuming this is not a
> constant.
> 
> This is done in anticipation of removing the bus_id field from struct
> driver.
> 
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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)

Andrew just pointed out to me that this causes a bunch of compiler
warnings to be generated.  I'll go audit the tree to fix them as well
and send you a follow-on patch if that's ok.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-02 15:51 ` Greg Kroah-Hartman
@ 2008-07-02 15:58   ` Jesse Barnes
  2008-07-02 16:04     ` Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: Jesse Barnes @ 2008-07-02 15:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Kay Sievers, linux-kernel, linux-pci, davem

On Wednesday, July 02, 2008 8:51 am Greg Kroah-Hartman wrote:
> On Wed, Jul 02, 2008 at 08:35:24AM -0700, Greg Kroah-Hartman wrote:
> > From: Greg Kroah-Hartman <gregkh@suse.de>
> >
> > Also fixes up the sparc PCI code that was assuming this is not a
> > constant.
> >
> > This is done in anticipation of removing the bus_id field from struct
> > driver.
> >
> > Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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)
>
> Andrew just pointed out to me that this causes a bunch of compiler
> warnings to be generated.  I'll go audit the tree to fix them as well
> and send you a follow-on patch if that's ok.

Yeah, works for me.  I've got at least one other patch along these lines 
already.  Assuming Dave doesn't want to handle these SPARC PCI patches 
anyway...

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-02 15:58   ` Jesse Barnes
@ 2008-07-02 16:04     ` Greg KH
  2008-07-02 20:22       ` Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2008-07-02 16:04 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Kay Sievers, linux-kernel, linux-pci, davem

On Wed, Jul 02, 2008 at 08:58:20AM -0700, Jesse Barnes wrote:
> On Wednesday, July 02, 2008 8:51 am Greg Kroah-Hartman wrote:
> > On Wed, Jul 02, 2008 at 08:35:24AM -0700, Greg Kroah-Hartman wrote:
> > > From: Greg Kroah-Hartman <gregkh@suse.de>
> > >
> > > Also fixes up the sparc PCI code that was assuming this is not a
> > > constant.
> > >
> > > This is done in anticipation of removing the bus_id field from struct
> > > driver.
> > >
> > > Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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)
> >
> > Andrew just pointed out to me that this causes a bunch of compiler
> > warnings to be generated.  I'll go audit the tree to fix them as well
> > and send you a follow-on patch if that's ok.
> 
> Yeah, works for me.  I've got at least one other patch along these lines 
> already.  Assuming Dave doesn't want to handle these SPARC PCI patches 
> anyway...

Well, it's only used in 837 different places, so it might take me a few
hours to ensure I catch all the usages :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-02 16:04     ` Greg KH
@ 2008-07-02 20:22       ` Greg KH
  2008-07-02 20:24         ` [patch 01/04] MTD: handle pci_name() being const Greg Kroah-Hartman
                           ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Greg KH @ 2008-07-02 20:22 UTC (permalink / raw)
  To: Jesse Barnes, Andrew Morton, Kay Sievers, linux-kernel, linux-pci,
	davem

On Wed, Jul 02, 2008 at 09:04:22AM -0700, Greg KH wrote:
> On Wed, Jul 02, 2008 at 08:58:20AM -0700, Jesse Barnes wrote:
> > On Wednesday, July 02, 2008 8:51 am Greg Kroah-Hartman wrote:
> > > On Wed, Jul 02, 2008 at 08:35:24AM -0700, Greg Kroah-Hartman wrote:
> > > > From: Greg Kroah-Hartman <gregkh@suse.de>
> > > >
> > > > Also fixes up the sparc PCI code that was assuming this is not a
> > > > constant.
> > > >
> > > > This is done in anticipation of removing the bus_id field from struct
> > > > driver.
> > > >
> > > > Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.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)
> > >
> > > Andrew just pointed out to me that this causes a bunch of compiler
> > > warnings to be generated.  I'll go audit the tree to fix them as well
> > > and send you a follow-on patch if that's ok.
> > 
> > Yeah, works for me.  I've got at least one other patch along these lines 
> > already.  Assuming Dave doesn't want to handle these SPARC PCI patches 
> > anyway...
> 
> Well, it's only used in 837 different places, so it might take me a few
> hours to ensure I catch all the usages :(

Ok, here are 4 patches that fix the few places that this pci change
caused problems.

Jesse, do you want to add these to your tree?  I can take the single USB
one if you want, or you can take all 4, it's fine with me.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 01/04] MTD: handle pci_name() being const
  2008-07-02 20:22       ` Greg KH
@ 2008-07-02 20:24         ` Greg Kroah-Hartman
  2008-07-02 20:24         ` [patch 02/04] PCI: " Greg Kroah-Hartman
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 20:24 UTC (permalink / raw)
  To: Jesse Barnes, David Woodhouse
  Cc: Kay Sievers, linux-kernel, Andrew Morton, linux-pci, davem

[-- Attachment #1: mtd-handle-pci_name-being-const.patch --]
[-- Type: text/plain, Size: 1700 bytes --]

This changes the MTD core to handle pci_name() now returning a constant
string.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/mtd/devices/block2mtd.c |    8 +++++---
 include/linux/mtd/map.h         |    2 +-
 include/linux/mtd/mtd.h         |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -241,6 +241,7 @@ static struct block2mtd_dev *add_device(
 {
 	struct block_device *bdev;
 	struct block2mtd_dev *dev;
+	char *name;
 
 	if (!devname)
 		return NULL;
@@ -279,12 +280,13 @@ static struct block2mtd_dev *add_device(
 
 	/* Setup the MTD structure */
 	/* make the name contain the block device in */
-	dev->mtd.name = kmalloc(sizeof("block2mtd: ") + strlen(devname),
+	name = kmalloc(sizeof("block2mtd: ") + strlen(devname) + 1,
 			GFP_KERNEL);
-	if (!dev->mtd.name)
+	if (!name)
 		goto devinit_err;
 
-	sprintf(dev->mtd.name, "block2mtd: %s", devname);
+	sprintf(name, "block2mtd: %s", devname);
+	dev->mtd.name = name;
 
 	dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
 	dev->mtd.erasesize = erase_size;
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -189,7 +189,7 @@ typedef union {
 */
 
 struct map_info {
-	char *name;
+	const char *name;
 	unsigned long size;
 	resource_size_t phys;
 #define NO_XIP (-1UL)
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -121,7 +121,7 @@ struct mtd_info {
 	u_int32_t oobavail;  // Available OOB bytes per block
 
 	// Kernel-only stuff starts here.
-	char *name;
+	const char *name;
 	int index;
 
 	/* ecc layout structure pointer - read only ! */

-- 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 02/04] PCI: handle pci_name() being const
  2008-07-02 20:22       ` Greg KH
  2008-07-02 20:24         ` [patch 01/04] MTD: handle pci_name() being const Greg Kroah-Hartman
@ 2008-07-02 20:24         ` Greg Kroah-Hartman
  2008-07-03 19:33           ` Jesse Barnes
  2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
                           ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 20:24 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Kay Sievers, linux-kernel, Andrew Morton, linux-pci, davem

[-- Attachment #1: pci-handle-pci_name-being-const.patch --]
[-- Type: text/plain, Size: 784 bytes --]

This changes pci_setup_device to handle pci_name() now returning a
constant string.

Cc: Jesse Barns <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/probe.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -711,8 +711,9 @@ static int pci_setup_device(struct pci_d
 {
 	u32 class;
 
-	sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
-		dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+	dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
+		     dev->bus->number, PCI_SLOT(dev->devfn),
+		     PCI_FUNC(dev->devfn));
 
 	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
 	dev->revision = class & 0xff;

-- 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 03/04] 3c59x: handle pci_name() being const
  2008-07-02 20:22       ` Greg KH
  2008-07-02 20:24         ` [patch 01/04] MTD: handle pci_name() being const Greg Kroah-Hartman
  2008-07-02 20:24         ` [patch 02/04] PCI: " Greg Kroah-Hartman
@ 2008-07-02 20:24         ` Greg Kroah-Hartman
  2008-07-02 23:28           ` Andrew Morton
  2008-07-03 12:17           ` Steffen Klassert
  2008-07-02 20:24         ` [patch 04/04] USB: " Greg Kroah-Hartman
  2008-07-03 19:37         ` [PATCH] PCI: make pci_name use dev_name Jesse Barnes
  4 siblings, 2 replies; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 20:24 UTC (permalink / raw)
  To: Jesse Barnes, Steffen Klassert
  Cc: Kay Sievers, linux-kernel, Andrew Morton, linux-pci, davem

[-- Attachment #1: 3c59x-handle-pci_name-being-const.patch --]
[-- Type: text/plain, Size: 676 bytes --]

This changes vortex_prob1() to handle pci_name() now returning a
constant string.

Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/3c59x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1010,7 +1010,7 @@ static int __devinit vortex_probe1(struc
 	static int printed_version;
 	int retval, print_info;
 	struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx];
-	char *print_name = "3c59x";
+	const char *print_name = "3c59x";
 	struct pci_dev *pdev = NULL;
 	struct eisa_device *edev = NULL;
 	DECLARE_MAC_BUF(mac);

-- 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 04/04] USB: handle pci_name() being const
  2008-07-02 20:22       ` Greg KH
                           ` (2 preceding siblings ...)
  2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
@ 2008-07-02 20:24         ` Greg Kroah-Hartman
  2008-07-03 19:37         ` [PATCH] PCI: make pci_name use dev_name Jesse Barnes
  4 siblings, 0 replies; 19+ messages in thread
From: Greg Kroah-Hartman @ 2008-07-02 20:24 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Kay Sievers, linux-kernel, Andrew Morton, linux-pci, davem

[-- Attachment #1: usb-handle-pci_name-being-const.patch --]
[-- Type: text/plain, Size: 1668 bytes --]

This changes usb_create_hcd() to be able to handle the fact that
pci_name() has changed to a constant string.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hcd.c |    2 +-
 drivers/usb/core/hcd.h |    2 +-
 include/linux/usb.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1755,7 +1755,7 @@ EXPORT_SYMBOL_GPL (usb_hc_died);
  * If memory is unavailable, returns NULL.
  */
 struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
-		struct device *dev, char *bus_name)
+		struct device *dev, const char *bus_name)
 {
 	struct usb_hcd *hcd;
 
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -233,7 +233,7 @@ extern void usb_hcd_disable_endpoint(str
 extern int usb_hcd_get_frame_number(struct usb_device *udev);
 
 extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
-		struct device *dev, char *bus_name);
+		struct device *dev, const char *bus_name);
 extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd);
 extern void usb_put_hcd(struct usb_hcd *hcd);
 extern int usb_add_hcd(struct usb_hcd *hcd,
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -293,7 +293,7 @@ struct usb_devmap {
 struct usb_bus {
 	struct device *controller;	/* host/master side hardware */
 	int busnum;			/* Bus number (in order of reg) */
-	char *bus_name;			/* stable id (PCI slot_name etc) */
+	const char *bus_name;		/* stable id (PCI slot_name etc) */
 	u8 uses_dma;			/* Does the host controller use DMA? */
 	u8 otg_port;			/* 0, or number of OTG/HNP port */
 	unsigned is_b_host:1;		/* true during some HNP roleswitches */

-- 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 03/04] 3c59x: handle pci_name() being const
  2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
@ 2008-07-02 23:28           ` Andrew Morton
  2008-07-03 12:17           ` Steffen Klassert
  1 sibling, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2008-07-02 23:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: jbarnes, klassert, kay.sievers, linux-kernel, linux-pci, davem

On Wed, 2 Jul 2008 13:24:53 -0700
Greg Kroah-Hartman <gregkh@suse.de> wrote:

> This changes vortex_prob1() to handle pci_name() now returning a
> constant string.
> 
> Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/net/3c59x.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/net/3c59x.c
> +++ b/drivers/net/3c59x.c
> @@ -1010,7 +1010,7 @@ static int __devinit vortex_probe1(struc
>  	static int printed_version;
>  	int retval, print_info;
>  	struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx];
> -	char *print_name = "3c59x";
> +	const char *print_name = "3c59x";
>  	struct pci_dev *pdev = NULL;
>  	struct eisa_device *edev = NULL;
>  	DECLARE_MAC_BUF(mac);
> 

Well this one applied.  The others didn't.

Please prefer to not raise patches against a 30MB-old kernel ;)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 03/04] 3c59x: handle pci_name() being const
  2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
  2008-07-02 23:28           ` Andrew Morton
@ 2008-07-03 12:17           ` Steffen Klassert
  2008-07-03 15:43             ` Greg KH
  2008-08-07  6:31             ` Jeff Garzik
  1 sibling, 2 replies; 19+ messages in thread
From: Steffen Klassert @ 2008-07-03 12:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jesse Barnes, Kay Sievers, linux-kernel, Andrew Morton, linux-pci,
	davem, dhowells, jgarzik

On Wed, Jul 02, 2008 at 01:24:53PM -0700, Greg Kroah-Hartman wrote:
> This changes vortex_prob1() to handle pci_name() now returning a
> constant string.
> 
I got the same patch from David Howells already,
that one is acked and send to Jeff Garzik.

Steffen

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 03/04] 3c59x: handle pci_name() being const
  2008-07-03 12:17           ` Steffen Klassert
@ 2008-07-03 15:43             ` Greg KH
  2008-08-07  6:31             ` Jeff Garzik
  1 sibling, 0 replies; 19+ messages in thread
From: Greg KH @ 2008-07-03 15:43 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Jesse Barnes, Kay Sievers, linux-kernel, Andrew Morton, linux-pci,
	davem, dhowells, jgarzik

On Thu, Jul 03, 2008 at 02:17:12PM +0200, Steffen Klassert wrote:
> On Wed, Jul 02, 2008 at 01:24:53PM -0700, Greg Kroah-Hartman wrote:
> > This changes vortex_prob1() to handle pci_name() now returning a
> > constant string.
> > 
> I got the same patch from David Howells already,
> that one is acked and send to Jeff Garzik.

Great, thanks for letting us know.

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 02/04] PCI: handle pci_name() being const
  2008-07-02 20:24         ` [patch 02/04] PCI: " Greg Kroah-Hartman
@ 2008-07-03 19:33           ` Jesse Barnes
  0 siblings, 0 replies; 19+ messages in thread
From: Jesse Barnes @ 2008-07-03 19:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Kay Sievers, linux-kernel, Andrew Morton, linux-pci, davem

On Wednesday, July 02, 2008 1:24 pm Greg Kroah-Hartman wrote:
> This changes pci_setup_device to handle pci_name() now returning a
> constant string.
>
> Cc: Jesse Barns <jbarnes@virtuousgeek.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/pci/probe.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -711,8 +711,9 @@ static int pci_setup_device(struct pci_d
>  {
>  	u32 class;
>
> -	sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
> -		dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
> +	dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
> +		     dev->bus->number, PCI_SLOT(dev->devfn),
> +		     PCI_FUNC(dev->devfn));
>
>  	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
>  	dev->revision = class & 0xff;

Just applied this to my linux-next branch (fortunately I already had the 
dev_set_name commit).  Doing a quick build & test before I push it out.

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-02 20:22       ` Greg KH
                           ` (3 preceding siblings ...)
  2008-07-02 20:24         ` [patch 04/04] USB: " Greg Kroah-Hartman
@ 2008-07-03 19:37         ` Jesse Barnes
  2008-07-03 20:24           ` Greg KH
  4 siblings, 1 reply; 19+ messages in thread
From: Jesse Barnes @ 2008-07-03 19:37 UTC (permalink / raw)
  To: Greg KH; +Cc: Andrew Morton, Kay Sievers, linux-kernel, linux-pci, davem

On Wednesday, July 02, 2008 1:22 pm Greg KH wrote:
> On Wed, Jul 02, 2008 at 09:04:22AM -0700, Greg KH wrote:
> > Well, it's only used in 837 different places, so it might take me a few
> > hours to ensure I catch all the usages :(
>
> Ok, here are 4 patches that fix the few places that this pci change
> caused problems.
>
> Jesse, do you want to add these to your tree?  I can take the single USB
> one if you want, or you can take all 4, it's fine with me.

I'd rather just take the PCI patch (which I'm doing now).  The other stuff can 
come in through the appropriate tree.

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-03 19:37         ` [PATCH] PCI: make pci_name use dev_name Jesse Barnes
@ 2008-07-03 20:24           ` Greg KH
  2008-07-03 20:33             ` Jesse Barnes
  0 siblings, 1 reply; 19+ messages in thread
From: Greg KH @ 2008-07-03 20:24 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Greg KH, Andrew Morton, Kay Sievers, linux-kernel, linux-pci,
	davem

On Thu, Jul 03, 2008 at 12:37:30PM -0700, Jesse Barnes wrote:
> On Wednesday, July 02, 2008 1:22 pm Greg KH wrote:
> > On Wed, Jul 02, 2008 at 09:04:22AM -0700, Greg KH wrote:
> > > Well, it's only used in 837 different places, so it might take me a few
> > > hours to ensure I catch all the usages :(
> >
> > Ok, here are 4 patches that fix the few places that this pci change
> > caused problems.
> >
> > Jesse, do you want to add these to your tree?  I can take the single USB
> > one if you want, or you can take all 4, it's fine with me.
> 
> I'd rather just take the PCI patch (which I'm doing now).  The other stuff can 
> come in through the appropriate tree.

Fair enough, I'll make sure they don't get dropped.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-03 20:24           ` Greg KH
@ 2008-07-03 20:33             ` Jesse Barnes
  2008-07-03 20:52               ` Greg KH
  0 siblings, 1 reply; 19+ messages in thread
From: Jesse Barnes @ 2008-07-03 20:33 UTC (permalink / raw)
  To: Greg KH; +Cc: Greg KH, Andrew Morton, Kay Sievers, linux-kernel, linux-pci,
	davem

On Thursday, July 03, 2008 1:24 pm Greg KH wrote:
> On Thu, Jul 03, 2008 at 12:37:30PM -0700, Jesse Barnes wrote:
> > On Wednesday, July 02, 2008 1:22 pm Greg KH wrote:
> > > On Wed, Jul 02, 2008 at 09:04:22AM -0700, Greg KH wrote:
> > > > Well, it's only used in 837 different places, so it might take me a
> > > > few hours to ensure I catch all the usages :(
> > >
> > > Ok, here are 4 patches that fix the few places that this pci change
> > > caused problems.
> > >
> > > Jesse, do you want to add these to your tree?  I can take the single
> > > USB one if you want, or you can take all 4, it's fine with me.
> >
> > I'd rather just take the PCI patch (which I'm doing now).  The other
> > stuff can come in through the appropriate tree.
>
> Fair enough, I'll make sure they don't get dropped.

Cool thanks.  I assume you'll only push the pci_name change once all or most 
of the compiler warnings have been fixed up?

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] PCI: make pci_name use dev_name
  2008-07-03 20:33             ` Jesse Barnes
@ 2008-07-03 20:52               ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2008-07-03 20:52 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Greg KH, Andrew Morton, Kay Sievers, linux-kernel, linux-pci,
	davem

On Thu, Jul 03, 2008 at 01:33:56PM -0700, Jesse Barnes wrote:
> On Thursday, July 03, 2008 1:24 pm Greg KH wrote:
> > On Thu, Jul 03, 2008 at 12:37:30PM -0700, Jesse Barnes wrote:
> > > On Wednesday, July 02, 2008 1:22 pm Greg KH wrote:
> > > > On Wed, Jul 02, 2008 at 09:04:22AM -0700, Greg KH wrote:
> > > > > Well, it's only used in 837 different places, so it might take me a
> > > > > few hours to ensure I catch all the usages :(
> > > >
> > > > Ok, here are 4 patches that fix the few places that this pci change
> > > > caused problems.
> > > >
> > > > Jesse, do you want to add these to your tree?  I can take the single
> > > > USB one if you want, or you can take all 4, it's fine with me.
> > >
> > > I'd rather just take the PCI patch (which I'm doing now).  The other
> > > stuff can come in through the appropriate tree.
> >
> > Fair enough, I'll make sure they don't get dropped.
> 
> Cool thanks.  I assume you'll only push the pci_name change once all or most 
> of the compiler warnings have been fixed up?

As there were only 4 patches for the warnings, yes, I can handle that :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 03/04] 3c59x: handle pci_name() being const
  2008-07-03 12:17           ` Steffen Klassert
  2008-07-03 15:43             ` Greg KH
@ 2008-08-07  6:31             ` Jeff Garzik
  2008-08-07 10:18               ` Steffen Klassert
  1 sibling, 1 reply; 19+ messages in thread
From: Jeff Garzik @ 2008-08-07  6:31 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Greg Kroah-Hartman, Jesse Barnes, Kay Sievers, linux-kernel,
	Andrew Morton, linux-pci, davem, dhowells

Steffen Klassert wrote:
> On Wed, Jul 02, 2008 at 01:24:53PM -0700, Greg Kroah-Hartman wrote:
>> This changes vortex_prob1() to handle pci_name() now returning a
>> constant string.
>>
> I got the same patch from David Howells already,
> that one is acked and send to Jeff Garzik.

could you resend, I only have the patch in quoted email...



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 03/04] 3c59x: handle pci_name() being const
  2008-08-07  6:31             ` Jeff Garzik
@ 2008-08-07 10:18               ` Steffen Klassert
  0 siblings, 0 replies; 19+ messages in thread
From: Steffen Klassert @ 2008-08-07 10:18 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Greg Kroah-Hartman, Jesse Barnes, Kay Sievers, linux-kernel,
	Andrew Morton, linux-pci, davem, dhowells

On Thu, Aug 07, 2008 at 02:31:45AM -0400, Jeff Garzik wrote:
> Steffen Klassert wrote:
> >On Wed, Jul 02, 2008 at 01:24:53PM -0700, Greg Kroah-Hartman wrote:
> >>This changes vortex_prob1() to handle pci_name() now returning a
> >>constant string.
> >>
> >I got the same patch from David Howells already,
> >that one is acked and send to Jeff Garzik.
> 
> could you resend, I only have the patch in quoted email...
 
The "3c59x: handle pci_name() being const" patch is already
mainline, so there is no need to resend.

Steffen

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-08-07 12:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 15:35 [PATCH] PCI: make pci_name use dev_name Greg Kroah-Hartman
2008-07-02 15:51 ` Greg Kroah-Hartman
2008-07-02 15:58   ` Jesse Barnes
2008-07-02 16:04     ` Greg KH
2008-07-02 20:22       ` Greg KH
2008-07-02 20:24         ` [patch 01/04] MTD: handle pci_name() being const Greg Kroah-Hartman
2008-07-02 20:24         ` [patch 02/04] PCI: " Greg Kroah-Hartman
2008-07-03 19:33           ` Jesse Barnes
2008-07-02 20:24         ` [patch 03/04] 3c59x: " Greg Kroah-Hartman
2008-07-02 23:28           ` Andrew Morton
2008-07-03 12:17           ` Steffen Klassert
2008-07-03 15:43             ` Greg KH
2008-08-07  6:31             ` Jeff Garzik
2008-08-07 10:18               ` Steffen Klassert
2008-07-02 20:24         ` [patch 04/04] USB: " Greg Kroah-Hartman
2008-07-03 19:37         ` [PATCH] PCI: make pci_name use dev_name Jesse Barnes
2008-07-03 20:24           ` Greg KH
2008-07-03 20:33             ` Jesse Barnes
2008-07-03 20:52               ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.