linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: add missing KERN_* constants to printks
@ 2009-02-05 17:25 Frank Seidel
  2009-02-05 17:28 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Frank Seidel @ 2009-02-05 17:25 UTC (permalink / raw)
  To: linux kernel
  Cc: linux-pci, jbarnes, greg, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	fseidel, Frans Pop, Geert Uytterhoeven

From: Frank Seidel <frank@f-seidel.de>

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing pieces here for the pci subsystem.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
 drivers/pci/hotplug/pciehp_core.c |    6 +++---
 drivers/pci/hotplug/shpchp_core.c |    4 ++--
 drivers/pci/intel-iommu.c         |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -526,16 +526,16 @@ static int __init pcied_init(void)
 
 	pciehp_firmware_init();
 	retval = pcie_port_service_register(&hpdriver_portdrv);
- 	dbg("pcie_port_service_register = %d\n", retval);
+	dbg(KERN_DEBUG "pcie_port_service_register = %d\n", retval);
   	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
  	if (retval)
-		dbg("Failure to register service\n");
+		dbg(KERN_DEBUG "Failure to register service\n");
 	return retval;
 }
 
 static void __exit pcied_cleanup(void)
 {
-	dbg("unload_pciehpd()\n");
+	dbg(KERN_DEBUG "unload_pciehpd()\n");
 	pcie_port_service_unregister(&hpdriver_portdrv);
 	info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n");
 }
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -396,14 +396,14 @@ static int __init shpcd_init(void)
 	int retval = 0;
 
 	retval = pci_register_driver(&shpc_driver);
-	dbg("%s: pci_register_driver = %d\n", __func__, retval);
+	dbg(KERN_DEBUG "%s: pci_register_driver = %d\n", __func__, retval);
 	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 	return retval;
 }
 
 static void __exit shpcd_cleanup(void)
 {
-	dbg("unload_shpchpd()\n");
+	dbg(KERN_DEBUG "unload_shpchpd()\n");
 	pci_unregister_driver(&shpc_driver);
 	info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n");
 }
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
 	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
 
 	if (ret)
-		printk("IOMMU: Failed to create 0-64M identity map, "
+		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
 			"floppy might not work\n");
 
 }

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

* Re: [PATCH] PCI: add missing KERN_* constants to printks
  2009-02-05 17:25 [PATCH] PCI: add missing KERN_* constants to printks Frank Seidel
@ 2009-02-05 17:28 ` Greg KH
  2009-02-05 17:32   ` Frank Seidel
  2009-02-05 18:02 ` [PATCHv2] " Frank Seidel
  2009-02-06  9:23 ` [PATCHv3] " Frank Seidel
  2 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2009-02-05 17:28 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, jbarnes, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	Frans Pop, Geert Uytterhoeven

On Thu, Feb 05, 2009 at 06:25:42PM +0100, Frank Seidel wrote:
> From: Frank Seidel <frank@f-seidel.de>
> 
> According to kerneljanitors todo list all printk calls (beginning
> a new line) should have an according KERN_* constant.
> Those are the missing pieces here for the pci subsystem.
> 
> Signed-off-by: Frank Seidel <frank@f-seidel.de>
> ---
>  drivers/pci/hotplug/pciehp_core.c |    6 +++---
>  drivers/pci/hotplug/shpchp_core.c |    4 ++--
>  drivers/pci/intel-iommu.c         |    2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> --- a/drivers/pci/hotplug/pciehp_core.c
> +++ b/drivers/pci/hotplug/pciehp_core.c
> @@ -526,16 +526,16 @@ static int __init pcied_init(void)
>  
>  	pciehp_firmware_init();
>  	retval = pcie_port_service_register(&hpdriver_portdrv);
> - 	dbg("pcie_port_service_register = %d\n", retval);
> +	dbg(KERN_DEBUG "pcie_port_service_register = %d\n", retval);

dbg() already sets the KERN_ level, right?

thanks,

greg k-h

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

