netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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
* [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

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-05-25 19:53 [PATCH] atm:he - Do not initialise statics to 0 Shailendra Verma
2015-05-25 20:36 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-06-04 14:41 Shailendra Verma
2015-06-04 22:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).