Skip to contentSkip to conversation

drivers:pci:hotplug Fix all space prohibited before that ,

PATCH In review Bogicevic Sasa 2 participants 6 messages Dec 10, 2015

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers:pci:hotplug Fix all space prohibited before that ,

This fixes all checkpatch errors about space prohibited before comma in drivers/pci/hotplug folder

---
 drivers/pci/hotplug/acpi_pcihp.c        | 8 ++++----
 drivers/pci/hotplug/cpci_hotplug_core.c | 8 ++++----
 drivers/pci/hotplug/cpci_hotplug_pci.c  | 8 ++++----
 drivers/pci/hotplug/cpcihp_generic.c    | 8 ++++----
 drivers/pci/hotplug/cpcihp_zt5550.c     | 8 ++++----
 drivers/pci/hotplug/ibmphp_ebda.c       | 2 +-
 drivers/pci/hotplug/pci_hotplug_core.c  | 8 ++++----
 drivers/pci/hotplug/pcihp_skeleton.c    | 8 ++++----
 8 files changed, 29 insertions(+), 29 deletions(-)
drivers/pci/hotplug/acpi_pcihp.c +4 -4
index 876ccc6..80d94d2 100644
@@ -36,10 +36,10 @@
 
 #define MY_NAME	"acpi_pcihp"
 
-#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 #define	METHOD_NAME__SUN	"_SUN"
 #define	METHOD_NAME_OSHP	"OSHP"
drivers/pci/hotplug/cpci_hotplug_core.c +4 -4
index 46db293..1c59e4b 100644
@@ -46,11 +46,11 @@
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static DECLARE_RWSEM(list_rwsem);
drivers/pci/hotplug/cpci_hotplug_pci.c +4 -4
index 788db48..f2d3f4f 100644
@@ -39,11 +39,11 @@ extern int cpci_debug;
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 
 u8 cpci_get_attention_status(struct slot *slot)
drivers/pci/hotplug/cpcihp_generic.c +4 -4
index 66b7bbe..d0ab4e1 100644
@@ -55,11 +55,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/cpcihp_zt5550.c +4 -4
index 7ecf34e..80dd418 100644
@@ -50,11 +50,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/ibmphp_ebda.c +1 -1
index d9b197d..8a77275 100644
@@ -177,7 +177,7 @@ static void __init print_ebda_pci_rsrc (void)
 
 	list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) {
 		debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
-			__func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
+			__func__, ptr->rsrc_type,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
 	}
 }
 
drivers/pci/hotplug/pci_hotplug_core.c +4 -4
index d1fab97..2bac1b9 100644
@@ -45,10 +45,10 @@
 
 #define MY_NAME	"pci_hotplug"
 
-#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 
 /* local variables */