* Re: [PATCH] PCI: add missing KERN_* constants to printks
  2009-02-05 17:28 ` Greg KH
@ 2009-02-05 17:32   ` Frank Seidel
  2009-02-05 17:36     ` Frank Seidel
  0 siblings, 1 reply; 16+ messages in thread
From: Frank Seidel @ 2009-02-05 17:32 UTC (permalink / raw)
  To: Greg KH
  Cc: linux kernel, linux-pci, jbarnes, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	Frans Pop, Geert Uytterhoeven

Greg KH wrote:
> On Thu, Feb 05, 2009 at 06:25:42PM +0100, Frank Seidel wrote:
>> - 	dbg("pcie_port_service_register = %d\n", retval);
>> +	dbg(KERN_DEBUG "pcie_port_service_register = %d\n", retval);
> 
> dbg() already sets the KERN_ level, right?

No, its definition in pciehp.h is:
#define dbg(format, arg...)                                             \
        do {                                                            \
                if (pciehp_debug)                                       \
                        printk("%s: " format, MY_NAME , ## arg);        \
        } while (0)

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

* Re: [PATCH] PCI: add missing KERN_* constants to printks
  2009-02-05 17:32   ` Frank Seidel
@ 2009-02-05 17:36     ` Frank Seidel
  2009-02-05 17:49       ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Frank Seidel @ 2009-02-05 17:36 UTC (permalink / raw)
  To: Frank Seidel
  Cc: Greg KH, linux kernel, linux-pci, jbarnes, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	Frans Pop, Geert Uytterhoeven

Frank Seidel wrote:
> No, its definition in pciehp.h is:
> ...

P.S.: I also thought about changing it directly inside
the macro. Would you prefer that?
I decided against that because those printk-macros often
still use the loglevel prefix and i didn't want to change
semantics of the macro (eventhough one would of course
suspect it to set KERN_DEBUG).

Thanks,
Frank

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

* Re: [PATCH] PCI: add missing KERN_* constants to printks
  2009-02-05 17:36     ` Frank Seidel
@ 2009-02-05 17:49       ` Greg KH
  2009-02-05 18:01         ` Frank Seidel
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2009-02-05 17:49 UTC (permalink / raw)
  To: Frank Seidel
  Cc: Frank Seidel, linux kernel, linux-pci, jbarnes,
	kristen.c.accardi, ashok.raj, shaohua.li, anil.s.keshavamurthy,
	fenghua.yu, akpm, Frans Pop, Geert Uytterhoeven

On Thu, Feb 05, 2009 at 06:36:37PM +0100, Frank Seidel wrote:
> Frank Seidel wrote:
> > No, its definition in pciehp.h is:
> > ...
> 
> P.S.: I also thought about changing it directly inside
> the macro. Would you prefer that?
> I decided against that because those printk-macros often
> still use the loglevel prefix and i didn't want to change
> semantics of the macro (eventhough one would of course
> suspect it to set KERN_DEBUG).

I think that any macro called "dbg" should set the level automatically,
as that is the way that the other macros in the kernel with this name do
things...

thanks,

greg k-h

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

* Re: [PATCH] PCI: add missing KERN_* constants to printks
  2009-02-05 17:49       ` Greg KH
@ 2009-02-05 18:01         ` Frank Seidel
  0 siblings, 0 replies; 16+ messages in thread
From: Frank Seidel @ 2009-02-05 18:01 UTC (permalink / raw)
  To: Greg KH
  Cc: Frank Seidel, linux kernel, linux-pci, jbarnes,
	kristen.c.accardi, ashok.raj, shaohua.li, anil.s.keshavamurthy,
	fenghua.yu, akpm, Frans Pop, Geert Uytterhoeven

Greg KH wrote:
> I think that any macro called "dbg" should set the level automatically,
> as that is the way that the other macros in the kernel with this name do
> things...

I fully agree. So i reworked the patch which makes it even more
fit to its $SUBJECT.

Thanks,
Frank

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

