Message ID | 1449744040-76428-1-git-send-email-brutallesale@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
On Thu, Dec 10, 2015 at 02:40:40AM -0800, Bogicevic Sasa wrote: > 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 > Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> > --- > 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(-) > > diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c > index 876ccc6..80d94d2 100644 > --- a/drivers/pci/hotplug/acpi_pcihp.c > +++ b/drivers/pci/hotplug/acpi_pcihp.c > @@ -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" > diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c > index 46db293..1c59e4b 100644 > --- a/drivers/pci/hotplug/cpci_hotplug_core.c > +++ b/drivers/pci/hotplug/cpci_hotplug_core.c > @@ -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); > diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c > index 788db48..f2d3f4f 100644 > --- a/drivers/pci/hotplug/cpci_hotplug_pci.c > +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c > @@ -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) > diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c > index 66b7bbe..d0ab4e1 100644 > --- a/drivers/pci/hotplug/cpcihp_generic.c > +++ b/drivers/pci/hotplug/cpcihp_generic.c > @@ -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; > diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c > index 7ecf34e..80dd418 100644 > --- a/drivers/pci/hotplug/cpcihp_zt5550.c > +++ b/drivers/pci/hotplug/cpcihp_zt5550.c > @@ -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; > diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c > index d9b197d..8a77275 100644 > --- a/drivers/pci/hotplug/ibmphp_ebda.c > +++ b/drivers/pci/hotplug/ibmphp_ebda.c > @@ -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); > } > } > > diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c > index d1fab97..2bac1b9 100644 > --- a/drivers/pci/hotplug/pci_hotplug_core.c > +++ b/drivers/pci/hotplug/pci_hotplug_core.c > @@ -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 */ > diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c > index d062c00..14b5d10 100644 > --- a/drivers/pci/hotplug/pcihp_skeleton.c > +++ b/drivers/pci/hotplug/pcihp_skeleton.c > @@ -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; > -- > 2.5.0 > > -- > 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 -- 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
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 } > On Dec 10, 2015, at 23:47, Bjorn Helgaas <helgaas@kernel.org> wrote: > > grep -rl " ," drivers/pci/ -- 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
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 } > On Dec 10, 2015, at 23:47, Bjorn Helgaas <helgaas@kernel.org> wrote: > > On Thu, Dec 10, 2015 at 02:40:40AM -0800, Bogicevic Sasa wrote: >> 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 > > >> Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> >> --- >> 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(-) >> >> diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c >> index 876ccc6..80d94d2 100644 >> --- a/drivers/pci/hotplug/acpi_pcihp.c >> +++ b/drivers/pci/hotplug/acpi_pcihp.c >> @@ -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" >> diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c >> index 46db293..1c59e4b 100644 >> --- a/drivers/pci/hotplug/cpci_hotplug_core.c >> +++ b/drivers/pci/hotplug/cpci_hotplug_core.c >> @@ -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); >> diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c >> index 788db48..f2d3f4f 100644 >> --- a/drivers/pci/hotplug/cpci_hotplug_pci.c >> +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c >> @@ -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) >> diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c >> index 66b7bbe..d0ab4e1 100644 >> --- a/drivers/pci/hotplug/cpcihp_generic.c >> +++ b/drivers/pci/hotplug/cpcihp_generic.c >> @@ -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; >> diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c >> index 7ecf34e..80dd418 100644 >> --- a/drivers/pci/hotplug/cpcihp_zt5550.c >> +++ b/drivers/pci/hotplug/cpcihp_zt5550.c >> @@ -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; >> diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c >> index d9b197d..8a77275 100644 >> --- a/drivers/pci/hotplug/ibmphp_ebda.c >> +++ b/drivers/pci/hotplug/ibmphp_ebda.c >> @@ -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); >> } >> } >> >> diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c >> index d1fab97..2bac1b9 100644 >> --- a/drivers/pci/hotplug/pci_hotplug_core.c >> +++ b/drivers/pci/hotplug/pci_hotplug_core.c >> @@ -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 */ >> diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c >> index d062c00..14b5d10 100644 >> --- a/drivers/pci/hotplug/pcihp_skeleton.c >> +++ b/drivers/pci/hotplug/pcihp_skeleton.c >> @@ -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; >> -- >> 2.5.0 >> >> -- >> 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 -- 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
On Fri, Dec 11, 2015 at 12:07:03AM +0100, sasa bogicevic wrote: > 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. 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 -- 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
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 } > On Dec 11, 2015, at 00:24, Bjorn Helgaas <helgaas@kernel.org> wrote: > > On Fri, Dec 11, 2015 at 12:07:03AM +0100, sasa bogicevic wrote: >> 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. > > 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 -- 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
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 876ccc6..80d94d2 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c @@ -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" diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 46db293..1c59e4b 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c @@ -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); diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 788db48..f2d3f4f 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c @@ -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) diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c index 66b7bbe..d0ab4e1 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c @@ -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; diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 7ecf34e..80dd418 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -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; diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c index d9b197d..8a77275 100644 --- a/drivers/pci/hotplug/ibmphp_ebda.c +++ b/drivers/pci/hotplug/ibmphp_ebda.c @@ -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); } } diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index d1fab97..2bac1b9 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -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 */ diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c index d062c00..14b5d10 100644 --- a/drivers/pci/hotplug/pcihp_skeleton.c +++ b/drivers/pci/hotplug/pcihp_skeleton.c @@ -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;
This fixes all checkpatch errors about space prohibited before comma in drivers/pci/hotplug folder Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> --- 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(-)