drivers/pci/hotplug/pcihp_skeleton.c +4 -4
index d062c00..14b5d10 100644
@@ -52,11 +52,11 @@ static LIST_HEAD(slot_list);
 	do {							\
 		if (debug)					\
 			printk(KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
Signature · 1 line
2.5.0
#1 lore raw
Quoted 2 lines · Bogicevic Sasa

This fixes all checkpatch errors about space prohibited before comma in drivers/pci/hotplug folder

What happened? I was hoping for a patch that fixed everything in drivers/pci at once, but even after this patch, I see this:

  $ grep -rl " ," drivers/pci/
  drivers/pci/host/pci-imx6.c
  drivers/pci/hotplug/cpqphp.h
  drivers/pci/hotplug/ibmphp_core.c
  drivers/pci/hotplug/shpchp.h
  drivers/pci/hotplug/pciehp.h
  drivers/pci/hotplug/rpaphp.h
  drivers/pci/hotplug/cpqphp_ctrl.c
  drivers/pci/hotplug/ibmphp.h
  drivers/pci/hotplug/shpchp_ctrl.c
Quoted 170 lines
---
 drivers/pci/hotplug/acpi_pcihp.c        | 8 ++++----
 drivers/pci/hotplug/cpci_hotplug_core.c | 8 ++++----
 drivers/pci/hotplug/cpci_hotplug_pci.c  | 8 ++++----
 drivers/pci/hotplug/cpcihp_generic.c    | 8 ++++----
 drivers/pci/hotplug/cpcihp_zt5550.c     | 8 ++++----
 drivers/pci/hotplug/ibmphp_ebda.c       | 2 +-
 drivers/pci/hotplug/pci_hotplug_core.c  | 8 ++++----
 drivers/pci/hotplug/pcihp_skeleton.c    | 8 ++++----
 8 files changed, 29 insertions(+), 29 deletions(-)
drivers/pci/hotplug/acpi_pcihp.c +4 -4
index 876ccc6..80d94d2 100644
@@ -36,10 +36,10 @@
 
 #define MY_NAME	"acpi_pcihp"
 
-#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 #define	METHOD_NAME__SUN	"_SUN"
 #define	METHOD_NAME_OSHP	"OSHP"
drivers/pci/hotplug/cpci_hotplug_core.c +4 -4
index 46db293..1c59e4b 100644
@@ -46,11 +46,11 @@
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static DECLARE_RWSEM(list_rwsem);
drivers/pci/hotplug/cpci_hotplug_pci.c +4 -4
index 788db48..f2d3f4f 100644
@@ -39,11 +39,11 @@ extern int cpci_debug;
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 
 u8 cpci_get_attention_status(struct slot *slot)
drivers/pci/hotplug/cpcihp_generic.c +4 -4
index 66b7bbe..d0ab4e1 100644
@@ -55,11 +55,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/cpcihp_zt5550.c +4 -4
index 7ecf34e..80dd418 100644
@@ -50,11 +50,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/ibmphp_ebda.c +1 -1
index d9b197d..8a77275 100644
@@ -177,7 +177,7 @@ static void __init print_ebda_pci_rsrc (void)
 
 	list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) {
 		debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
-			__func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
+			__func__, ptr->rsrc_type,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
 	}
 }
 
drivers/pci/hotplug/pci_hotplug_core.c +4 -4
index d1fab97..2bac1b9 100644
@@ -45,10 +45,10 @@
 
 #define MY_NAME	"pci_hotplug"
 
-#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 
 /* local variables */