* [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-05 17:25 [PATCH] PCI: add missing KERN_* constants to printks Frank Seidel
  2009-02-05 17:28 ` Greg KH
@ 2009-02-05 18:02 ` Frank Seidel
  2009-02-06  8:04   ` Kenji Kaneshige
  2009-02-06  9:01   ` Taku Izumi
  2009-02-06  9:23 ` [PATCHv3] " Frank Seidel
  2 siblings, 2 replies; 16+ messages in thread
From: Frank Seidel @ 2009-02-05 18:02 UTC (permalink / raw)
  To: linux kernel
  Cc: linux-pci, jbarnes, greg, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	Frans Pop, Geert Uytterhoeven

From: Frank Seidel <frank@f-seidel.de>

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing pieces here for the pci subsystem.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
 drivers/pci/hotplug/pciehp.h |    3 ++-
 drivers/pci/hotplug/shpchp.h |    3 ++-
 drivers/pci/intel-iommu.c    |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
 	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
 
 	if (ret)
-		printk("IOMMU: Failed to create 0-64M identity map, "
+		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
 			"floppy might not work\n");
 
 }
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -48,7 +48,8 @@ extern struct workqueue_struct *pciehp_w
 #define dbg(format, arg...)						\
 	do {								\
 		if (pciehp_debug)					\
-			printk("%s: " format, MY_NAME , ## arg);	\
+			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
+			       ## arg);					\
 	} while (0)
 #define err(format, arg...)						\
 	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -50,7 +50,8 @@ extern struct workqueue_struct *shpchp_w
 #define dbg(format, arg...)						\
 	do {								\
 		if (shpchp_debug)					\
-			printk("%s: " format, MY_NAME , ## arg);	\
+			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
+			       ## arg);					\
 	} while (0)
 #define err(format, arg...)						\
 	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)



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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-05 18:02 ` [PATCHv2] " Frank Seidel
@ 2009-02-06  8:04   ` Kenji Kaneshige
  2009-02-06  8:07     ` Frank Seidel
  2009-02-06  9:01   ` Taku Izumi
  1 sibling, 1 reply; 16+ messages in thread
From: Kenji Kaneshige @ 2009-02-06  8:04 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven

Hi,

I have some minor comments below.

Frank Seidel wrote:
(snip.)
> --- a/drivers/pci/hotplug/pciehp.h
> +++ b/drivers/pci/hotplug/pciehp.h
> @@ -48,7 +48,8 @@ extern struct workqueue_struct *pciehp_w
>  #define dbg(format, arg...)						\
>  	do {								\
>  		if (pciehp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> +			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
> +			       ## arg);					\
>  	} while (0)

How about below. I think we can write printk in one line.

#define dbg(format, arg...)						\
do {									\
	if (pciehp_debug)						\
		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
} while (0)

>  #define err(format, arg...)						\
>  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
> --- a/drivers/pci/hotplug/shpchp.h
> +++ b/drivers/pci/hotplug/shpchp.h
> @@ -50,7 +50,8 @@ extern struct workqueue_struct *shpchp_w
>  #define dbg(format, arg...)						\
>  	do {								\
>  		if (shpchp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> +			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
> +			       ## arg);					\
>  	} while (0)

Ditto.

Thanks,
Kenji Kaneshige



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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-06  8:04   ` Kenji Kaneshige
@ 2009-02-06  8:07     ` Frank Seidel
  2009-02-06  8:57       ` Kenji Kaneshige
  0 siblings, 1 reply; 16+ messages in thread
From: Frank Seidel @ 2009-02-06  8:07 UTC (permalink / raw)
  To: Kenji Kaneshige
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven

Kenji Kaneshige wrote:
> How about below. I think we can write printk in one line.
> 
> #define dbg(format, arg...)						\
> do {									\
> 	if (pciehp_debug)						\
> 		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
> } while (0)

I wanted to keep the change as simple as possible and didn't wanna
play with surrounding indentation. But yes, if thats preferred...
i gonna change the patch to this. Shall i?

Thanks,
Frank

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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-06  8:07     ` Frank Seidel
@ 2009-02-06  8:57       ` Kenji Kaneshige
  0 siblings, 0 replies; 16+ messages in thread
From: Kenji Kaneshige @ 2009-02-06  8:57 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven

Frank Seidel wrote:
> Kenji Kaneshige wrote:
>> How about below. I think we can write printk in one line.
>>
>> #define dbg(format, arg...)						\
>> do {									\
>> 	if (pciehp_debug)						\
>> 		printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg);	\
>> } while (0)
> 
> I wanted to keep the change as simple as possible and didn't wanna
> play with surrounding indentation. But yes, if thats preferred...
> i gonna change the patch to this. Shall i?
> 

