* [PATCH] powerpc: booke_wdt: Fix build error as a module
@ 2014-08-20 16:55 Pranith Kumar
2014-08-20 16:55 ` [PATCH] serial: Fix build failure caused by missing header file Pranith Kumar
2014-08-20 18:59 ` [PATCH] powerpc: booke_wdt: Fix build error as a module Guenter
0 siblings, 2 replies; 8+ messages in thread
From: Pranith Kumar @ 2014-08-20 16:55 UTC (permalink / raw)
To: Wim Van Sebroeck, open list:WATCHDOG DEVICE D..., open list; +Cc: Guenter Roeck
Building booke_wdt fails when trying to build as a module as there is no
early_param() in module. Fix by using module_param() instead of early_param().
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
CC: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/booke_wdt.c | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 08a7853..65f5e9f 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -30,8 +30,6 @@
* occur, and the final time the board will reset.
*/
-u32 booke_wdt_enabled;
-u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
#ifdef CONFIG_PPC_FSL_BOOK3E
#define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15))
@@ -41,27 +39,10 @@ u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
#define WDTP_MASK (TCR_WP_MASK)
#endif
-/* Checks wdt=x and wdt_period=xx command-line option */
-notrace int __init early_parse_wdt(char *p)
-{
- if (p && strncmp(p, "0", 1) != 0)
- booke_wdt_enabled = 1;
-
- return 0;
-}
-early_param("wdt", early_parse_wdt);
-
-int __init early_parse_wdt_period(char *p)
-{
- unsigned long ret;
- if (p) {
- if (!kstrtol(p, 0, &ret))
- booke_wdt_period = ret;
- }
-
- return 0;
-}
-early_param("wdt_period", early_parse_wdt_period);
+static bool booke_wdt_enabled = true;
+module_param(booke_wdt_enabled, bool, 0444);
+static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
+module_param(booke_wdt_period, int, 0444);
#ifdef CONFIG_PPC_FSL_BOOK3E
@@ -259,5 +240,6 @@ static int __init booke_wdt_init(void)
module_init(booke_wdt_init);
module_exit(booke_wdt_exit);
+MODULE_ALIAS("booke_wdt");
MODULE_DESCRIPTION("PowerPC Book-E watchdog driver");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] serial: Fix build failure caused by missing header file
2014-08-20 16:55 [PATCH] powerpc: booke_wdt: Fix build error as a module Pranith Kumar
@ 2014-08-20 16:55 ` Pranith Kumar
2014-08-25 20:13 ` Greg Kroah-Hartman
2014-08-20 18:59 ` [PATCH] powerpc: booke_wdt: Fix build error as a module Guenter
1 sibling, 1 reply; 8+ messages in thread
From: Pranith Kumar @ 2014-08-20 16:55 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS,
open list
Fix build failure caused by missing header file:
drivers/tty/serial/nwpserial.c: In function 'wait_for_bits':
drivers/tty/serial/nwpserial.c:53:3: error: implicit declaration of function 'udelay' [-Werror=implicit-function-declaration]
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
drivers/tty/serial/nwpserial.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/nwpserial.c b/drivers/tty/serial/nwpserial.c
index c06366b..5da7622 100644
--- a/drivers/tty/serial/nwpserial.c
+++ b/drivers/tty/serial/nwpserial.c
@@ -22,6 +22,7 @@
#include <linux/of_platform.h>
#include <linux/of_device.h>
#include <linux/nwpserial.h>
+#include <linux/delay.h>
#include <asm/prom.h>
#include <asm/dcr.h>
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc: booke_wdt: Fix build error as a module
2014-08-20 16:55 [PATCH] powerpc: booke_wdt: Fix build error as a module Pranith Kumar
2014-08-20 16:55 ` [PATCH] serial: Fix build failure caused by missing header file Pranith Kumar
@ 2014-08-20 18:59 ` Guenter
2014-08-20 19:18 ` Pranith Kumar
1 sibling, 1 reply; 8+ messages in thread
From: Guenter @ 2014-08-20 18:59 UTC (permalink / raw)
To: Pranith Kumar; +Cc: Wim Van Sebroeck, open list:WATCHDOG DEVICE D..., open list
On Wed, Aug 20, 2014 at 12:55:44PM -0400, Pranith Kumar wrote:
> Building booke_wdt fails when trying to build as a module as there is no
> early_param() in module. Fix by using module_param() instead of early_param().
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> CC: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/booke_wdt.c | 28 +++++-----------------------
> 1 file changed, 5 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
> index 08a7853..65f5e9f 100644
> --- a/drivers/watchdog/booke_wdt.c
> +++ b/drivers/watchdog/booke_wdt.c
> @@ -30,8 +30,6 @@
> * occur, and the final time the board will reset.
> */
>
> -u32 booke_wdt_enabled;
> -u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
>
> #ifdef CONFIG_PPC_FSL_BOOK3E
> #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15))
> @@ -41,27 +39,10 @@ u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
> #define WDTP_MASK (TCR_WP_MASK)
> #endif
>
> -/* Checks wdt=x and wdt_period=xx command-line option */
> -notrace int __init early_parse_wdt(char *p)
> -{
> - if (p && strncmp(p, "0", 1) != 0)
> - booke_wdt_enabled = 1;
> -
> - return 0;
> -}
> -early_param("wdt", early_parse_wdt);
> -
> -int __init early_parse_wdt_period(char *p)
> -{
> - unsigned long ret;
> - if (p) {
> - if (!kstrtol(p, 0, &ret))
> - booke_wdt_period = ret;
> - }
> -
> - return 0;
> -}
> -early_param("wdt_period", early_parse_wdt_period);
> +static bool booke_wdt_enabled = true;
Any reason for changing the default from false to true ?
Unless you have a reaslly good reason, I don't think that is a good idea.
> +module_param(booke_wdt_enabled, bool, 0444);
> +static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
> +module_param(booke_wdt_period, int, 0444);
>
Also not sure if it adds value to have the module parameters visible
from user space. Why not use 0 for the permission flags ?
Thanks,
Guenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc: booke_wdt: Fix build error as a module
2014-08-20 18:59 ` [PATCH] powerpc: booke_wdt: Fix build error as a module Guenter
@ 2014-08-20 19:18 ` Pranith Kumar
2014-08-20 19:21 ` Pranith Kumar
0 siblings, 1 reply; 8+ messages in thread
From: Pranith Kumar @ 2014-08-20 19:18 UTC (permalink / raw)
To: Guenter; +Cc: Wim Van Sebroeck, open list:WATCHDOG DEVICE D..., open list
On Wed, Aug 20, 2014 at 2:59 PM, Guenter <linux@roeck-us.net> wrote:
> On Wed, Aug 20, 2014 at 12:55:44PM -0400, Pranith Kumar wrote:
>> Building booke_wdt fails when trying to build as a module as there is no
>> early_param() in module. Fix by using module_param() instead of early_param().
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>> CC: Guenter Roeck <linux@roeck-us.net>
>> ---
>> drivers/watchdog/booke_wdt.c | 28 +++++-----------------------
>> 1 file changed, 5 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
>> index 08a7853..65f5e9f 100644
>> --- a/drivers/watchdog/booke_wdt.c
>> +++ b/drivers/watchdog/booke_wdt.c
>> @@ -30,8 +30,6 @@
>> * occur, and the final time the board will reset.
>> */
>>
>> -u32 booke_wdt_enabled;
>> -u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
>>
>> #ifdef CONFIG_PPC_FSL_BOOK3E
>> #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15))
>> @@ -41,27 +39,10 @@ u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
>> #define WDTP_MASK (TCR_WP_MASK)
>> #endif
>>
>> -/* Checks wdt=x and wdt_period=xx command-line option */
>> -notrace int __init early_parse_wdt(char *p)
>> -{
>> - if (p && strncmp(p, "0", 1) != 0)
>> - booke_wdt_enabled = 1;
>> -
>> - return 0;
>> -}
>> -early_param("wdt", early_parse_wdt);
>> -
>> -int __init early_parse_wdt_period(char *p)
>> -{
>> - unsigned long ret;
>> - if (p) {
>> - if (!kstrtol(p, 0, &ret))
>> - booke_wdt_period = ret;
>> - }
>> -
>> - return 0;
>> -}
>> -early_param("wdt_period", early_parse_wdt_period);
>> +static bool booke_wdt_enabled = true;
>
> Any reason for changing the default from false to true ?
> Unless you have a reaslly good reason, I don't think that is a good idea.
I don't see where it was being set to false. It is
uninitialized AFAICT. Does that mean that it is false? (I thought only
static variables got that default).
>
>> +module_param(booke_wdt_enabled, bool, 0444);
>> +static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
>> +module_param(booke_wdt_period, int, 0444);
>>
> Also not sure if it adds value to have the module parameters visible
> from user space. Why not use 0 for the permission flags ?
>
I have no objection to your suggestion. But not sure if such paranoia
is warranted :)
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc: booke_wdt: Fix build error as a module
2014-08-20 19:18 ` Pranith Kumar
@ 2014-08-20 19:21 ` Pranith Kumar
0 siblings, 0 replies; 8+ messages in thread
From: Pranith Kumar @ 2014-08-20 19:21 UTC (permalink / raw)
To: Guenter; +Cc: Wim Van Sebroeck, open list:WATCHDOG DEVICE D..., open list
On Wed, Aug 20, 2014 at 3:18 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> On Wed, Aug 20, 2014 at 2:59 PM, Guenter <linux@roeck-us.net> wrote:
>>
>> Any reason for changing the default from false to true ?
>> Unless you have a reaslly good reason, I don't think that is a good idea.
>
> I don't see where it was being set to false. It is
> uninitialized AFAICT. Does that mean that it is false? (I thought only
> static variables got that default).
Ohk, some googling tells me both global and static variables are
initialized to 0. Makes sense, I will send in a v2
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] serial: Fix build failure caused by missing header file
2014-08-20 16:55 ` [PATCH] serial: Fix build failure caused by missing header file Pranith Kumar
@ 2014-08-25 20:13 ` Greg Kroah-Hartman
2014-08-25 23:00 ` Pranith Kumar
0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2014-08-25 20:13 UTC (permalink / raw)
To: Pranith Kumar; +Cc: Jiri Slaby, open list:SERIAL DRIVERS, open list
On Wed, Aug 20, 2014 at 12:55:45PM -0400, Pranith Kumar wrote:
> Fix build failure caused by missing header file:
>
> drivers/tty/serial/nwpserial.c: In function 'wait_for_bits':
> drivers/tty/serial/nwpserial.c:53:3: error: implicit declaration of function 'udelay' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
> drivers/tty/serial/nwpserial.c | 1 +
> 1 file changed, 1 insertion(+)
Where is this failing? What arch? What kernel version did it show up
in (i.e. what commit caused this problem?)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] serial: Fix build failure caused by missing header file
2014-08-25 20:13 ` Greg Kroah-Hartman
@ 2014-08-25 23:00 ` Pranith Kumar
2014-08-25 23:22 ` Greg Kroah-Hartman
0 siblings, 1 reply; 8+ messages in thread
From: Pranith Kumar @ 2014-08-25 23:00 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, open list:SERIAL DRIVERS, open list
On Mon, Aug 25, 2014 at 4:13 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> Where is this failing? What arch? What kernel version did it show up
> in (i.e. what commit caused this problem?)
>
This was a randconfig on powerpc. I did not bisect as to which commit
introduced this since it is a simple missing header file.
--
Pranith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] serial: Fix build failure caused by missing header file
2014-08-25 23:00 ` Pranith Kumar
@ 2014-08-25 23:22 ` Greg Kroah-Hartman
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2014-08-25 23:22 UTC (permalink / raw)
To: Pranith Kumar; +Cc: Jiri Slaby, open list:SERIAL DRIVERS, open list
On Mon, Aug 25, 2014 at 07:00:36PM -0400, Pranith Kumar wrote:
> On Mon, Aug 25, 2014 at 4:13 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>
> > Where is this failing? What arch? What kernel version did it show up
> > in (i.e. what commit caused this problem?)
> >
>
> This was a randconfig on powerpc. I did not bisect as to which commit
> introduced this since it is a simple missing header file.
Ok, so I guess it's not worth getting into 3.17, I'll queue it up for
3.18 in a few days.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-25 23:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-20 16:55 [PATCH] powerpc: booke_wdt: Fix build error as a module Pranith Kumar
2014-08-20 16:55 ` [PATCH] serial: Fix build failure caused by missing header file Pranith Kumar
2014-08-25 20:13 ` Greg Kroah-Hartman
2014-08-25 23:00 ` Pranith Kumar
2014-08-25 23:22 ` Greg Kroah-Hartman
2014-08-20 18:59 ` [PATCH] powerpc: booke_wdt: Fix build error as a module Guenter
2014-08-20 19:18 ` Pranith Kumar
2014-08-20 19:21 ` Pranith Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox