Re: [PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-13 Thread Guenter Roeck
On Mon, Feb 12, 2018 at 10:35:50AM +0100, Philippe Ombredanne wrote:
> Jerry,
> 
> On Mon, Feb 12, 2018 at 6:21 AM, Jerry Hoemann  wrote:
> > Minor white space changes and some name clean up.
> >
> > Signed-off-by: Jerry Hoemann 
> > ---
> >  drivers/watchdog/hpwdt.c | 49 
> > +++-
> >  1 file changed, 23 insertions(+), 26 deletions(-)
> >
> > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> > index 6f7949ef9a23..ee9a92220ece 100644
> > --- a/drivers/watchdog/hpwdt.c
> > +++ b/drivers/watchdog/hpwdt.c
> > @@ -1,11 +1,9 @@
> >  /*
> >   * HPE WatchDog Driver
> > - * based on
> >   *
> > - * SoftDog 0.05:   A Software Watchdog Device
> > - *
> > - * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
> > + * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
> >   * Thomas Mingarelli 
> > + * Jerry Hoemann 
> >   *
> >   * This program is free software; you can redistribute it and/or
> >   * modify it under the terms of the GNU General Public License
> 
> Since you are updating the copyright, why not updating the licensing
> to use the new concise SPDX ids instead? [1]
> And you get a big good karma bonus if you can also do the same for all
> HPE-copyrighted files, tree-wide ;) and/or spread the word inside your
> team.
> 

Different logical change, separate patch, please. Which, on a side note,
you might consider submitting yourself.

Thanks,
Guenter


Re: [PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-13 Thread Guenter Roeck
On Mon, Feb 12, 2018 at 10:35:50AM +0100, Philippe Ombredanne wrote:
> Jerry,
> 
> On Mon, Feb 12, 2018 at 6:21 AM, Jerry Hoemann  wrote:
> > Minor white space changes and some name clean up.
> >
> > Signed-off-by: Jerry Hoemann 
> > ---
> >  drivers/watchdog/hpwdt.c | 49 
> > +++-
> >  1 file changed, 23 insertions(+), 26 deletions(-)
> >
> > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> > index 6f7949ef9a23..ee9a92220ece 100644
> > --- a/drivers/watchdog/hpwdt.c
> > +++ b/drivers/watchdog/hpwdt.c
> > @@ -1,11 +1,9 @@
> >  /*
> >   * HPE WatchDog Driver
> > - * based on
> >   *
> > - * SoftDog 0.05:   A Software Watchdog Device
> > - *
> > - * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
> > + * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
> >   * Thomas Mingarelli 
> > + * Jerry Hoemann 
> >   *
> >   * This program is free software; you can redistribute it and/or
> >   * modify it under the terms of the GNU General Public License
> 
> Since you are updating the copyright, why not updating the licensing
> to use the new concise SPDX ids instead? [1]
> And you get a big good karma bonus if you can also do the same for all
> HPE-copyrighted files, tree-wide ;) and/or spread the word inside your
> team.
> 

Different logical change, separate patch, please. Which, on a side note,
you might consider submitting yourself.

Thanks,
Guenter


Re: [PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-12 Thread Philippe Ombredanne
Jerry,

On Mon, Feb 12, 2018 at 6:21 AM, Jerry Hoemann  wrote:
> Minor white space changes and some name clean up.
>
> Signed-off-by: Jerry Hoemann 
> ---
>  drivers/watchdog/hpwdt.c | 49 
> +++-
>  1 file changed, 23 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 6f7949ef9a23..ee9a92220ece 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -1,11 +1,9 @@
>  /*
>   * HPE WatchDog Driver
> - * based on
>   *
> - * SoftDog 0.05:   A Software Watchdog Device
> - *
> - * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
> + * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
>   * Thomas Mingarelli 
> + * Jerry Hoemann 
>   *
>   * This program is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU General Public License

Since you are updating the copyright, why not updating the licensing
to use the new concise SPDX ids instead? [1]
And you get a big good karma bonus if you can also do the same for all
HPE-copyrighted files, tree-wide ;) and/or spread the word inside your
team.

Thank you for your kind consideration!

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst

Cordially
Philippe Ombredanne


Re: [PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-12 Thread Philippe Ombredanne
Jerry,

On Mon, Feb 12, 2018 at 6:21 AM, Jerry Hoemann  wrote:
> Minor white space changes and some name clean up.
>
> Signed-off-by: Jerry Hoemann 
> ---
>  drivers/watchdog/hpwdt.c | 49 
> +++-
>  1 file changed, 23 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 6f7949ef9a23..ee9a92220ece 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -1,11 +1,9 @@
>  /*
>   * HPE WatchDog Driver
> - * based on
>   *
> - * SoftDog 0.05:   A Software Watchdog Device
> - *
> - * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
> + * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
>   * Thomas Mingarelli 
> + * Jerry Hoemann 
>   *
>   * This program is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU General Public License

Since you are updating the copyright, why not updating the licensing
to use the new concise SPDX ids instead? [1]
And you get a big good karma bonus if you can also do the same for all
HPE-copyrighted files, tree-wide ;) and/or spread the word inside your
team.

Thank you for your kind consideration!

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst

Cordially
Philippe Ombredanne


[PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-11 Thread Jerry Hoemann
Minor white space changes and some name clean up.

Signed-off-by: Jerry Hoemann 
---
 drivers/watchdog/hpwdt.c | 49 +++-
 1 file changed, 23 insertions(+), 26 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 6f7949ef9a23..ee9a92220ece 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -1,11 +1,9 @@
 /*
  * HPE WatchDog Driver
- * based on
  *
- * SoftDog 0.05:   A Software Watchdog Device
- *
- * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
+ * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
  * Thomas Mingarelli 
+ * Jerry Hoemann 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -53,7 +51,7 @@ static unsigned long __iomem *hpwdt_timer_con;
 static const struct pci_device_id hpwdt_devices[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xB203) },   /* iLO2 */
{ PCI_DEVICE(PCI_VENDOR_ID_HP, 0x3306) },   /* iLO3 */
-   {0},/* terminate list */
+   {0},/* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, hpwdt_devices);
 
@@ -102,7 +100,7 @@ static int hpwdt_time_left(void)
return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
 }
 
-#ifdef CONFIG_HPWDT_NMI_DECODING
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
 static int hpwdt_my_nmi(void)
 {
return ioread8(hpwdt_nmistat) & 0x6;
@@ -140,7 +138,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
 
return NMI_HANDLED;
 }
-#endif /* CONFIG_HPWDT_NMI_DECODING */
+#endif /* } */
 
 /*
  * /dev/watchdog handling
@@ -205,11 +203,11 @@ static ssize_t hpwdt_write(struct file *file, const char 
__user *data,
return len;
 }
 
-static const struct watchdog_info ident = {
-   .options = WDIOF_SETTIMEOUT |
-  WDIOF_KEEPALIVEPING |
-  WDIOF_MAGICCLOSE,
-   .identity = "HPE iLO2+ HW Watchdog Timer",
+static const struct watchdog_info hpwdt_info = {
+   .options= WDIOF_SETTIMEOUT|
+ WDIOF_KEEPALIVEPING |
+ WDIOF_MAGICCLOSE,
+   .identity   = "HPE iLO2+ HW Watchdog Timer",
 };
 
 static long hpwdt_ioctl(struct file *file, unsigned int cmd,
@@ -223,7 +221,7 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd,
switch (cmd) {
case WDIOC_GETSUPPORT:
ret = 0;
-   if (copy_to_user(argp, , sizeof(ident)))
+   if (copy_to_user(argp, _info, sizeof(hpwdt_info)))
ret = -EFAULT;
break;
 
@@ -320,7 +318,7 @@ static int hpwdt_init_nmi_decoding(struct pci_dev *dev)
return 0;
 
 error2:
-   unregister_nmi_handler(NMI_SERR, "hpwdt");
+   unregister_nmi_handler(NMI_SERR,"hpwdt");
 error1:
unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
 error:
@@ -334,15 +332,14 @@ static int hpwdt_init_nmi_decoding(struct pci_dev *dev)
 
 static void hpwdt_exit_nmi_decoding(void)
 {
-#ifdef CONFIG_HPWDT_NMI_DECODING
-   unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
-   unregister_nmi_handler(NMI_SERR, "hpwdt");
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
+   unregister_nmi_handler(NMI_UNKNOWN,  "hpwdt");
+   unregister_nmi_handler(NMI_SERR, "hpwdt");
unregister_nmi_handler(NMI_IO_CHECK, "hpwdt");
-#endif
+#endif /* } */
 }
 