I prefer it. I don't think it's so complex. And I can review and test
shpchp/pciehp part of your patch on my machine.

Thanks,
Kenji Kaneshige




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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-05 18:02 ` [PATCHv2] " Frank Seidel
  2009-02-06  8:04   ` Kenji Kaneshige
@ 2009-02-06  9:01   ` Taku Izumi
  2009-02-06  9:16     ` Frank Seidel
  2009-02-06 10:23     ` Geert Uytterhoeven
  1 sibling, 2 replies; 16+ messages in thread
From: Taku Izumi @ 2009-02-06  9:01 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven



Frank Seidel wrote:
> From: Frank Seidel <frank@f-seidel.de>
> 
> According to kerneljanitors todo list all printk calls (beginning
> a new line) should have an according KERN_* constant.
> Those are the missing pieces here for the pci subsystem.
> 
> Signed-off-by: Frank Seidel <frank@f-seidel.de>
> ---
>  drivers/pci/hotplug/pciehp.h |    3 ++-
>  drivers/pci/hotplug/shpchp.h |    3 ++-
>  drivers/pci/intel-iommu.c    |    2 +-
>  3 files changed, 5 insertions(+), 3 deletions(-)
> 
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
>  	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
>  
>  	if (ret)
> -		printk("IOMMU: Failed to create 0-64M identity map, "
> +		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
>  			"floppy might not work\n");
>  
>  }
> --- a/drivers/pci/hotplug/pciehp.h
> +++ b/drivers/pci/hotplug/pciehp.h
> @@ -48,7 +48,8 @@ extern struct workqueue_struct *pciehp_w
>  #define dbg(format, arg...)						\
>  	do {								\
>  		if (pciehp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> +			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
> +			       ## arg);					\
>  	} while (0)
>  #define err(format, arg...)						\
>  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)

  Why didn't you retouch the following dev_printk ?

#define ctrl_dbg(ctrl, format, arg...)                                  \
        do {                                                            \
                if (pciehp_debug)                                       \
                        dev_printk(, &ctrl->pcie->device,               \
                                        format, ## arg);                \
        } while (0)

> --- a/drivers/pci/hotplug/shpchp.h
> +++ b/drivers/pci/hotplug/shpchp.h
> @@ -50,7 +50,8 @@ extern struct workqueue_struct *shpchp_w
>  #define dbg(format, arg...)						\
>  	do {								\
>  		if (shpchp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> +			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
> +			       ## arg);					\
>  	} while (0)
>  #define err(format, arg...)						\
>  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

-- 
Best regards,
Taku Izumi


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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-06  9:01   ` Taku Izumi
@ 2009-02-06  9:16     ` Frank Seidel
  2009-02-06 10:23     ` Geert Uytterhoeven
  1 sibling, 0 replies; 16+ messages in thread
From: Frank Seidel @ 2009-02-06  9:16 UTC (permalink / raw)
  To: Taku Izumi
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven

Taku Izumi wrote:
>   Why didn't you retouch the following dev_printk ?

Yes, good question. Thanks for the pointer.. that should
then of course also be changed.

Thanks,
Frank

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