drivers/pci/hotplug/pcihp_skeleton.c +4 -4
index d062c00..14b5d10 100644
@@ -52,11 +52,11 @@ static LIST_HEAD(slot_list);
 	do {							\
 		if (debug)					\
 			printk(KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
Signature · 6 lines
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

I wanted to start with approach one error one folder so I did “space prohibited before ,” in just hotplug folder. I used checkpatch script to see if I nailed it and the output was fine.
When I do grep -rl I also get the same result eventhou when I look at the, for example, drivers/pci/hotplug/shpchp_ctrl.c there is no space before comma anywhere. I double checked it. I didn’t do header files unfortunately so that errors are expected I guess.

./scripts/checkpatch.pl --file --terse drivers/pci/hotplug/shpchp_ctrl.c drivers/pci/hotplug/shpchp_ctrl.c:190: WARNING: Block comments use * on subsequent lines drivers/pci/hotplug/shpchp_ctrl.c:264: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:265: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:344: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:359: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:439: WARNING: Possible unnecessary 'out of memory' message drivers/pci/hotplug/shpchp_ctrl.c:463: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:478: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:569: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:626: WARNING: space prohibited between function name and open parenthesis ‘('
total: 2 errors, 8 warnings, 730 lines checked

I used objdiff to record and see if I didn’t change anything and I got no output so I guess all is good, don’t know why grep finds “ ,” it is a mystery to me since I am on my working branch, looking at a file and it is not there. Can you also take a look on your side ?

I wanted to do one small thing and when I see that it is good and accepted from you then do all warnings and errors one by one.

Thanks, Sasa

{
	name: Bogicevic Sasa
	phone: +381606006200
}
Quoted 3 lines · Bjorn Helgaas

grep -rl " ," drivers/pci/

#5 lore raw
In reply to Bjorn Helgaas

Ha just found the lines when I removed the -l flag

drivers/pci/hotplug/shpchp_ctrl.c: ctrl_dbg(ctrl, "%s: p_slot->device, slot_offset, hp_slot = %d, %d ,%d\n",
drivers/pci/hotplug/cpqphp_ctrl.c: dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n",

So there are spaces before that “%d” but checkpatch.pl didn’t complain

{
	name: Bogicevic Sasa
	phone: +381606006200
}
Quoted 191 lines · Bjorn Helgaas
Quoted 2 lines · Bogicevic Sasa

This fixes all checkpatch errors about space prohibited before comma in drivers/pci/hotplug folder

What happened? I was hoping for a patch that fixed everything in drivers/pci at once, but even after this patch, I see this:

 $ grep -rl " ," drivers/pci/
 drivers/pci/host/pci-imx6.c
 drivers/pci/hotplug/cpqphp.h
 drivers/pci/hotplug/ibmphp_core.c
 drivers/pci/hotplug/shpchp.h
 drivers/pci/hotplug/pciehp.h
 drivers/pci/hotplug/rpaphp.h
 drivers/pci/hotplug/cpqphp_ctrl.c
 drivers/pci/hotplug/ibmphp.h
 drivers/pci/hotplug/shpchp_ctrl.c
Quoted 170 lines

---

drivers/pci/hotplug/acpi_pcihp.c        | 8 ++++----
drivers/pci/hotplug/cpci_hotplug_core.c | 8 ++++----
drivers/pci/hotplug/cpci_hotplug_pci.c  | 8 ++++----
drivers/pci/hotplug/cpcihp_generic.c    | 8 ++++----
drivers/pci/hotplug/cpcihp_zt5550.c     | 8 ++++----
drivers/pci/hotplug/ibmphp_ebda.c       | 2 +-
drivers/pci/hotplug/pci_hotplug_core.c  | 8 ++++----
drivers/pci/hotplug/pcihp_skeleton.c    | 8 ++++----
8 files changed, 29 insertions(+), 29 deletions(-)
drivers/pci/hotplug/acpi_pcihp.c +4 -4
index 876ccc6..80d94d2 100644
@@ -36,10 +36,10 @@
 
 #define MY_NAME	"acpi_pcihp"
 
-#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 #define	METHOD_NAME__SUN	"_SUN"
 #define	METHOD_NAME_OSHP	"OSHP"
drivers/pci/hotplug/cpci_hotplug_core.c +4 -4
index 46db293..1c59e4b 100644
@@ -46,11 +46,11 @@
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static DECLARE_RWSEM(list_rwsem);
drivers/pci/hotplug/cpci_hotplug_pci.c +4 -4
index 788db48..f2d3f4f 100644
@@ -39,11 +39,11 @@ extern int cpci_debug;
 	do {							\
 		if (cpci_debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 
 u8 cpci_get_attention_status(struct slot *slot)
drivers/pci/hotplug/cpcihp_generic.c +4 -4
index 66b7bbe..d0ab4e1 100644
@@ -55,11 +55,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/cpcihp_zt5550.c +4 -4
index 7ecf34e..80dd418 100644
@@ -50,11 +50,11 @@
 	do {							\
 		if (debug)					\
 			printk (KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
drivers/pci/hotplug/ibmphp_ebda.c +1 -1
index d9b197d..8a77275 100644
@@ -177,7 +177,7 @@ static void __init print_ebda_pci_rsrc (void)
 
 	list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) {
 		debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
-			__func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
+			__func__, ptr->rsrc_type,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
 	}
 }
 
drivers/pci/hotplug/pci_hotplug_core.c +4 -4
index d1fab97..2bac1b9 100644
@@ -45,10 +45,10 @@
 
 #define MY_NAME	"pci_hotplug"
 
-#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt, MY_NAME, __func__, ## arg); } while (0)
+#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME, ## arg)
 
 
 /* local variables */
drivers/pci/hotplug/pcihp_skeleton.c +4 -4
index d062c00..14b5d10 100644
@@ -52,11 +52,11 @@ static LIST_HEAD(slot_list);
 	do {							\
 		if (debug)					\
 			printk(KERN_DEBUG "%s: " format "\n",	\
-				MY_NAME , ## arg);		\
+				MY_NAME, ## arg);		\
 	} while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME, ## arg)
+#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME, ## arg)
+#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME, ## arg)
 
 /* local variables */
 static bool debug;
Signature · 6 lines
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to sasa bogicevic
Quoted 16 lines · sasa bogicevic

I wanted to start with approach one error one folder so I did “space prohibited before ,” in just hotplug folder. I used checkpatch script to see if I nailed it and the output was fine.
When I do grep -rl I also get the same result eventhou when I look at the, for example, drivers/pci/hotplug/shpchp_ctrl.c there is no space before comma anywhere. I double checked it. I didn’t do header files unfortunately so that errors are expected I guess.

./scripts/checkpatch.pl --file --terse drivers/pci/hotplug/shpchp_ctrl.c drivers/pci/hotplug/shpchp_ctrl.c:190: WARNING: Block comments use * on subsequent lines drivers/pci/hotplug/shpchp_ctrl.c:264: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:265: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:344: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:359: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:439: WARNING: Possible unnecessary 'out of memory' message drivers/pci/hotplug/shpchp_ctrl.c:463: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:478: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:569: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:626: WARNING: space prohibited between function name and open parenthesis ‘('
total: 2 errors, 8 warnings, 730 lines checked

Quoted 3 lines

I used objdiff to record and see if I didn’t change anything and I got no output so I guess all is good, don’t know why grep finds “ ,” it is a mystery to me since I am on my working branch, looking at a file and it is not there. Can you also take a look on your side ?

I wanted to do one small thing and when I see that it is good and accepted from you then do all warnings and errors one by one.

OK, makes sense. I think you're on the right track, and if you extend this patch to all of drivers/pci, I'll apply it.

I see you found the lines that checkpatch didn't complain about. Maybe checkpatch doesn't look at things inside quoted strings? That's just a guess; I don't use checkpatch regularly.

If you plan to do other things, e.g., removing spaces between the function name and open parenthesis, I'd like to have all the "white space-only" changes in a single patch.

Bjorn

#4 lore raw

Cool Ill group all whitespace issues in one patch, compile everything and use objdiff to make sure I didnt brake anything and resend.

Thanks, Sasa

{
	name: Bogicevic Sasa
	phone: +381606006200
}
Quoted 35 lines · Bjorn Helgaas
Quoted 16 lines · sasa bogicevic

I wanted to start with approach one error one folder so I did “space prohibited before ,” in just hotplug folder. I used checkpatch script to see if I nailed it and the output was fine.
When I do grep -rl I also get the same result eventhou when I look at the, for example, drivers/pci/hotplug/shpchp_ctrl.c there is no space before comma anywhere. I double checked it. I didn’t do header files unfortunately so that errors are expected I guess.

./scripts/checkpatch.pl --file --terse drivers/pci/hotplug/shpchp_ctrl.c drivers/pci/hotplug/shpchp_ctrl.c:190: WARNING: Block comments use * on subsequent lines drivers/pci/hotplug/shpchp_ctrl.c:264: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:265: WARNING: line over 80 characters drivers/pci/hotplug/shpchp_ctrl.c:344: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:359: ERROR: return is not a function, parentheses are not required drivers/pci/hotplug/shpchp_ctrl.c:439: WARNING: Possible unnecessary 'out of memory' message drivers/pci/hotplug/shpchp_ctrl.c:463: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:478: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:569: WARNING: space prohibited between function name and open parenthesis '(' drivers/pci/hotplug/shpchp_ctrl.c:626: WARNING: space prohibited between function name and open parenthesis ‘('
total: 2 errors, 8 warnings, 730 lines checked

Quoted 3 lines

I used objdiff to record and see if I didn’t change anything and I got no output so I guess all is good, don’t know why grep finds “ ,” it is a mystery to me since I am on my working branch, looking at a file and it is not there. Can you also take a look on your side ?

I wanted to do one small thing and when I see that it is good and accepted from you then do all warnings and errors one by one.

OK, makes sense. I think you're on the right track, and if you extend this patch to all of drivers/pci, I'll apply it.

I see you found the lines that checkpatch didn't complain about. Maybe checkpatch doesn't look at things inside quoted strings? That's just a guess; I don't use checkpatch regularly.

If you plan to do other things, e.g., removing spaces between the function name and open parenthesis, I'd like to have all the "white space-only" changes in a single patch.

Bjorn