* [PATCH] atm:he - Do not initialise statics to 0.
@ 2015-06-04 14:41 Shailendra Verma
2015-06-04 22:43 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Shailendra Verma @ 2015-06-04 14:41 UTC (permalink / raw)
To: Chas Williams, linux-atm-general, netdev; +Cc: linux-kernel, Shailendra Verma
According to <stdbool.h> false is always '0' and
Static variables are initialised to 0 by GCC.
Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
---
drivers/atm/he.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 0237271..a8da3a5 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -117,7 +117,7 @@ static short nvpibits = -1;
static short nvcibits = -1;
static short rx_skb_reserve = 16;
static bool irq_coalesce = true;
-static bool sdh = 0;
+static bool sdh;
/* Read from EEPROM = 0000 0011b */
static unsigned int readtab[] = {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] atm:he - Do not initialise statics to 0.
2015-06-04 14:41 [PATCH] atm:he - Do not initialise statics to 0 Shailendra Verma
@ 2015-06-04 22:43 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-06-04 22:43 UTC (permalink / raw)
To: shailendra.capricorn; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel
From: Shailendra Verma <shailendra.capricorn@gmail.com>
Date: Thu, 4 Jun 2015 20:11:00 +0530
> According to <stdbool.h> false is always '0' and
> Static variables are initialised to 0 by GCC.
>
> Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] atm:he - Do not initialise statics to 0.
2015-05-25 19:53 Shailendra Verma
@ 2015-05-25 20:36 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-05-25 20:36 UTC (permalink / raw)
To: shailendra.capricorn; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel
From: Shailendra Verma <shailendra.capricorn@gmail.com>
Date: Tue, 26 May 2015 01:23:53 +0530
> Static variables are initialised to 0 by GCC.
> Fixes the following checkpatch error:
> ERROR: do not initialise statics to 0 or NULL
> FILE: drivers/atm/he.c:120:
> static bool sdh = 0;
>
> Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
true is not necessarily '1' and false is not necessarily '0',
therefore the correct fix would be to assign 'false' to this variable.
Furthermore you've submitted this in such a way that it cannot be
applied alongside the other atm:he patch you submitted.
This is why when you submit multiple patches to the same file, you
must group them and submit them relative to eachother and in a
specific order.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] atm:he - Do not initialise statics to 0.
@ 2015-05-25 19:53 Shailendra Verma
2015-05-25 20:36 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Shailendra Verma @ 2015-05-25 19:53 UTC (permalink / raw)
To: Chas Williams, linux-atm-general, netdev; +Cc: linux-kernel, Shailendra Verma
Static variables are initialised to 0 by GCC.
Fixes the following checkpatch error:
ERROR: do not initialise statics to 0 or NULL
FILE: drivers/atm/he.c:120:
static bool sdh = 0;
Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
---
drivers/atm/he.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 93dca2e..2cd6f17 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -117,7 +117,7 @@ static short nvpibits = -1;
static short nvcibits = -1;
static short rx_skb_reserve = 16;
static bool irq_coalesce = 1;
-static bool sdh = 0;
+static bool sdh;
/* Read from EEPROM = 0000 0011b */
static unsigned int readtab[] = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-04 22:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 14:41 [PATCH] atm:he - Do not initialise statics to 0 Shailendra Verma
2015-06-04 22:43 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2015-05-25 19:53 Shailendra Verma
2015-05-25 20:36 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.