-static int hpwdt_init_one(struct pci_dev *dev,
-   const struct pci_device_id *ent)
+static int hpwdt_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 {
int retval;
 
@@ -429,10 +426,10 @@ static void hpwdt_exit(struct pci_dev *dev)
 }
 
 static struct pci_driver hpwdt_driver = {
-   .name = "hpwdt",
-   .id_table = hpwdt_devices,
-   .probe = hpwdt_init_one,
-   .remove = hpwdt_exit,
+   .name   = "hpwdt",
+   .id_table   = hpwdt_devices,
+   .probe  = hpwdt_probe,
+   .remove = hpwdt_exit,
 };
 
 MODULE_AUTHOR("Tom Mingarelli");
@@ -447,9 +444,9 @@ module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
-#ifdef CONFIG_HPWDT_NMI_DECODING
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
 module_param(allow_kdump, int, 0);
 MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs");
-#endif /* !CONFIG_HPWDT_NMI_DECODING */
+#endif /* } */
 
 module_pci_driver(hpwdt_driver);
-- 
2.13.6



[PATCH v2 04/11] watchdog/hpwdt: white space changes

2018-02-11 Thread Jerry Hoemann
Minor white space changes and some name clean up.

Signed-off-by: Jerry Hoemann 
---
 drivers/watchdog/hpwdt.c | 49 +++-
 1 file changed, 23 insertions(+), 26 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 6f7949ef9a23..ee9a92220ece 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -1,11 +1,9 @@
 /*
  * HPE WatchDog Driver
- * based on
  *
- * SoftDog 0.05:   A Software Watchdog Device
- *
- * (c) Copyright 2015 Hewlett Packard Enterprise Development LP
+ * (c) Copyright 2018 Hewlett Packard Enterprise Development LP
  * Thomas Mingarelli 
+ * Jerry Hoemann 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -53,7 +51,7 @@ static unsigned long __iomem *hpwdt_timer_con;
 static const struct pci_device_id hpwdt_devices[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_COMPAQ, 0xB203) },   /* iLO2 */
{ PCI_DEVICE(PCI_VENDOR_ID_HP, 0x3306) },   /* iLO3 */
-   {0},/* terminate list */
+   {0},/* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, hpwdt_devices);
 
@@ -102,7 +100,7 @@ static int hpwdt_time_left(void)
return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
 }
 
-#ifdef CONFIG_HPWDT_NMI_DECODING
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
 static int hpwdt_my_nmi(void)
 {
return ioread8(hpwdt_nmistat) & 0x6;
@@ -140,7 +138,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
 
return NMI_HANDLED;
 }
-#endif /* CONFIG_HPWDT_NMI_DECODING */
+#endif /* } */
 
 /*
  * /dev/watchdog handling
@@ -205,11 +203,11 @@ static ssize_t hpwdt_write(struct file *file, const char 
__user *data,
return len;
 }
 
-static const struct watchdog_info ident = {
-   .options = WDIOF_SETTIMEOUT |
-  WDIOF_KEEPALIVEPING |
-  WDIOF_MAGICCLOSE,
-   .identity = "HPE iLO2+ HW Watchdog Timer",
+static const struct watchdog_info hpwdt_info = {
+   .options= WDIOF_SETTIMEOUT|
+ WDIOF_KEEPALIVEPING |
+ WDIOF_MAGICCLOSE,
+   .identity   = "HPE iLO2+ HW Watchdog Timer",
 };
 
 static long hpwdt_ioctl(struct file *file, unsigned int cmd,
@@ -223,7 +221,7 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd,
switch (cmd) {
case WDIOC_GETSUPPORT:
ret = 0;
-   if (copy_to_user(argp, , sizeof(ident)))
+   if (copy_to_user(argp, _info, sizeof(hpwdt_info)))
ret = -EFAULT;
break;
 
@@ -320,7 +318,7 @@ static int hpwdt_init_nmi_decoding(struct pci_dev *dev)
return 0;
 
 error2:
-   unregister_nmi_handler(NMI_SERR, "hpwdt");
+   unregister_nmi_handler(NMI_SERR,"hpwdt");
 error1:
unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
 error:
@@ -334,15 +332,14 @@ static int hpwdt_init_nmi_decoding(struct pci_dev *dev)
 
 static void hpwdt_exit_nmi_decoding(void)
 {
-#ifdef CONFIG_HPWDT_NMI_DECODING
-   unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
-   unregister_nmi_handler(NMI_SERR, "hpwdt");
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
+   unregister_nmi_handler(NMI_UNKNOWN,  "hpwdt");
+   unregister_nmi_handler(NMI_SERR, "hpwdt");
unregister_nmi_handler(NMI_IO_CHECK, "hpwdt");
-#endif
+#endif /* } */
 }
 
-static int hpwdt_init_one(struct pci_dev *dev,
-   const struct pci_device_id *ent)
+static int hpwdt_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 {
int retval;
 
@@ -429,10 +426,10 @@ static void hpwdt_exit(struct pci_dev *dev)
 }
 
 static struct pci_driver hpwdt_driver = {
-   .name = "hpwdt",
-   .id_table = hpwdt_devices,
-   .probe = hpwdt_init_one,
-   .remove = hpwdt_exit,
+   .name   = "hpwdt",
+   .id_table   = hpwdt_devices,
+   .probe  = hpwdt_probe,
+   .remove = hpwdt_exit,
 };
 
 MODULE_AUTHOR("Tom Mingarelli");
@@ -447,9 +444,9 @@ module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
-#ifdef CONFIG_HPWDT_NMI_DECODING
+#ifdef CONFIG_HPWDT_NMI_DECODING   /* { */
 module_param(allow_kdump, int, 0);
 MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs");
-#endif /* !CONFIG_HPWDT_NMI_DECODING */
+#endif /* } */
 
 module_pci_driver(hpwdt_driver);
-- 
2.13.6