* [PATCHv3] PCI: add missing KERN_* constants to printks
  2009-02-05 17:25 [PATCH] PCI: add missing KERN_* constants to printks Frank Seidel
  2009-02-05 17:28 ` Greg KH
  2009-02-05 18:02 ` [PATCHv2] " Frank Seidel
@ 2009-02-06  9:23 ` Frank Seidel
  2009-02-09  6:47   ` Kenji Kaneshige
  2009-02-13 21:16   ` Jesse Barnes
  2 siblings, 2 replies; 16+ messages in thread
From: Frank Seidel @ 2009-02-06  9:23 UTC (permalink / raw)
  To: linux kernel
  Cc: linux-pci, jbarnes, greg, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	Frans Pop, Geert Uytterhoeven, Frank Seidel, Kenji Kaneshige,
	Taku Izumi

From: Frank Seidel <frank@f-seidel.de>

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the missing pieces here for the pci subsystem.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
 drivers/pci/hotplug/pciehp.h |   10 +++++-----
 drivers/pci/hotplug/shpchp.h |   10 +++++-----
 drivers/pci/intel-iommu.c    |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
 	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
 
 	if (ret)
-		printk("IOMMU: Failed to create 0-64M identity map, "
+		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
 			"floppy might not work\n");
 
 }
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -46,10 +46,10 @@ extern int pciehp_force;
 extern struct workqueue_struct *pciehp_wq;
 
 #define dbg(format, arg...)						\
-	do {								\
-		if (pciehp_debug)					\
-			printk("%s: " format, MY_NAME , ## arg);	\
-	} while (0)
+do {									\
+	if (pciehp_debug)						\
+		printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg);	\
+} while (0)
 #define err(format, arg...)						\
 	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
 #define info(format, arg...)						\
@@ -60,7 +60,7 @@ extern struct workqueue_struct *pciehp_w
 #define ctrl_dbg(ctrl, format, arg...)					\
 	do {								\
 		if (pciehp_debug)					\
-			dev_printk(, &ctrl->pcie->device,		\
+			dev_printk(KERN_DEBUG, &ctrl->pcie->device,	\
 					format, ## arg);		\
 	} while (0)
 #define ctrl_err(ctrl, format, arg...)					\
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -48,10 +48,10 @@ extern int shpchp_debug;
 extern struct workqueue_struct *shpchp_wq;
 
 #define dbg(format, arg...)						\
-	do {								\
-		if (shpchp_debug)					\
-			printk("%s: " format, MY_NAME , ## arg);	\
-	} while (0)
+do {									\
+	if (shpchp_debug)						\
+		printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg);	\
+} while (0)
 #define err(format, arg...)						\
 	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
 #define info(format, arg...)						\
@@ -62,7 +62,7 @@ extern struct workqueue_struct *shpchp_w
 #define ctrl_dbg(ctrl, format, arg...)					\
 	do {								\
 		if (shpchp_debug)					\
-			dev_printk(, &ctrl->pci_dev->dev,		\
+			dev_printk(KERN_DEBUG, &ctrl->pci_dev->dev,	\
 					format, ## arg);		\
 	} while (0)
 #define ctrl_err(ctrl, format, arg...)					\

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

* Re: [PATCHv2] PCI: add missing KERN_* constants to printks
  2009-02-06  9:01   ` Taku Izumi
  2009-02-06  9:16     ` Frank Seidel
@ 2009-02-06 10:23     ` Geert Uytterhoeven
  1 sibling, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2009-02-06 10:23 UTC (permalink / raw)
  To: Taku Izumi
  Cc: Frank Seidel, linux kernel, linux-pci, jbarnes, greg,
	kristen.c.accardi, ashok.raj, shaohua.li, anil.s.keshavamurthy,
	fenghua.yu, akpm, frank, Frans Pop

On Fri, 6 Feb 2009, Taku Izumi wrote:
> Frank Seidel wrote:
> > From: Frank Seidel <frank@f-seidel.de>
> > 
> > According to kerneljanitors todo list all printk calls (beginning
> > a new line) should have an according KERN_* constant.
> > Those are the missing pieces here for the pci subsystem.
> > 
> > Signed-off-by: Frank Seidel <frank@f-seidel.de>
> > ---
> >  drivers/pci/hotplug/pciehp.h |    3 ++-
> >  drivers/pci/hotplug/shpchp.h |    3 ++-
> >  drivers/pci/intel-iommu.c    |    2 +-
> >  3 files changed, 5 insertions(+), 3 deletions(-)
> > 
> > --- a/drivers/pci/intel-iommu.c
> > +++ b/drivers/pci/intel-iommu.c
> > @@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
> >  	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
> >  
> >  	if (ret)
> > -		printk("IOMMU: Failed to create 0-64M identity map, "
> > +		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
> >  			"floppy might not work\n");
> >  
> >  }
> > --- a/drivers/pci/hotplug/pciehp.h
> > +++ b/drivers/pci/hotplug/pciehp.h
> > @@ -48,7 +48,8 @@ extern struct workqueue_struct *pciehp_w
> >  #define dbg(format, arg...)						\
> >  	do {								\
> >  		if (pciehp_debug)					\
> > -			printk("%s: " format, MY_NAME , ## arg);	\
> > +			printk(KERN_DEBUG "%s: " format, MY_NAME ,	\
> > +			       ## arg);					\
> >  	} while (0)
> >  #define err(format, arg...)						\
> >  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
> 
>   Why didn't you retouch the following dev_printk ?
> 
> #define ctrl_dbg(ctrl, format, arg...)                                  \
>         do {                                                            \
>                 if (pciehp_debug)                                       \
>                         dev_printk(, &ctrl->pcie->device,               \
>                                         format, ## arg);                \
>         } while (0)

That's almost the same as dev_dbg(), except for the test for pciehp_debug,
for which you can probably get an alternative using
CONFIG_DYNAMIC_PRINTK_DEBUG.

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCHv3] PCI: add missing KERN_* constants to printks
  2009-02-06  9:23 ` [PATCHv3] " Frank Seidel
@ 2009-02-09  6:47   ` Kenji Kaneshige
  2009-02-13 21:16   ` Jesse Barnes
  1 sibling, 0 replies; 16+ messages in thread
From: Kenji Kaneshige @ 2009-02-09  6:47 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, jbarnes, greg, kristen.c.accardi,
	ashok.raj, shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm,
	frank, Frans Pop, Geert Uytterhoeven, Taku Izumi

Thank you for the updated patch.

Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

Thanks,
Kenji Kaneshige


Frank Seidel wrote:
> From: Frank Seidel <frank@f-seidel.de>
> 
> According to kerneljanitors todo list all printk calls (beginning
> a new line) should have an according KERN_* constant.
> Those are the missing pieces here for the pci subsystem.
> 
> Signed-off-by: Frank Seidel <frank@f-seidel.de>
> ---
>  drivers/pci/hotplug/pciehp.h |   10 +++++-----
>  drivers/pci/hotplug/shpchp.h |   10 +++++-----
>  drivers/pci/intel-iommu.c    |    2 +-
>  3 files changed, 11 insertions(+), 11 deletions(-)
> 
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -1960,7 +1960,7 @@ static inline void iommu_prepare_isa(voi
>  	ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024);
>  
>  	if (ret)
> -		printk("IOMMU: Failed to create 0-64M identity map, "
> +		printk(KERN_ERR "IOMMU: Failed to create 0-64M identity map, "
>  			"floppy might not work\n");
>  
>  }
> --- a/drivers/pci/hotplug/pciehp.h
> +++ b/drivers/pci/hotplug/pciehp.h
> @@ -46,10 +46,10 @@ extern int pciehp_force;
>  extern struct workqueue_struct *pciehp_wq;
>  
>  #define dbg(format, arg...)						\
> -	do {								\
> -		if (pciehp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> -	} while (0)
> +do {									\
> +	if (pciehp_debug)						\
> +		printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg);	\
> +} while (0)
>  #define err(format, arg...)						\
>  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
>  #define info(format, arg...)						\
> @@ -60,7 +60,7 @@ extern struct workqueue_struct *pciehp_w
>  #define ctrl_dbg(ctrl, format, arg...)					\
>  	do {								\
>  		if (pciehp_debug)					\
> -			dev_printk(, &ctrl->pcie->device,		\
> +			dev_printk(KERN_DEBUG, &ctrl->pcie->device,	\
>  					format, ## arg);		\
>  	} while (0)
>  #define ctrl_err(ctrl, format, arg...)					\
> --- a/drivers/pci/hotplug/shpchp.h
> +++ b/drivers/pci/hotplug/shpchp.h
> @@ -48,10 +48,10 @@ extern int shpchp_debug;
>  extern struct workqueue_struct *shpchp_wq;
>  
>  #define dbg(format, arg...)						\
> -	do {								\
> -		if (shpchp_debug)					\
> -			printk("%s: " format, MY_NAME , ## arg);	\
> -	} while (0)
> +do {									\
> +	if (shpchp_debug)						\
> +		printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg);	\
> +} while (0)
>  #define err(format, arg...)						\
>  	printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
>  #define info(format, arg...)						\
> @@ -62,7 +62,7 @@ extern struct workqueue_struct *shpchp_w
>  #define ctrl_dbg(ctrl, format, arg...)					\
>  	do {								\
>  		if (shpchp_debug)					\
> -			dev_printk(, &ctrl->pci_dev->dev,		\
> +			dev_printk(KERN_DEBUG, &ctrl->pci_dev->dev,	\
>  					format, ## arg);		\
>  	} while (0)
>  #define ctrl_err(ctrl, format, arg...)					\
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 



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

* Re: [PATCHv3] PCI: add missing KERN_* constants to printks
  2009-02-06  9:23 ` [PATCHv3] " Frank Seidel
  2009-02-09  6:47   ` Kenji Kaneshige
@ 2009-02-13 21:16   ` Jesse Barnes
  1 sibling, 0 replies; 16+ messages in thread
From: Jesse Barnes @ 2009-02-13 21:16 UTC (permalink / raw)
  To: Frank Seidel
  Cc: linux kernel, linux-pci, greg, kristen.c.accardi, ashok.raj,
	shaohua.li, anil.s.keshavamurthy, fenghua.yu, akpm, frank,
	Frans Pop, Geert Uytterhoeven, Kenji Kaneshige, Taku Izumi

On Friday, February 6, 2009 1:23 am Frank Seidel wrote:
> From: Frank Seidel <frank@f-seidel.de>
>
> According to kerneljanitors todo list all printk calls (beginning
> a new line) should have an according KERN_* constant.
> Those are the missing pieces here for the pci subsystem.
>
> Signed-off-by: Frank Seidel <frank@f-seidel.de>

Applied to my linux-next branch, thanks Frank.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

end of thread, other threads:[~2009-02-13 21:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-05 17:25 [PATCH] PCI: add missing KERN_* constants to printks Frank Seidel
2009-02-05 17:28 ` Greg KH
2009-02-05 17:32   ` Frank Seidel
2009-02-05 17:36     ` Frank Seidel
2009-02-05 17:49       ` Greg KH
2009-02-05 18:01         ` Frank Seidel
2009-02-05 18:02 ` [PATCHv2] " Frank Seidel
2009-02-06  8:04   ` Kenji Kaneshige
2009-02-06  8:07     ` Frank Seidel
2009-02-06  8:57       ` Kenji Kaneshige
2009-02-06  9:01   ` Taku Izumi
2009-02-06  9:16     ` Frank Seidel
2009-02-06 10:23     ` Geert Uytterhoeven
2009-02-06  9:23 ` [PATCHv3] " Frank Seidel
2009-02-09  6:47   ` Kenji Kaneshige
2009-02-13 21:16   ` Jesse Barnes

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).